AT commands with E303 - read SMS

Hey,
This is not linked directly with Konekt but I didn’t find the information on the Internet and since I bought the E303 modem on your website maybe someone here will know the answer.

I want to list all messages I received on the SIM card. So what I do is:
AT+CMGF=1 (fo switch to text mode)
AT+CMGL=“ALL” (to list all messages)

and the modem returns
OK

That’s it. No messages. But I know I sent SMS to it. If I do the same with another modem (Huaewei E220 for example). It’s working perfectly.

So I think that when the modem received an SMS. It acknowledges it then delete it.

Anyway I can still receive SMS that were received while I’m listening to new messages but not those sent before I start to listen to new messages. I have the same behaviour with a non-Konekt SIM card so clearly it’s not linked to Konekt SIM cards.

Any idea?

The modem has it’s own Inbox that you can see when you’re in the web interface. It’s possible that this is accessible via some other AT command. We’ll see what we can find out.

A bit off-topic, but I was able to adapt the Konekt Modem Tutorial, specifically the AT Commands with E303 to another platform, the Intel Galileo (mostly now replaced by the Edison). This was mostly straightforward, after building the Yocto-Linux kernel so I could get extra packages: needed to install usb-modeswitch and udev among other things. One place requiring extra work: /dev/ttyUSB0 wasn’t automatically created, I had to do this:

modprobe usbserial vendor=0x12d1 product=0x1001

Also, for testing (say with wget) it’s nice to set a DNS server, such as 8.8.8.8, in /etc/resolv.conf since the PPP daemon didn’t do this for me automatically.

I’m not sure how best to automate all the steps, which would seem to include

  • running the usb-modeswitch command
  • doing the modprobe command
  • connecting to /dev/ttyUSB0 to inject the Hayes commands
  • launching the ppp daemon
  • stopping the ppp daemon after using the link
  • again connecting to /dev/ttyUSB0 to hang up

Critical additions to the above would be pauses to let the commands take effect. I sure hope getting new firmware onto the Dash Pro will make this complexity go away.

Note added 11/15/2015

My Intel Galileo won’t boot with the Huawei E303 attached because it tries to find a linux kernel image on its SD card (attaching the Huawei later is OK) – this is a showstopper for my purposes. Here’s the workaround.

After connecting to the E303 as a modem, use the command AT^u2diag? to see how the default is currently set: it was 119 for me (after running modeswitch of course). Then run AT^u2diag=0 to change the default. Power everything off (including the E303). When you reboot, the E303 will come up as a modem, so no need to ever run modeswitch again. Some details of importance:

  • that ‘^’ character in AT^u2diag really is the ‘^’ character (not a meta-char)
  • the vendor/device changes after doing the AT^u2diag=0 and reboot: it becomes 12d1:1c05 (in my case, that meant needing to change the modprobe command)

So if you guys haven’t seen it already, take a look at this post: https://community.konekt.io/t/huawei-e303-cellular-modem-discussion/38/15?u=reuben

I haven’t found a way to get all the SMS messages with AT commands yet, but there’s a command in there to view the SMS inbox via an HTTP call to the modem when it’s in HiLink mode. You can actually control every aspect of the modem this way. I tested the SMS call and it works great.

@TedHerman I think the PPP daemon allows you to inject pauses and wait for OK’s from the modem when you’re scripting. I’ll try to dig up the info I had on this.

Has anybody been able to find AT commands to retrieve SMS from the E303 one can put into e.g. gammu?