Sending MMS over Wi-Fi, MM1

Sending MMS over Wi-Fi, MM1 SearchSearch
Author Message
franklee
New member
Username: Franklxd

Post Number: 1
Registered: 04-2013
Posted on Monday, April 08, 2013 - 10:03 am:   

Can I send my mms pdu to NowSMS over Wi-Fi using MM1 method?

I always get a http 500 error.

If it is possible, should the post url be "192.168.34.45:8083/mm1/test=test"?


Attached is my configure.

}
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 4363
Registered: 08-2008
Posted on Monday, April 08, 2013 - 11:44 am:   

Hi,

Yes, you can submit to NowSMS over WiFi in this manner.

Your settings look correct (except that an IP address is not a valid Sender/From address ... use a phone number/shortcode number/email address instead ... this is unrelated to the 500 error).

I would recommend removing the IP address restriction on the VASP account, just in case that is the issue and your client IP address is not as expected.

My guess is there is something about the MM1 PDU itself that is causing the error. Maybe the wrong PDU type (should be m-send-req).

I'd suggest enabling debug mode in the MMSC and checking to see what is logged in MMSCDEBUG.LOG when the message is submitted, as that should provide a clue. To enable the debug log, edit MMSC.INI and under the [MMSC] header, add Debug=Yes. Wait about 60 seconds for debug mode to be enabled.

--
Des
NowSMS Support
franklee
New member
Username: Franklxd

Post Number: 2
Registered: 04-2013
Posted on Tuesday, April 09, 2013 - 06:59 am:   

Hi Des,
Thanks for your kindly help.

Per your advices, I checked the MMSCDEBUG.LOG and the log is attached below.

It seems caused by content type unknown.

Is there any errors in my post request?
Or the content type of m_send_req?

Content type of m_send_req is "application/vnd.wap.multipart.related"
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 4368
Registered: 08-2008
Posted on Tuesday, April 09, 2013 - 11:48 am:   

MMS content-type is always application/vnd.wap.mms-message, which you have specified.

But your data is not .... it has no valid MMS headers.

You might want to look at MMSCOMP to help get you started: http://www.nowsms.com/doc/advanced-configuration-settings/creating-mms-message-f iles

(Note that MMSCOMP is designed to create MMS message files in deliver/retrieve format, not send/submit. The example in that link starts with X-Mms-Message-Type: m-retrieve-conf, but you would use X-Mms-Message-Type: m-send-req)

--
Des
NowSMS Support
franklee
New member
Username: Franklxd

Post Number: 3
Registered: 04-2013
Posted on Wednesday, April 10, 2013 - 09:37 am:   

Yes, you are right, Des.
The mms heads are missed.
I forgot to modify the buff in my codes.
It is OK now, thank you for your kindly support.

One more question is that can I download the MMS from NowSMS?

Thanks again.
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 4376
Registered: 08-2008
Posted on Wednesday, April 10, 2013 - 12:01 pm:   

If NowSMS is configured to be an MMSC (not route the message via an "MMSC Routing" definition) then NowSMS will generate a WAP Push message to the recipient that includes a URL for retrieving the message. (The SMS push contains an MMS m-notification-ind packet.)

If you want to get the message without parsing that push, you could parse the message ID from the response when the message is submitted, which will look like this:

20130410/06/A59AE517@des.nowsms.com

Truncate the ID at the "@" and append ".mms", and do a GET for the URL:

GET /20130410/06/A59AE517.mms

Note that this will only work if you disable a security check. Edit MMSC.INI and under the [MMSC] header add MSISDNMatchRequiredForReceive=No

--
Des
NowSMS Support
franklee
New member
Username: Franklxd

Post Number: 4
Registered: 04-2013
Posted on Friday, April 12, 2013 - 10:34 am:   

Thanks Des.

The WAP Push message will be sent by the GSM modem added to NowSMS, right?
Or I can get the WAP Push message any other way?

I connect my phone through usb, it can be detected, but always inited failed at last.

Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 4396
Registered: 08-2008
Posted on Friday, April 12, 2013 - 02:27 pm:   

Hi,

OK ... now we're mixing delivery models, so it gets confusing.

My earlier response assumed that NowSMS were operating in full MMSC mode. In that case, it would convert the MMS message to delivery format, store it locally, and send a WAP Push over SMS. There's a good write-up of how MMS works here: http://www.nowsms.com/faq/how-mms-works

Where it gets more confusing in your scenario is that NowSMS is not in MMSC mode, but is forwarding the message to another MMSC. So if you could get past these modem issues, in this scenario NowSMS is not going to store the message locally and generate a WAP Push ... the operator MMSC is going to handle those functions.

Now to the modem problems you are experiencing.

The "Unable to initialize modem" error indicates that Windows is unable to init the modem with the modem driver.

When this happens, NowSMS tries to see if it can talk to the modem directly and send some reset commands so that we can try again with the Windows modem driver. (NowSMS can send SMS via the modem by communicating directly with its COM port, but to send MMS, we need additional support from the Windows modem driver.)

The "Initialised modem at 115200 bps" message is a debug message that indicates that NowSMS was able to successfully communicate with the modem directly by bypassing the modem driver.

