3G/4G & LTE Base HAT, Telit modem ERROR on configure APN for inet connection with ECM

Hi @ensar,
So, I’m carefully following the very clear Sixfab tutorial on setting up for ECM connection with Telit modem (this query follows on from my previous communications).

I start minicom as instructed; my only departure from the script is that, because I have attempted this several times already, I try to reset the modem with AT#USBCFG=0 before proceeding. I get OK.

I then follow through: Configure modem: AT#USBCFG=4 —> OK
Configure APN: AT#CGDCONT=1, “IP”, “super” —> ERROR

Should I substitute an actual IP for “IP” here? If so, which one? I assume not the IP associated with wlan0.

At this point ifconfig shows wwan0 inet 192.168.225.28
Also, I have lost the internet connection through my local WiFi on wlan0, although I have not attempted to connect to the internet with AT#ECM=1,0,"","",0

How can I trouble shoot this? I find no log from minicom. I’m stuck for ideas now so any help much appreciated.

1 Like

Hi @j.b.pilkington,

Which SIM are you using? Please confirm that the APN is correct.
Also, to see more descriptive error replies please type AT+CMEE=2.

HI @ensar,
Thank you for your rapid response. My SIM is a Sixfab/Twilio Super SIM for which I believe the APN is “super”, as confirmed in my Sixfab Connect account under Sim/My Sims/Details. That is the value I use: AT#CGDCONT=1, “IP”, “super”

I fear there is something very amiss with my system. Here is a listing of a brief minicom session:

Welcome to minicom 2.7.1

OPTIONS: I18n
Compiled on Aug 13 2017, 15:25:34.
Port /dev/ttyUSB2, 14:49:17

Press CTRL-A Z for help on special keys

AT
OK
AT#USBCFG=4
ERROR
AT#CMEE=2
ERROR

As you can see, I’m getting ERRORs all the time now, and AT#CMEE=2 gives me no extra information.

In addition to this, sometimes minicom sends me a message “Cannot open /dev/ttyUSB2!”

There must be some way to crack this.

1 Like

Could you please provide me the output of the following commands:

AT+CGMR
AT#USBCFG?
AT+CREG?
AT#ECM?
AT+CPIN?
AT+CGDCONT?
AT+CSQ

Here goes, @ensar:

OPTIONS: I18n
Compiled on Aug 13 2017, 15:25:34.
Port /dev/ttyUSB2, 15:21:45

Press CTRL-A Z for help on special keys

AT+CGMR
M0F.220006

OK
AT#USBCFG?
#USBCFG: 4

OK
AT+CREG?
+CREG: 0,5

OK
AT#ECM?
#ECM: 0,0

OK
AT+CPIN?
+CPIN: READY

OK
AT+CGDCONT?
+CGDCONT: 1,“IP”,“super”,"",0,0,0,0
+CGDCONT: 2," IPV4V6",“ims”,"",0,0,0,0
+CGDCONT: 3,“IPV4V6”,“sos”,"",0,0,0,1

OK
AT+CSQ
+CSQ: 24,5

OK

As ever, thank you for your prompt response. I hope this is insightful for you. Today I seem to be getting fewer ERROR responses (except to badly typed requests, which I have edited out from the listing above).

In order to email this to you from my Raspberry Pi, I have had to sudo ifconfig wwan0 down.

Cheers,

John

The modem seems to be configured for ECM mode and the correct APN.

Now, start the internet connection using the following command. The response should be OK. If you get ERROR please try the same command again.

AT#ECM=1,0,"","",0

Once the internet is active you should see wwan0 in your internet interface but first open the wwan0 interface: sudo ifconfig wwan0 up

Also if everything is OK, AT#ECM? should return 0,1.

Hi @ensar. I agree, that looks good, thank you very much. But I still cannot connect to the internet through wwan0. Perhaps this has something to do with my ISP? My iPhone connects in roaming mode using 02, from a location right next to the Pi.

Should I be able to ping the Pi from a remote location?

I should add that I know it is possible to connect because with my first attempt at this (I should have stuck with it!) I used PPP and inadvertently downloaded the whole of FFMpeg, causing me to use the data limit set on the SIM.

I also note from my SIM total data usage that this morning (when I was trying to connect) I uploaded 3Kb and downloaded 4Kb. Something therefore is happening. So why can I not connect to the Home page on my browser?

Any help you can give me, again, will be greatly appreciated. But first, have a good weekend!

I’m having the same problem with the same setup (RPi4, Base HAT, Telit LE910C1-NF modem)

OK
AT#USBCFG=4
ERROR
AT#USBCFG?
#USBCFG: 4

OK
AT+CGDCONT?
+CGDCONT: 1,"IP","super","",0,0,0,0
+CGDCONT: 2,"IPV4V6","ims","",0,0,0,0
+CGDCONT: 3,"IPV4V6","sos","",0,0,0,1

OK
AT#ECM=1,0,"","",0                                                              
ERROR                                                                           
AT#ECM?                                                                         
#ECM: 0,1                                                                       
                                                                                
OK

And just in case you need it,

AT+CGMR                                                                         
M0F.260006                                                                      
                                                                                
