Gprs modem does not register network

22 Oct 2011

After reading about Michaels tips (http://finch.am/projects/arduinogsm/) I decided to try using the same Gprs modem on the mbed. I thought it would be easy, because the mbed has it's own uart and the modem takes direct AT commands (after hacking it a bit).

After some soldering (and desoldering) I can talk AT commands to the modem using the mbed, but I can't get it to send SMS messages. In fact, the real problem seems to be getting the modem to register the network. After a lot of trying I found out that the AT+CREG? command always reports 0,2 which means it hasn't registered in any network (but is searching without ever finding any available network).

The sim card is ok, because it works on a cell phone and the modem also reports it's ok (AT+CPIN?). The cheap modem is very poorly documented without any mention of the three leds on it (green, yellow, red). The red must be power, because it always lights when the modem is powered on. The green indicates traffic, because it blinks when inputting AT commands.

I now have come to believe my poor electrician skills are the reason again, because when powering on the modem keeping the mbed in reset mode (button pushed) the modem starts flickering it's green led after a short while. I believe it's registering (or trying to) at that time. But when powering on the modem without keeping the mbed at reset it doesn't do the registering (green led flickering thing). However, querying AT+CREG? gives 0,2 regardless of how I power on the modem.

Edit: I've also checked the signal strength (AT+CSQ) which gives about 20, which should be good enough.

Is the wiring somehow messing up the modem so it can't register or what? I'm getting out of ideas to try. I noticed the modem doesn't answer to AT commands at all if the mbed's (who is executing the AT commands all the time) ground pin isn't connected to the modem's ground pin (ie. when powering the mbed from the pc usb cable)

Below is a state of the art schematic of my wiring. As you can see, no other components is used, just the modem and the mbed.

/media/uploads/tombracer/gprs.png

23 Oct 2011

Might try a SIM card for another cell carrier - some of them seem to lock out strange phones.

We have also seem them stop working until we put them back in a regular phone for a couple calls.

You always need that gnd pin!!!

Make sure that the modem does not need more than 200MA of current. That is about all you can pull off of mbed. If you need more, might need an AC adapter to power the modem and even then you still need the gnd (but don't tie the two 5V supplies together).

If you drop characters at high baud rates try MODSERIAL (from Cookbook) - it has uses interrupts with a large buffer.

23 Oct 2011

I'll answer myself this time.

After some research I found out that apparently some of these cheap Benq M32 gprs usb dongle modems from Dealextreme don't have valid IMEI codes. And of course my modem has plain zeros as IMEI (checked with AT+CGSN), and is therefore not allowed to connect to the gsm networks here in Finland. That is why the SIM card works on a cell phone, but not on the M32.

There is no way I can make it work at all. Darn!

Anyone want to buy a ready hacked (desoldered PL2303 and soldered wires to RX and TX pads) M32 modem with invalid IMEI? I read they might work in some countries with looser gsm regulations..

Any suggestions of another cheap (but working) gsm modem to use with the mbed to send SMS messages?

23 Oct 2011

Most GPRS/GSM modems draw about 2A in pulses when connecting to the network. Try a supply that you can get more juice out of.

Lerche

23 Oct 2011

Has anyone got this to work in UK?. I just looked on ebay and there are a few GSM devices there.

24 Oct 2011

When reading through a few different forums I noticed not all of these modems ship with empty IMEIs. It seems some of them come equipped with proper (more or less) IMEIs. Mine was bought from Dealextreme in April this year, and it came with blank IMEI.

I wonder how the manufacturer thought the modem would work without a proper IMEI code? Maybe they just don't care as long as the product sells..

24 Oct 2011

We have used Enfora modems here in the US for several years. They seem to work fine for several months and then one day we need a SIM card from another carrier. I suspect they change out both their equipment and software, sometimes it checks all the codes and then for awhile they do not seem to care. They are used here in the Police cars for data service - might check out that angle in your country to find one that works well. The Enfora modems are a bit hard to find.