I finally figured out how to send the MMS last month. I would like to thank the netizens who thought it was very helpful and other enthusiastic netizens.
My main steps are:
Generate the PDU of m_send.req
Establish a GPRS connection
Establish a TCP connection with the mobile MMS Gateway (Access Point: "cmwap" url: 10.0.0.172: 80)
Send the m-send.req to the mobile gateway using the POST method of HTTP
For more information about m-send.req, see oma-mms-enc-v3162-20030915-c.pdf. MMS pud defined in the wap-206, you can also see Nokia's "How to Create MMS services", but there is only a simple PDU m-send.req. For more information, go to the Oma forum to download relevant documents.
To establish a TCP connection, I used the sim300 module of simcom, which was originally intended to use its own TCP/IP protocol stack, but it cannot be connected to the mobile MMS Gateway (I guess it may be because the mobile device has identified the device and disabled me to do so. Because WAP2.0 technology is based on TCP/IP technology, and two network access terminals in the mobile network can achieve direct TCP connection ). Later, it was found that if you establish a PPP connection with the mobile gateway before making a TCP connection, you can use the PPP program in Linux. For details, you can query the documents related to GPRS internet access in Linux. I tried to use the "ATD * 99 *** 1 #" command of sim300 to dial, and then garbled characters were displayed, and the last "no carrier" was displayed ". It should be that the sim300 does not have an embedded PPP protocol stack (but I don't know why I want to provide this command). The MC55 of Siemens seems to have a built-in PPP protocol. Please consult the user for details.
The following provides an http post header that captures the TCP data sent from the mobile phone. Post http://mmsc.monternet.com HTTP/1.1
Accept: image/PNG, image/GIF, image/X-xbitmap, image/JPEG, image/pjpeg ,*/*
HOST: mmsc.monternet.com
Pragma: No-Cache
Cache-control: No-Cache
Proxy-connection: keep-alive
Accept-encoding: deflate, Gzip
Content-Type: Application/vnd. WAP. MMS-message
User-Agent: SAMSUNG-SGH-E908/netfront 3.2/WAP2.0 profile/MIDP-2.0
Configuration/CLDC-1.1
Accept: Application/vnd. WAP. MMS-message, image/vnd. WAP. wbmp, image/PNG, image/JPEG, image/GIF, text/X-imelody, text/X-imelody, application/X-Midi, audio/Midi, audio/mid, audio/X-mid, image/BMP, audio/MP3, audio/X-Midi, audio/AMR, application/vnd. smaf, application/vnd. WAP. MMS-message X-wap-profile: http://wap.samsungmobile.com/uaprof/e908_10.xmlcontent-length: 411