Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Windows Phone with modem access - sending SMS messages through a terminal emulator

DZone's Guide to

Windows Phone with modem access - sending SMS messages through a terminal emulator

· Mobile Zone
Free Resource

Download this comprehensive Mobile Testing Reference Guide to help prioritize which mobile devices and OSs to test against, brought to you in partnership with Sauce Labs.

As I was looking for another way to provision my Dell Venue Pro (those devices are on lockdown because of lack of registry access) I figured that I still need to experiment with AT commands. I already worked with those during the NoDo testing period, when ID_CAP_INTEROPSERVICES was allowed and I was able to build a better modem connector app than what was shipped as a part of the EM app. Now, the only option is using the EM app and it is not pretty – entering long commands on a small screen/keyboard quickly becomes out of line.

That being said, AT commands can be sent through a terminal emulator. Windows 7 doesn’t come with a Hyperterminal application anymore, so I had to look for third-party solutions. Tera Term seemed like a decent candidate, so I downloaded and installed it. To prepare the phone, make sure that you follow the instructions here to point 4. Unless you want to set up tethering with T-Mobile, the rest is insignificant.

Keep the phone in Composite Mode and start Tera Term. As the connection screen appears, select Serial:

image

You will now see a blank terminal screen. To test the actual connection to the device, press Alt+R and type in AT+CGMM:

image

This should yield the device name and model, similar to this:

image

You now need to set the modem in a text-only mode. I will discuss the PDU mode in one of the next blog posts. To do this, once again press Alt+R and type in AT+CMGF=1. You will not get a visual confirmation, but you can now send text messages. Use Alt+R one more time and type in AT+CMGS=”+PHONENUMBER”, where PHONENUMBER is the full-format number, with the country and area codes included.

If for some reason on Alt+R you don’t get a command dialog, copy some simple text in the clipboard – it is generally used to paste a command from the clipboard, but that can be edited directly in the dialog anyway.

If entered correctly, you should see the regular > prompt.

image

You can type your message by using Alt+R (again). When done, press Ctrl+Z. Your message will be sent.

NOTE: Sending SMS messages this way will still charge your cellular account.

Analysts agree that a mix of emulators/simulators and real devices are necessary to optimize your mobile app testing - learn more in this white paper, brought to you in partnership with Sauce Labs.

Topics:

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}