python - How can I send an MMS via a GSM/GPRS modem connected to a linux computer? -


i have directory contain 50 image files (.jpg) each less 300kb. files should attached mms , send linux computer using gsm/gprs modem. need work out how package mms , able send mobile phone or email linux computer. please note want able send mms message using gsm/gprs modem - not via clickatell or other web service. not want using full blown mmsc gateway such nowsms (which windows anyway) or mbuni. please me find linux tool can worked through command line / compile source code / method easy use.

thanks in advance expertise

why want this? overly complicated process , there reason there mmsc gateways available. use gprs part establish ppp connection, rest of stuff happens on ip.

i strongly suggest use gateway this, , don't manually.

in order establish ppp connection:

  1. at+cgdcont? should respond context on. means ready attach/connect.
  2. at+cgatt=1 (attach modem)
  3. at+cgdata=? (check data mode)
  4. at+cgact=1 (activate connection)

now on ppp, , talk on modem using whatever provider using. direct http mmse protocol.

for example, here complete transcript on http. first, need setup modem , connection information. these commands should response of ok modem.

at+cmmsinit # initialize mms method at+cmmscurl="some.url.com" # mms center url at+cmmscid=1 # set bearer at+cmmsproto="1.1.1.1",8080 # mms proxy information at+sapbr=3,1,"contype","gprs" # how sending at+sapbr=3,1,"apn","foobar" # set apn at+sapbr=1,1 # activate bearer context 

next, prepare message:

> at+cmmsedit=1  # enter edit mode ok > at+cmmsdown="pic",54321,30000 # download pic 54321 bytes                                 # , set latency                                 # download 30000 ms connect                         # means, ready receive data                                 # send file ok                              # data received > at+cmmsrecp="123456789"       # set recipient ok > at+cmmsview                   # view message (your message) ok > at+cmmssend                   # send message ok                              # message sent > at+cmmsedit=0                 # exit edit mode, , clear buffer ok 

this of course, specific modem using. results may vary. can tell exercise in futility. go proper provider if want send mms messages.


Comments