Python Forum
Using a file to send multiple contacts Text via GSM sim
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Using a file to send multiple contacts Text via GSM sim
#1
Using a sim800c v3 and a Raspberry Pi4 and AT Commands I have been successful at operating the GSM modem.. But Now I would like to send my company contact list (115) a text at one time ... It would be great to use a CSV/TXT/EXCEL file to do this .. Right now my python code is novice as it gets , But it works ... The question is how do I import file and send to Serial for successful transmission ?


This is my python which works for one text at at time to one number ... looking for Mass SMS or Multiple Contacts
import RPi.GPIO as GPIO
import serial 
import time,sys  

SERIAL_PORT = "/dev/ttyUSB0"
ser = serial.Serial (SERIAL_PORT,baudrate = 9600,timeout=5)

ser.write("AT+CMGF=1\r")
print("Text Mode Enabled....")
time.sleep(3)
ser.write('AT+CMGS="41######"\r')
msg="Yes I know , another TEXT about Team meetup, text back availability"
print("Sending Message ...")
time.sleep(3)
ser.write(msg+chr(26))
time.sleep(3)
print("message sent...")
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Trying to send file to printer with no results. chob_thomas 2 3,268 Dec-21-2022, 07:12 AM
Last Post: Pedroski55
Thumbs Up Need to compare the Excel file name with a directory text file. veeran1991 1 1,071 Dec-15-2022, 04:32 PM
Last Post: Larz60+
Photo put a green boarder and text around multiple pictures jackosullivan 5 1,402 Jul-05-2022, 10:39 AM
Last Post: snippsat
  Modify values in XML file by data from text file (without parsing) Paqqno 2 1,581 Apr-13-2022, 06:02 AM
Last Post: Paqqno
  Converted Pipe Delimited text file to CSV file atomxkai 4 6,843 Feb-11-2022, 12:38 AM
Last Post: atomxkai
  Replace String in multiple text-files [SOLVED] AlphaInc 5 7,964 Aug-08-2021, 04:59 PM
Last Post: Axel_Erfurt
  Open and read multiple text files and match words kozaizsvemira 3 6,677 Jul-07-2021, 11:27 AM
Last Post: Larz60+
  Reading Multiple text Files in pyhton Fatim 1 1,886 Jun-25-2021, 01:37 PM
Last Post: deanhystad
Question How to extract multiple text from a string? chatguy 2 2,315 Feb-28-2021, 07:39 AM
Last Post: bowlofred
  [split] How to convert the CSV text file into a txt file Pinto94 5 3,257 Dec-23-2020, 08:04 AM
Last Post: ndc85430

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020