If you were NOT seeing the "Initialised modem at" message, it would suggest that some other software (probably Samsung software for the modem itself) was using the modem for some purpose, and you would need to disable that software to allow you to use the modem. (Or it could mean a general failure talking to the modem, where I'd suggest removing the modem from your system and re-adding it.)

However, the fact that you are seeing the "Initialised modem at" means that the modem is present and available, but there is a problem with the Windows drivers.

I'd suggest going into the Windows Control Panel ... Phone and Modem options ... select the modem from the Modems list and press Properties. Go into the diagnostics and see if you can query the modem. If that returns an error, I'd suggest uninstalling the modem and all associated software and then re-installing.

If the query is ok, then it becomes more confusing. On the query page, there is an "Append to Log" and "View Log" option. Enable the "Append" option. Try again from NowSMS, and then "View" the log. I'd like to see the log to see if there is a clue as to why the Windows modem driver init is failing when NowSMS attempts.

--
Des
NowSMS Support
franklee
New member
Username: Franklxd

Post Number: 5
Registered: 04-2013
Posted on Monday, April 15, 2013 - 09:04 am:   

Thanks for your kindly help again.

When the NowSMS is in MMSC mode, a WAP Push will be sent over SMS to the recipient. Is that sms sent form the phone(or GSM modem) associated to the NowSMS?

About the assciation, per your advices,I tested the modem and it is ok when I qurey on the diagnostics page in the control panel.

But it still failed when associated with NowSMS.

According to the log, the modem can reponse correctly at beginning, but time out error came for response a call.

Here is the log detail.

Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 4399
Registered: 08-2008
Posted on Monday, April 15, 2013 - 06:16 pm:   

Hi franklee,

That modem log is very interesting, but let me answer your other question first.


quote:

When the NowSMS is in MMSC mode, a WAP Push will be sent over SMS to the recipient. Is that sms sent form the phone(or GSM modem) associated to the NowSMS?




If MMSC Routing = Direct Delivery, the WAP Push over SMS goes out via whatever SMSC paths are defined for SMS delivery. (That can be a modem, yes.)

Back to your log file. I compared your modem log file to logs on our systems with a variety of different modems.

I noticed two differences.

First I can see that when NowSMS asks Windows to initialise the modem, for some reason the modem is not responding to the ATS0=0 command. I'm not sure why Windows sends that command (it does for all of my tests as well) ... it is a command to tell the modem not to automatically answer the call if the line rings. But what is odd in your log is that the modem does not respond to this command.

It is particularly odd because S0=0 was included in an earlier command that was responded to successfully. So why would it fail at this point?

The frustrating thing about this is that NowSMS does not need Windows to send any of these init commands.

The other thing I noticed is that nowhere in the log does it report "Passthrough on" like it does in my logs. That is to be expected, however, as Windows sends these init commands before giving NowSMS control of the modem.

I spent some time with one of our engineers reviewing this today, and we have a theory about the error. We noticed a slight difference in how the NowSMS server interfaces with Windows modem drivers, as compared to how the configuration program works when it tests the modem during the initial "add modem" process.

We've updated the NowSMS configuration program to use the same process used by the NowSMS server. I've uploaded an updated copy of SMSGW.EXE to http://www.nowsms.com/download/test20130415.zip. Use the SMSGW.EXE in that zip to update the version you were running, and let's see if that allows you to add the modem.

--
Des
NowSMS Support
franklee
New member
Username: Franklxd

Post Number: 6
Registered: 04-2013
Posted on Thursday, April 18, 2013 - 04:23 am:   

Hi Des,
I really appreciate your help.

I tested on several computers, it is frustrating that the new version still does not work.

Here is the error and log.
It seems same as before.



I will do more test with some other phones, maybe a different driver will respond better result.

About get mms without parsing wap push message which you mentiond on April,10(Well, it seems I can not quote as you do), what is the full url(before the "GET")?
And which heads should be included in my request?

Thanks again.
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 4415
Registered: 08-2008
Posted on Thursday, April 18, 2013 - 02:57 pm:   

Hi franklee,

Unfortunately the problem is occurring in the Windows modem driver.

Other than suggesting you try a different modem...

I was about to suggest some registry edits to reconfigure the modem driver to stop sending the ATS0=0 command to see if that would make a difference.

While I was preparing to do that I noticed that yesterday my test server modem logs were no longer showing ATS0=0 in the log. I reinstalled a previous version and it returned.

Turns out our engineers continued to review the modem initialisation routines and removed an additional unneeded option. This caused Windows to stop sending the ATS0=0 command when the modem driver is initialised.

We still do not understand why your modem is failing to respond when Windows sends this command. So even though we have managed to stop sending it, there may be other problems with the modem down the line.

Please try the updated SMSGW.EXE at http://www.nowsms.com/download/test20130418.zip. If this works, the configuration program will let you add the modem, but the service will fail to init the modem, so it won't work fully until we update the service as well.

I will also be curious if the ATS0=0 references stop appearing in your modem logs, as they did with mine.

To answer your other question, the rest of the URL is the address and port number of the MMSC. Going back to your first post, it would be http://192.168.34.45:8083/

NowSMS does not care about any HTTP headers. In the real world you would see other headers ... Host:, Accept: (to indicate the MMS content type as accepted), User-Agent:, possibly a user agent profile.

--
Des
NowSMS Support
franklee
New member
Username: Franklxd

Post Number: 7
Registered: 04-2013
Posted on Tuesday, April 23, 2013 - 03:18 pm:   

Hi,Des
Thank you for your answer.
I can download the mms without parsing a wap push now.

The new version still did not work.
Here is new error and log.
Please have a check.
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 4444
Registered: 08-2008
Posted on Friday, April 26, 2013 - 05:18 pm:   

Hi franklee,

I'm out of ideas on the modem.

It's basically the same as before, we have just reduced the number of commands sent by Windows before Windows gives the port to NowSMS. In either case, three sets of very basic commands are sent by Windows and then the modem becomes unresponsive.

If you select the port by COM port number in NowSMS, does it work ok? NowSMS can use it for SMS in this setup, but not for MMS.

--
Des
NowSMS Support