Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
10 years, 9 months ago.
Can't communicate with C027 G350 modem
As in the title, I have C027 ublox board with the GSM modem option, and I'm struggling to use the GSM functionality. I've successfully run the HelloWorld example, so I can program the board and control LEDs and print back down the serial port with a Serial object.
I bought a brand new SIM (ASDA Mobile) which to my knowledge has still not connected to the network, so I can't even load credit on it. I can't test it in my own phone as I'd have to punch it out to be a micro SIM and then I'd be worried about it not fitting back in the modem SIM slot. So it may not work, however I find this unlikely.
I ran the example unmodified and nothing happened. I modified the example to add debug information in a loop, it stops after attempting to send a SMS. I removed that line in case it was a credit problem, and tried polling for messages received instead - on first connection to the network I would expect some to arrive. Polling also fails with the thread talking to the modem appearing to halt. Equally, attempting to poll network status also fails.
I've tried modifying the startup code based on other examples, I now have:
Startup
pc.printf("Thread starting\r\n"); c027.mdmPower(true); c027.mdmReset(); c027.mdmWakeup(); UbloxUSBGSMModem modem; // for LISA-C use the UbloxUSBCDMAModem instead modem.power(true); Thread::wait(1000);
Power usage (on DC power, yes I remembered) remains below 50mA - the biggest draw I see is the flashing LED I added to another thread to check the CPU is still running. The board is marked v1.2.
3 Answers
10 years, 9 months ago.
I have the same issue. The comment above indicating you have to use the Serial Version of the cellular modem looks like the solution but I don't see anything in the cellular modem class that differentiates between serial and USB. Does anyone have any suggestions to get me started?
Hi Ken, there's a new project up recently that actually works for me: https://mbed.org/teams/ublox/code/C027_SupportTest/?platform=u-blox-C027
posted by 14 Apr 2014Thanks, I found that one too but am having difficulty connecting to the TCP Listener on my PC. I have verified my external IP address and port are both accessible but I can't get the socket to connect. I had another issue with this one as well trying to use the built-in Ethernet interface on the C027 while trying to use the cell modem.
posted by 15 Apr 201410 years, 9 months ago.
You can use the C027_ModemTransparentSerial. This will expose the serial to your mbed serial port. Then you can attach Teraterm or Putty and type you AT commands. This will allow you to get familiar with AT commands and modem in general.
You may want to look at the UbloxSerModem class which includes the external TCPIP stack.
Make sure you removed the pin code from the sim or add the at command to set it.
I used the TransparentSerial program to verify the modem and SIM both work successfully, and have been investigating the UbloxSerModem class. It puts out this instead:
[WARN] Module ATCommandsInterface.cpp - Line 272: Command returned no message [WARN] Module ATCommandsInterface.cpp - Line 759: Events enabling command failed [WARN] Module ATCommandsInterface.cpp - Line 272: Command returned no message [WARN] Module ATCommandsInterface.cpp - Line 783: Events disabling command failed [WARN] Module ATCommandsInterface.cpp - Line 272: Command returned no message [WARN] Module ATCommandsInterface.cpp - Line 272: Command returned no message [WARN] Module ATCommandsInterface.cpp - Line 759: Events enabling command failed [WARN] Module ATCommandsInterface.cpp - Line 272: Command returned no message [WARN] Module ATCommandsInterface.cpp - Line 783: Events disabling command failed [WARN] Module ATCommandsInterface.cpp - Line 272: Command returned no message [WARN] Module ATCommandsInterface.cpp - Line 272: Command returned no message [WARN] Module ATCommandsInterface.cpp - Line 759: Events enabling command failed [WARN] Module ATCommandsInterface.cpp - Line 272: Command returned no message [WARN] Module ATCommandsInterface.cpp - Line 783: Events disabling command failed [WARN] Module ATCommandsInterface.cpp - Line 272: Command returned no message [WARN] Module ATCommandsInterface.cpp - Line 272: Command returned no message [WARN] Module ATCommandsInterface.cpp - Line 759: Events enabling command failed [WARN] Module ATCommandsInterface.cpp - Line 272: Command returned no message [WARN] Module ATCommandsInterface.cpp - Line 783: Events disabling command failed
I've been looking at the USSDTest and NTPTest examples which now can be compiled to use the UbloxSerModem class, the only difference I see is a delay, which hasn't made much difference.
posted by 31 Mar 201410 years, 9 months ago.
Perhaps someone with a ublox board could test your software. In the meantime, you should be able to buy a 'Micro SIM to SIM Adaptor' in your local mobile store. They (or ASDA) should also be able to cut your sim for you using a special cutting tool. That way, you'll be able to load credit using your own phone, and then attached the sim into the adapter and use it in your ublox board. Donal
The SARA-G350 has only a serial port and no USB. you have to use the Serial version of the cellular modem class.
posted by Michael Ammann 02 Mar 2014