Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8891859
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T22:50:48+00:00 2026-06-14T22:50:48+00:00

I am trying to programmatically send and recieve txt messages in python, using a

  • 0

I am trying to programmatically send and recieve txt messages in python, using a huawei e220 modem on vodafone.

editedit:
I got it to work, need to set smsc to *****.
what i need to know is, what is the command to set it to this?? EG AT+????

How do I do this with serial.Serial module???
I’m having a difficult time.

is PyGSM the best module to do this?
How do I use it?
I can’t find any documentation anywhere, but also I can’t find a better module.

Daisy13_on_D1="/dev/ttyUSB0"

gsm = GsmModem(port=Daisy13_on_D1,baudrate=115200,logger=GsmModem.debug_logger).boot()

s = gsm.wait_for_network()

gsm.send_sms(642723243,"Hey, what's up")

gives me this output

debug Booting
   debug Connecting
   write 'ATE0\r'
    read '\r\n'
    read 'OK\r\n'
   write 'AT+CMEE=1\r'
    read '\r\n'
    read 'OK\r\n'
   write 'AT+WIND=0\r'
    read '\r\n'
    read 'COMMAND NOT SUPPORT\r\n'
   write 'AT+CMGF=1\r'
    read '\r\n'
    read 'OK\r\n'
   write 'AT+CSQ\r'
    read '\r\n'
    read '+CSQ: 19,99\r\n'
    read '\r\n'
    read 'OK\r\n'
   write 'AT+CMGS="642723243"\r'
    read '\r\n'
    read '+CMS ERROR: 330\r\n'
   write '\x1b

I am also trying to use the sms0.4 module now too with no luck.

import sms

m = sms.Modem("/dev/ttyUSB0")

m.send('64272923243','This works YO')
print m.conn.sent()

results:

Traceback (most recent call last):   File "testSMSMODULE.py", line 5, in <module>
    m.send('0272923243','This works YO')   File "/usr/local/lib/python2.7/dist-packages/sms-0.4-py2.7.egg/sms/__init__.py", line 61, in send
    self._command('AT+CMGS="%s"' % number)   File "/usr/local/lib/python2.7/dist-packages/sms-0.4-py2.7.egg/sms/__init__.py", line 109, in _command
    raise ModemError(results) sms.ModemError: ['\r\n', '+CMS ERROR: 330\r\n']
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T22:50:49+00:00Added an answer on June 14, 2026 at 10:50 pm

    AFAIK the best free library that does what you want is called SMSLib, and it’s written in Java. Be prepared to fix numerous issues specific to your hardware, but in general it works OK.

    There’s a commercial solution called “ActiveXperts Mobile Messaging Toolkit” which you can use from Python through COM bindings. Didn’t tried that myself (when I needed to, I’ve implemented my own solution instead), however people on the Internets say it works OK.

    AFAIK the rest of them is crap.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to send commands to the Tor control port programmatically to make it
I am trying to programmatically check a checkbox of a ListView (using VB &
I'm trying to programmatically send an email of all of the dll files and
I am trying to send sms programmatically from one android emulator to another on
I am trying to send email programmatically... I have this line of code: _mail.AddAttachmentData(nsd,text/plain,
I'm trying to create a packet to send over serial using ruby-serialport. This seems
I'm trying to programmatically create a timeline and markers using the Visio 2010 COM
I am trying to programmatically remove rows from a Microsoft Access Database using a
i`m trying to send an email using native email client on android phone. I
I'm trying to make web requests programmatically in ASP.NET, using the POST method. I'd

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.