AT+CGDCONT returns error (sometimes)



I have been experimenting extensively with the NovaM (SARA R410). I am connecting it to a single-board-computer (similar to a Raspberry Pi). My software system launches the ppp daemon passing it a chat-script (to configure and establish a connection). After the connection is established I see a new interface ppp0 and my system has Internet access.

My system will gain Internet access in this way many times but eventually (under circumstances I have not been able to identify) my chat-script will fail to establish a connection. I have enabled ppp logging and I can watch the connection progress in real time. Here are the AT commands in the chat-script:


where is the correct APN. When all goes well, the Nova returns a series of “OK” responses and returns “CONNECT” after the last command.

However, the trouble I run into is that the command,


sometimes returns:

+CME ERROR: operation not supported

Once this error occurs, always in response to the AT+CGDCONT command, it will just keep recurring.

The only way I have found to “solve” the problem is to cycle the power on the Nova (or issue “AT+CFUN=15”).

This seems quite odd since the command is always being read from the same file (no chance of a typo), yet “sometimes” the command is supported (no error) and other times it is not.

Any help or thoughts on this will be much appreciated.


On the R410, you can probably just get rid of that command in your chatscript entirely since the APN will get set by the network.


Hi @Reuben, thanks for the speedy reply…

I tried your suggestion and when I leave out the AT+CGDCONT command I do get a connection, however, the ppp0 interface does not appear when I run ifconfig.

When I DO include the AT+CGDCONT command, pppd logs the following:

Serial connection established
Using interface ppp0
Connect: ppp0 <–> /dev/ttyUSB2
hub 8-1.4:1.0: unable to enumerate USB device on port 4
Could not determine remote IP address: defaulting to
local IP address
remote IP address
primary DNS address
secondary DNS address
reading /var/run/dnsmasq/resolv.conf
using nameserver
using nameserver

and I see ppp0 in ifconfig.

when I do NOT include the AT+CGDCONT command, pppd logs the same first few lines, up to and including,

Connect: ppp0 <–> /dev/ttyUSB2

Apparently, it does not obtain an IP address. It does not create ppp0, and my system cannot communicate.

I could sure use some help here.


Interesting. Is this with a hologram SIM?


Hi, the problem was unrelated to the SIM card, and occurred with Hologram and other SIM cards.

The problem was that I was not properly closing the socket I was using, so after 7 such failures to close the socket, there were no more available and the +CME ERROR would occur. Resetting the Nova (AT+CFUN=15) would fix the problem but, of course, properly closing the socket (AT+USOCL) is the proper solution.


Aha, good catch. Totally makes sense. Thanks for posting a follow-up