Send MMS From Serial Port on Raspberry Pi

5166 2



In order to establish the PPP connection:

  • AT+CGDCONT? This should respond with the context you are on. This means you are ready to attach/connect.
  • AT+CGATT=1 (attach your modem)
  • AT+CGDATA=? (check what is the data mode)
  • AT+CGACT=1 (activate your connection)

Now you are on PPP, and then you talk over the modem using whatever your provider is using. It could be anything from direct HTTP to MMSE protocol.

For example, here is a complete transcript over HTTP. First, we need to setup the modem and connection information. All these commands should get a response of OK from the modem.

AT+CMMSINIT # Initialize the MMS method

AT+CMMSCURL=”” # the MMS center URL

AT+CMMSCID=1 # Set bearer

AT+CMMSPROTO=”″,8080 # MMS Proxy information

AT+SAPBR=3,1,”Contype”,”GPRS” # How you are sending

AT+SAPBR=3,1,”APN”,”foobar” # Set the APN

AT+SAPBR=1,1 # Activate the bearer context

Next, we prepare the message:

> AT+CMMSEDIT=1 # Enter edit mode


> AT+CMMSDOWN=”PIC”,54321,30000 # Download a pic that is 54321 bytes

# and set the latency

# for the download to 30000 ms

CONNECT                         # This means, ready to receive data

# so send your file

OK                            # Data received

> AT+CMMSRECP=”123456789″       # Set the recipient


> AT+CMMSVIEW                   # View your message

(your message)


> AT+CMMSSEND                   # Send the message

OK                             # Message sent

> AT+CMMSEDIT=0                 # Exit edit mode, and clear the buffer





foobar = simple


MMS Proxy:

TCP Connection over GPRS using SIM900 and AT Commands


Related Post

while loop

Posted by - October 18, 2015 0
[crayon-61f08e469cf16304496037/] Keep Reading : Pi Camera Resolution Fix Hello World LED Blinking Wire camera to pi

Serial Commands used by our Satellite transciever.

Posted by - October 17, 2015 0
We will need the crc16 python code library : [crayon-61f08e469d074789002413/] [crayon-61f08e469d079692773749/]   [crayon-61f08e469d07b623251530/] Keep Reading : Serial Communication with…


Posted by - August 15, 2015 5
First I unboxed my raspberry pi and took it out of it’s bag. The first thing I thought when I…

There are 2 comments

  1. Avatar

    a couple questions…
    MMS PROXY… what is it ? how do you obtain the IP address and port number for it ???
    also, “PIC”, is that the file name of the image file ???

    1. Avatar

      I found my MMS Proxy on a list of MMS details on google, but I can’t find the page now. PIC is the kind of file you are sending, it can also be set to TXT and other things, please see the PDF that I referenced at the bottom of the article.

  2. Pingback: Super Simple Google AIY Surveillance Camera – Not A Bomb

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.