OK                                                                              
AT#USBCFG?                                                                      
#USBCFG: 4                                                                      
                                                                                
OK                                                                              
AT+CREG?                                                                        
+CREG: 0,5                                                                      
                                                                                
OK                                                                              
AT#ECM?                                                                         
#ECM: 0,1                                                                       
                                                                                
OK                                                                              
+CPIN?                                                                          
+CPIN: READY                                                                    
                                                                                
OK                                                                              
AT+CGDCONT?                                                                     
+CGDCONT: 1,"IP","super","",0,0,0,0                                             
+CGDCONT: 2,"IPV4V6","ims","",0,0,0,0                                           
+CGDCONT: 3,"IPV4V6","sos","",0,0,0,1                                           
                                                                                
OK                                                                              
AT+CSQ                                                                          
+CSQ: 18,3                                                                      
                                                                                
OK

Hi @nik, Did you get it working? I’m up and running now; I think @ensar is right, you have to persist! What I find is, that I cannot have both wwan0 and wlan0 active at the same time. Perhaps this is a misunderstanding on my part, I thought I could just select whichever one I wanted from the desktop at will. But I find, if I want to connect with the modem I need sudo ifconfig wwan0 down and sudo ifconfig wlan0 up, and then do the reverse when I want to use the domestic wifi - which is most of the time, given the costs.
In fact what I really need to do with the Sixfab kit is set up a wifi hotspot, and as I understand it, ECM won’t allow that (can’t get an IP address) so I’m looking to install PPP.

Not yet, thanks for checking. Lots to learn about this still, will keep digging.

Hi @ensar, every time I use the AT#ECM=1,0,"","",0 I’m getting ERROR. What am I missing with this?

@ensar @nik I am running into the exact same problem. Any luck figuring it out?

@dvondle , Follow these steps:

Set USB configuration with AT#USBCFG
AT#USBCFG=4

Set APN with command AT+CGDCONT
AT+CGDCONT=1,”IP”,”super”

Reboot the module
AT#REBOOT

Enable ECM with command AT#ECM
AT#ECM=1,0

Sorry for my horrible English)

Is any additional info about error cause? When I trying to start internet connection (AT#ECM=1,0) i just see “ERROR” without any explanation.

AT#ECM=1,0
ERROR

Would be great to see more details about exception. Here is more detailed info:

AT+CGMR
M0F.670010

OK
AT#USBCFG?
#USBCFG: 4

OK
AT+CREG?
+CREG: 0,0

OK
AT#ECM?
#ECM: 0,0

AT+CPIN?
+CPIN: READY

OK
AT+CGDCONT?
+CGDCONT: 1,"IP","internet","",0,0,0,0
+CGDCONT: 2,"IPV4V6","ims","",0,0,0,0
+CGDCONT: 3,"IPV4V6","sos","",0,0,0,1

OK
AT+CSQ
+CSQ: 99,99

OK

I was used apn “internet” for previous LTE modem and it works well.

Can any “debug” mode enabled to understand what happens here?

I must mention that is no any antennas connected, I just experimenting with it. Maybe modem NEED antenna in my current environment, but how I would know it? I expect in such case something like “Cannot connect to provider” or similar. But nothing :frowning:

Hi @anikkhoma ,

The antenna is absolutely essential for connection. Everything you need is in the Cellular Modem Kit.
Also, to see more descriptive error replies please type AT+CMEE=2.

Thank you for super quick reply!

AT+CMEE=2 already set, I see this command from previous posts in this thread.
Ok, will try with antennas later, hope it will work.

Hi @ensar, think you could help me out? I’m having a similar issue where AT#ECM=1,0 returns a non-verbose error and I have no data connection. Here is the info you request further up in this thread prior to the AT#ECM=1,0 command.

AT+CMEE=2
OK
AT+CGMR
M0F.660006

OK
AT#USBCFG?
#USBCFG: 4

OK
AT+CREG?
+CREG: 0,1

OK
AT#ECM?
#ECM: 0,0

OK
AT+CPIN?
+CPIN: READY

OK
AT+CGDCONT?
+CGDCONT: 1,"IPV4V6","NXTGENPHONE","",0,0,0,0
+CGDCONT: 2,"IPV4V6","ims","",0,0,0,0
+CGDCONT: 3,"IPV4V6","sos","",0,0,0,1

OK
AT+CSQ
+CSQ: 17,3

Here is my set up process for CDC_ECM with an att sim

AT#USBCFG=4
AT+CGDCONT=1,"IPV4V6","NXTGENPHONE"
AT#ECM=1,0

Here is what I’m seeing after the AT#ECM=1,0 command

AT#ECM?
#ECM: 0,0

OK
AT#ECM=1,0
ERROR
AT#ECM?
#ECM: 0,1

Hi @AShriki

You have a version of SW that is affected by the AT&T 3G Sunset change. Please check out the AT&T sunset guide:

1 Like

Thanks ensar, this helped me to solve the issue. my boot up sequence ended up being
AT#USBCFG=4
AT+CEMODE=2
AT+CGDCONT=1,“IP”,""
AT+CGATT=0
AT+CGCLASS=CG
AT+CFUN=1,1
AT#ECM=1,0