RAK5680 Hologram_Ping_LTE Issue

Hi, I am using a RAK4631 with a RAK5680 module. I attached the LTE antenna to the RAK5680 module and inserted a Hologram nano sim card into the RAK5680 module. Additionally, I activated the SIM card through the Hologram dashboard to work for LTE. I also connected a 3.7V lipo battery to the Rak baseboard while the baseboard is also pluggged in via USB to my laptop (I get the same issue when the LiPo battery is connected and not connected).

Using this example code: WisBlock/examples/common/communications/Cellular/RAK5860_BG77_Module/Hologram_Ping_LTE/Hologram_Ping_LTE.ino at master · RAKWireless/WisBlock · GitHub
My code gets stuck in this loop and never exits:

  Serial.println("Waiting for registration");
  do 
  {
    reg=false;
    bg_timeout = bg_at("AT+CREG?",2000);
    if ( bg_timeout == false )
    {
        Serial.println("bg_timeout == false");
        int v =  bg_rsp.indexOf('0,');
        if ( v > 0 )
        {
          Serial.println("v > 0");
          Serial.println(v);
          if ( bg_rsp[v+1] == '5' )
          {
            reg = true;
            Serial.println("Registered: Roaming");
          } 
          else if ( bg_rsp[v+1] == '1' )
          {
            reg = true;
            Serial.println("Registered: Home");
          }
      
        } 
    }
      
    delay(200);
     
  } while (!reg);

I added print statements and the value of ‘v’ is 19. I am wondering if anyone has any advice on ways to try to debug this issue or if anyone has any ideas on what the issue may be.

Hi @Dhruv ,

I have no LTE-M/NB-IoT connectivity here in my place. Maybe you can check first if Hologram has support in your region/country. It has limited support to LTE-M and NB-IoT. Check coverage here.

Also, maybe it is a good thing to connect first via direct AT commands using unvarnished mode code.

Thanks, my location is covered by Hologram.

Why do you suggest to connect first via direct AT commands using unvarnished mode code? The first few AT commands work successfully in the Hologram_Ping_LTE code, it’s just the line: bg_timeout = bg_at(“AT+CREG?”,2000); that seems to be stalling while the module is waiting for registration.

Hello @Dhruv

the example works for me (albeit with a 1nce SIM card and modified APN).

How does the green LED blink?

The green LED of my BG77 is mostly off (with short on times) while searching and once it has registered to the network the pattern is inverted: the green LED then is mostly on (with short off times).

Thanks
Felix

Hi Felix,

Interestingly, today I got the registration for the Hologram_Ping_LTE code working and my serial monitor printed “Registered: Roaming” (although in the later steps of the code, sometimes it failed pinging 3 times while never received a ping and then another time it was able to receive a ping).

However, when I reset my RAK device with the same code, the registration tends to repeatedly fail and I am rarely able to get past the registration phase of the code.

What happens during registration is the device receives “+CREG: 0,3” from the module a few times, then it receives “+CREG: 0,2” for a while, then it receives “+CREG: 0,0” for a while (I used this link to decode the meanings of those responses). Sometimes the green LED is mostly on and sometimes the green LED is mostly off (usually the green LED is mostly off when it is unable to connect). When the device is connected, the green LED is always mostly on.

My main concern is why the “Registered: Roaming” case is so inconsistent, I would like to be able to get past “Waiting for registration” loop more often. Also, I am similarly wondering why the pings work properly in some cases, but not in other cases.

Hello @Dhruv

when BG77 has registered successfully once it will try to use the same data (provider, channel, etc.) the next time it is powered up to speed up things. (And only when that fails, it will start to search again.)

That said, what I found is BG77 is exactly doing this, however the AT command to set the mode to LTE-M (the other mode being NB-IoT) does initiate a fresh search. (Even if the mode hasn’t changed.)

So if I comment out the block setting the mode (see here) BG77 reconnects very quickly for me.

As for the ping failing often: the ping command first needs to resolve the domain name into an IP address (DNS). And DNS can take quite some time. According to the documentation the AT ping command has a maximum response time of 300 seconds. (The example code waits for 5 seconds only.) So, I increased the timeout to 20 seconds and the ping success rate improved quite a bit. Alternatively you could try to ping a different domain name or directly use an IP address instead.

Thanks
Felix

1 Like

LTE antenna to the RAK5680 module and inserted a Hologram nano SIM, which I activated on the Hologram dashboard for LTE use. Power is being supplied via a 3.7V LiPo battery connected to the baseboard, but the issue persists whether or not the battery is connected. The baseboard is also plugged into my laptop via USB.

Ensure that the RAK5860 module supports the bands used by the LTE network in your area. Some networks may not support the specific modem or bands.