GPy with Hologram.io SIM
-
CAT M1 Test - V0.1 OK OK OK OK OK -- Scan options ------------------------------------------- | . Init Stored info use : true | . Init MRU freq use : true | . Init REG freq use : false | . Init FastScan use : true | . Init iterative band scan : false | . Init scan batch of freq : false | . Init hybrid 1 mode : false | . Init optim SIB rx : true | . Forced freq : false | . MRU cell use : true ----------------------------------------------------------- -- Scan Command config ---------------------------------------------------- | id | type | object | --------------------------------------------------------------------------- | 1 | BAND | (id:1) 4,13 | | 2 | DELAY | 5000 msec | | 3 | LOOP | jump to cmd:1, dur:5000ms | --------------------------------------------------------------------------- OK DL SYNCHRO STATISTICS ===================== Synchro state : IDLE PPU SIB1 ACQ watchdog : 0 Frequency Hypothesis RF (Hz) : 0 RSRP (dBm) : -21474836.00 RSRQ (dB) : -12.79 Channel estimation state (Cell-spec.) : LOW CINR Channel estimation state (UE-spec.) : LOW CINR Channel estimation state (MBSFN) : LOW CINR Channel estimation CINR : 0.00 Channel length : SHORT AGC AGC RX gain (dB) : 44.55 RX PSD BO (dBFs) : -21.06 RX PSD (dBm) : -85.55 Noise level RS (dBm) : -86.52 Digital gain (dB) : 6.53 CINR RS (dB) : 2.09 NARROWBANDS Last DL NB : Central Last UL NB : 0 AFC Frequency offset RF (Hz) : -359 Frequency offset BB (Hz) : 0 PBCH MIB received quantity : 83 MIB timeout quantity : 0 OK SYSTEM FSM ========== +--------------------------+--------------------+ | FSM | STATE | +--------------------------+--------------------+ | RRC TOP FSM |STOPPED | | RRC SEARCH FSM |NULL | | RRC ACTIVE FSM |NULL | | PMM PLMN FSM |NULL | | EMM MAIN FSM |NULL | | EMM AUTH FSM |NULL | | EMM CONN FSM |NULL | | EMM TAU FSM |NULL | | EMM TEST FSM |NULL | | ESM BEARER FSM |BEARER_NULL | | SMS MT FSM |IDLE | | SMS MO FSM |IDLE | | HP MAIN FSM |IDLE | | HP USIM FSM |NULL | | HP SMS MO FSM |IDLE | | HP SMS MT FSM |IDLE | | HP CAT FSM |NULL | +--------------------------+--------------------+ OK +CEREG: 2,0 OK DL SYNCHRO STATISTICS ===================== Synchro state : IDLE PPU SIB1 ACQ watchdog : 0 Frequency Hypothesis RF (Hz) : 0 RSRP (dBm) : -21474836.00 RSRQ (dB) : -12.79 Channel estimation state (Cell-spec.) : LOW CINR Channel estimation state (UE-spec.) : LOW CINR Channel estimation state (MBSFN) : LOW CINR Channel estimation CINR : 0.00 Channel length : SHORT AGC AGC RX gain (dB) : 44.55 RX PSD BO (dBFs) : -21.06 RX PSD (dBm) : -85.55 Noise level RS (dBm) : -86.52 Digital gain (dB) : 6.53 CINR RS (dB) : 2.09 NARROWBANDS Last DL NB : Central Last UL NB : 0 AFC Frequency offset RF (Hz) : -359 Frequency offset BB (Hz) : 0 PBCH MIB received quantity : 83 MIB timeout quantity : 0 OK SYSTEM FSM ========== +--------------------------+--------------------+ | FSM | STATE | +--------------------------+--------------------+ | RRC TOP FSM |STOPPED | | RRC SEARCH FSM |NULL | | RRC ACTIVE FSM |NULL | | PMM PLMN FSM |NULL | | EMM MAIN FSM |NULL | | EMM AUTH FSM |NULL | | EMM CONN FSM |NULL | | EMM TAU FSM |NULL | | EMM TEST FSM |NULL | | ESM BEARER FSM |BEARER_NULL | | SMS MT FSM |IDLE | | SMS MO FSM |IDLE | | HP MAIN FSM |IDLE | | HP USIM FSM |NULL | | HP SMS MO FSM |IDLE | | HP SMS MT FSM |IDLE | | HP CAT FSM |NULL | +--------------------------+--------------------+ OK +CEREG: 2,0 -
@tlanier said in GPy with Hologram.io SIM:
RRC TOP FSM |STOPPED
Can you leave it for a minute or so please. You should see this changing to SCANNING but it's not immediate, it's done in cycles. Thanks.
-
Looks like mine just needed to cycle a few more times as well, just got this:
+CEREG: 2,5,"CC14","031D4803",7
-
That's great! 2,5 is what we want for Hologram (5 means attached as roaming)
So does the
while not lte.isattached():loop finish correctly then and move to the connection step - which means PPP is established?lte.connect() while not lte.isconnected(): time.sleep(1) print("Connected!") -
Mine has been running for about 10 minutes returning:
+CEREG: 2,0
My cell phone uses Verizon and it shows a strong 3 bar signal.
I'm going to try powering down and back up to see if that will help.
-
After power off/on I'm now getting +CEREG: 2,4
It never gets the 2,5 you mentioned after 10 mins.
DL SYNCHRO STATISTICS
Synchro state : MIB DETECT PPU SIB1 ACQ watchdog : 0 Frequency Hypothesis RF (Hz) : -1000 RSRP (dBm) : -21474836.00 RSRQ (dB) : -25.99 Channel estimation state (Cell-spec.) : LOW CINR Channel estimation state (UE-spec.) : LOW CINR Channel estimation state (MBSFN) : LOW CINR Channel estimation CINR : 0.00 Channel length : SHORTAGC
AGC RX gain (dB) : 54.90
RX PSD BO (dBFs) : -21.71
RX PSD (dBm) : -95.99
Noise level RS (dBm) : -124.46
Digital gain (dB) : 6.62
CINR RS (dB) : -16.11
NARROWBANDS
Last DL NB : Central
Last UL NB : 0
AFC
Frequency offset RF (Hz) : 47
Frequency offset BB (Hz) : 0
PBCH
MIB received quantity : 1394
MIB timeout quantity : 0OK
SYSTEM FSM
+--------------------------+--------------------+ | FSM | STATE | +--------------------------+--------------------+ | RRC TOP FSM |SCANNING | | RRC SEARCH FSM |WAIT_CELL_ID | | RRC ACTIVE FSM |NULL | | PMM PLMN FSM |ANY_WAITCELL | | EMM MAIN FSM |NULL | | EMM AUTH FSM |NULL | | EMM CONN FSM |NULL | | EMM TAU FSM |NULL | | EMM TEST FSM |NULL | | ESM BEARER FSM |BEARER_NULL | | SMS MT FSM |IDLE | | SMS MO FSM |IDLE | | HP MAIN FSM |IDLE | | HP USIM FSM |ABSENT | | HP SMS MO FSM |IDLE | | HP SMS MT FSM |IDLE | | HP CAT FSM |NULL | +--------------------------+--------------------+OK
+CEREG: 2,4
OK
DL SYNCHRO STATISTICS
Synchro state : CELL SEARCH PPU SIB1 ACQ watchdog : 0 Frequency Hypothesis RF (Hz) : -1000 RSRP (dBm) : -21474836.00 RSRQ (dB) : -25.99 Channel estimation state (Cell-spec.) : LOW CINR Channel estimation state (UE-spec.) : LOW CINR Channel estimation state (MBSFN) : LOW CINR Channel estimation CINR : 0.00 Channel length : SHORTAGC
AGC RX gain (dB) : 54.87
RX PSD BO (dBFs) : -21.44
RX PSD (dBm) : -96.46
Noise level RS (dBm) : -126.46
Digital gain (dB) : 10.13
CINR RS (dB) : -16.11
NARROWBANDS
Last DL NB : Central
Last UL NB : 0
AFC
Frequency offset RF (Hz) : 70
Frequency offset BB (Hz) : 0
PBCH
MIB received quantity : 1422
MIB timeout quantity : 0OK
SYSTEM FSM
+--------------------------+--------------------+ | FSM | STATE | +--------------------------+--------------------+ | RRC TOP FSM |SYNCING | | RRC SEARCH FSM |WAIT_SYNC | | RRC ACTIVE FSM |NULL | | PMM PLMN FSM |ANY_WAITCELL | | EMM MAIN FSM |NULL | | EMM AUTH FSM |NULL | | EMM CONN FSM |NULL | | EMM TAU FSM |NULL | | EMM TEST FSM |NULL | | ESM BEARER FSM |BEARER_NULL | | SMS MT FSM |IDLE | | SMS MO FSM |IDLE | | HP MAIN FSM |IDLE | | HP USIM FSM |ABSENT | | HP SMS MO FSM |IDLE | | HP SMS MT FSM |IDLE | | HP CAT FSM |NULL | +--------------------------+--------------------+OK
+CEREG: 2,4
OK
DL SYNCHRO STATISTICS
Synchro state : IDLE PPU SIB1 ACQ watchdog : 1 Frequency Hypothesis RF (Hz) : -1000 RSRP (dBm) : -21474836.00 RSRQ (dB) : -25.99 Channel estimation state (Cell-spec.) : LOW CINR Channel estimation state (UE-spec.) : LOW CINR Channel estimation state (MBSFN) : LOW CINR Channel estimation CINR : 0.00 Channel length : SHORTAGC
AGC RX gain (dB) : 54.87
RX PSD BO (dBFs) : -21.78
RX PSD (dBm) : -98.39
Noise level RS (dBm) : -126.46
Digital gain (dB) : 9.05
CINR RS (dB) : -16.11
NARROWBANDS
Last DL NB : Central
Last UL NB : 0
AFC
Frequency offset RF (Hz) : 43
Frequency offset BB (Hz) : 0
PBCH
MIB received quantity : 1429
MIB timeout quantity : 0OK
SYSTEM FSM
+--------------------------+--------------------+ | FSM | STATE | +--------------------------+--------------------+ | RRC TOP FSM |INITIAL | | RRC SEARCH FSM |INITIAL | | RRC ACTIVE FSM |NULL | | PMM PLMN FSM |PARKING | | EMM MAIN FSM |NULL | | EMM AUTH FSM |NULL | | EMM CONN FSM |NULL | | EMM TAU FSM |NULL | | EMM TEST FSM |NULL | | ESM BEARER FSM |BEARER_NULL | | SMS MT FSM |IDLE | | SMS MO FSM |IDLE | | HP MAIN FSM |IDLE | | HP USIM FSM |ABSENT | | HP SMS MO FSM |IDLE | | HP SMS MT FSM |IDLE | | HP CAT FSM |NULL | +--------------------------+--------------------+OK
+CEREG: 2,4
OK
DL SYNCHRO STATISTICS
Synchro state : IDLE PPU SIB1 ACQ watchdog : 1 Frequency Hypothesis RF (Hz) : -1000 RSRP (dBm) : -21474836.00 RSRQ (dB) : -25.99 Channel estimation state (Cell-spec.) : LOW CINR Channel estimation state (UE-spec.) : LOW CINR Channel estimation state (MBSFN) : LOW CINR Channel estimation CINR : 0.00 Channel length : SHORTAGC
AGC RX gain (dB) : 54.87
RX PSD BO (dBFs) : -21.78
RX PSD (dBm) : -98.39
Noise level RS (dBm) : -126.46
Digital gain (dB) : 9.05
CINR RS (dB) : -16.11
NARROWBANDS
Last DL NB : Central
Last UL NB : 0
AFC
Frequency offset RF (Hz) : 43
Frequency offset BB (Hz) : 0
PBCH
MIB received quantity : 1429
MIB timeout quantity : 0OK
SYSTEM FSM
+--------------------------+--------------------+ | FSM | STATE | +--------------------------+--------------------+ | RRC TOP FSM |INITIAL | | RRC SEARCH FSM |INITIAL | | RRC ACTIVE FSM |NULL | | PMM PLMN FSM |PARKING | | EMM MAIN FSM |NULL | | EMM AUTH FSM |NULL | | EMM CONN FSM |NULL | | EMM TAU FSM |NULL | | EMM TEST FSM |NULL | | ESM BEARER FSM |BEARER_NULL | | SMS MT FSM |IDLE | | SMS MO FSM |IDLE | | HP MAIN FSM |IDLE | | HP USIM FSM |ABSENT | | HP SMS MO FSM |IDLE | | HP SMS MT FSM |IDLE | | HP CAT FSM |NULL | +--------------------------+--------------------+OK
+CEREG: 2,4
OK
DL SYNCHRO STATISTICS
Synchro state : IDLE PPU SIB1 ACQ watchdog : 1 Frequency Hypothesis RF (Hz) : -1000 RSRP (dBm) : -21474836.00 RSRQ (dB) : -25.99 Channel estimation state (Cell-spec.) : LOW CINR Channel estimation state (UE-spec.) : LOW CINR Channel estimation state (MBSFN) : LOW CINR Channel estimation CINR : 0.00 Channel length : SHORTAGC
AGC RX gain (dB) : 54.87
RX PSD BO (dBFs) : -21.78
RX PSD (dBm) : -98.39
Noise level RS (dBm) : -126.46
Digital gain (dB) : 9.05
CINR RS (dB) : -16.11
NARROWBANDS
Last DL NB : Central
Last UL NB : 0
AFC
Frequency offset RF (Hz) : 43
Frequency offset BB (Hz) : 0
PBCH
MIB received quantity : 1429
MIB timeout quantity : 0OK
SYSTEM FSM
+--------------------------+--------------------+ | FSM | STATE | +--------------------------+--------------------+ | RRC TOP FSM |INITIAL | | RRC SEARCH FSM |INITIAL | | RRC ACTIVE FSM |NULL | | PMM PLMN FSM |PARKING | | EMM MAIN FSM |NULL | | EMM AUTH FSM |NULL | | EMM CONN FSM |NULL | | EMM TAU FSM |NULL | | EMM TEST FSM |NULL | | ESM BEARER FSM |BEARER_NULL | | SMS MT FSM |IDLE | | SMS MO FSM |IDLE | | HP MAIN FSM |IDLE | | HP USIM FSM |ABSENT | | HP SMS MO FSM |IDLE | | HP SMS MT FSM |IDLE | | HP CAT FSM |NULL | +--------------------------+--------------------+OK
+CEREG: 2,4
-
@tlanier
Maybe Cat M1 coverage in your area just isn’t very good yet, Verizon only uses one band (band 13) for Cat M1 while on mobile phones they support more. -
Do you know if Verizon publishes a coverage map for CAT-M1?
Maybe I should try taking the device to a larger city (Newnan or Atlanta) to see if it works there.
This is what it displays at the start of the test:
CAT M1 Test - V0.1
OK
OK
OK
OK
OK
-- Scan options -------------------------------------------
| . Init Stored info use : true
| . Init MRU freq use : true
| . Init REG freq use : false
| . Init FastScan use : true
| . Init iterative band scan : false
| . Init scan batch of freq : false
| . Init hybrid 1 mode : false
| . Init optim SIB rx : true
| . Forced freq : false
| . MRU cell use : true-- Scan Command config ----------------------------------------------------
| id | type | object || 1 | BAND | (id:1) 4,13 |
| 2 | DELAY | 5000 msec |
| 3 | LOOP | jump to cmd:1, dur:5000ms |OK
-
@jmarcelino no, it still doesn't attach, unfortunately
>>> lte.attach() >>> lte.connect() Traceback (most recent call last): File "<stdin>", line 1, in <module> OSError: modem not attachedDon't want to usurp the other issues that @tlanier is having, but curious to understand why the other steps are necessary. Were those necessary with a Verizon SIM?
-
Hi @chrisgammell ,
Can you try again without calling lte.attach() please?
I'm trying to avoid any wrong/missing assumptions lte.attach() is doing so the code I posted should replace that entire step, if you call lte.attach() again after that you'll effectively undo the parameters we set via custom AT commands and ask the modem to reattach with the problem settings.
If you see "+CEREG: 2,5,... this means the modem is attached and lte.isattached() should return true (even if you didn't use lte.attach()...)
It should then be ready to connect (start the PPP session) via lte.connect()
Being certified by Verizon means we must include a specific configuration for them inside the modem - it's what CID=3 does - which sets everything correctly for them including APN, bands and a lot of other stuff they require... this was done in tight collaboration with them by the modem manufacturer so we don't need these manual configuration steps.
-
@jmarcelino ah, that makes sense. Sorry, I should have explained I tried doing the attach command again after I noted that the lte.connect() function did not function properly. It still throws an error. Here is the entirety of the code I'm using:
import socket import ssl import time from network import LTE def pretty(cmd): response = lte.send_at_cmd(cmd).split('\r\n') for line in response: print(line) lte = LTE() # instantiate the LTE object pretty('AT+CGDCONT=1,"IP","hologram"') pretty('AT+CFUN=0') pretty('AT+SQNCTM="verizon"') pretty('AT+CGDCONT=1,"IP","hologram"') pretty('AT+CEREG=2') pretty('AT+CFUN=1') pretty('AT!="showinit"') while not lte.isattached(): time.sleep(1) pretty('AT!="showphy"') pretty('AT!="fsm"') pretty('AT+CEREG?') lte.connect() while not lte.isconnected(): time.sleep(1) print("Connected!")And I still get the following response:

I believe the connect function isn't working because the modem is still not attached.
-
Ah, and re-reading, I saw I should check on "lte.isattached()" which in my case returns true:

So is the lte.connect() function the problem here Or are there other hints of what I should be trying?
-
Thank you so much @chrisgammell That is really crucial "field" information for us!
From a quick look it seems AT+CGDATA is timing out but maybe we just don't give it enough time to complete. I'll check with our LTE team.
Thanks again
-
Have any conclusions been reached about the connection problem?
Possibilities:
-
Coverage problem?
I've tried in multiple locations in my town of 35,000. We've contacted Verizon and they indicate that CAT-M1 coverage is everywhere that 4G LTE CAT-1 coverage is at. Also, since Chris is in Chicago and is also having trouble leads me to think that coverage is not the problem. Tonight I will take the device to a larger town to see if I have the same connection problem. -
SIM card issue?
Is it possible that the Hologram SIM card is somehow incompatible with the GPy? Would some other SIM card from another vendor possibly work? -
GPy firmware issue?
Is it possible that the GPy has a firmware issue that can be corrected? When we update the firmware to the GPy does that update both the MicroPython firmware and the cell modem firmware also? -
GPy hardware issue?
Is it possible that the GPy isn't compatible with current Verizon CAT-M1 service?
Thanks for any insights you may have concerning the problem.
-
-
@tlanier
I understand you concern but there is no incompatibility with SIMs or hardware issues. The modem has been certified by and works correctly with Verizon and for them (with a Cat M1 SIM) you can just dolte = LTE(carrier=“verizon”)
and everything is setup correctly. For other configurations including MVNOs like Hologram we still need to do some manual tuning on the current modem firmware. This will no doubt improve as certification and firmware work continues.
The modem firmware is separate from the MicroPython code. Currently the only way to update the modem firmware is loading from SD card using this tool: https://github.com/pycom/pycom-libraries/tree/master/lib/sqnsupgrade . This will also be much simplified in the near future.
Regarding your specific case Chris was seeing +CEREG: 2,5 which means the modem actually found and registered on the network, the issue he had was with connect (establishing the PPP session).
However you got +CEREG: 2,4 which means the modem did not find a network to connect, this suggests to me there is coverage issue and it would be interesting to know if you get a different result elsewhere.
-
@jmarcelino said in GPy with Hologram.io SIM:
However you got +CEREG: 2,4 which means the modem did not find a network to connect, this suggests to me there is coverage issue and it would be interesting to know if you get a different result elsewhere.
For what it is worth and not trying to take this off the current topic/carrier. But from my attempts at trying to use my FiPy on Telstra where I am under full coverage, I also get the 2,4 result from CEREG but it will also sometimes connect (for a time before it crashes). I have left my modem in the same spot all day and it appears totally random if I can connect or not. Even when I connect, I will force a disconnect or reboot my FiPy and try and reconnect and next attempt will typically result with a 2,4 from CEREG even though less than 20 seconds earlier I was connected and sending JSON data off to my server.
-
@nathanh I got it to connect to Telstra thanks to @micksta and his other post. But it breaks after that. I would suggest to @tlanier to configure the LTE with some commands, otherwise it does not know what to do. See the code below (modification of @micksta 's):
[sorry about the format, the "Insert Code Block" button does not work for me] Edit: thanks @tlanier I fixed it.
#import os #os.mkfs('/flash') import time import socket import gc from network import LTE import ssl def send_at_cmd_pretty(cmd): response = lte.send_at_cmd(cmd).split('\r\n') for line in response: print(line) print('Starting LTE...') lte = LTE() # instantiate LTE object print('LTE instantiated') time.sleep(4.0) if lte.isattached(): #important, otherwise it can get stuck lte.disconnect() lte.dettach() print("LTE was still attached. Disconnecting it.") lte.reset() print ('LTE has been reset') time.sleep(5.0) send_at_cmd_pretty('AT+CGDCONT=1,"IP","telstra.internet"') print ('APN set') time.sleep(1.0) send_at_cmd_pretty('AT!="addscanfreq band=28 dl-earfcn=9410"') # lte frequency band - from forum print ('Chose frequency band') time.sleep(1.0) send_at_cmd_pretty('AT+CFUN=1') # Set the full functionality mode with a complete software reset print ('Writing configuration...') time.sleep(1.0) print('LTE initialised') #show wireless parameters send_at_cmd_pretty('AT!="showphy"') # get the PHY status send_at_cmd_pretty('AT!="fsm"') # get the System FSM print("Attaching...") lte.attach() # attach the cellular modem to a base station while not lte.isattached(): time.sleep(0.25) print ('Attached!') print("Connecting...") lte.connect() # start a data session and obtain an IP address while not lte.isconnected(): time.sleep(0.25) print ('Connected!') #LTE Connection established print("LTE is working") s = socket.socket() addr_info = socket.getaddrinfo('httpbin.org', 80) addr = addr_info[0][-1] print(addr) s.connect(addr) print("socket is ready") s.send(b"GET / HTTP/1.0\r\n\r\n") print(b"GET / HTTP/1.0\r\n\r\n") print("Sent GET request") print(s.recv(4096)) print("Received something") lte.disconnect() lte.dettach() s.close() gc.collect() -
@tealbrains said in GPy with Hologram.io SIM:
Thanks for the input.
I think the trick to get the code to be properly formatted is to surround it with with three back-ticks (key to left of the "1" key). See a better description at (https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet) under the section titled "Code and Syntax Highlighting".
Looking at your code I'm not sure what I should use for the send_at_cmd_pretty('AT!="addscanfreq band=28 dl-earfcn=9410"') command. That looks like a region specific setting.
-
One interesting piece of information is that the AT+CFUN=0 or AT_CFUN=1 commands do not return an "OK" response from the modem. The commands configure the control of the LED according to the manual.
-
@nathanh said in GPy with Hologram.io SIM:
For what it is worth and not trying to take this off the current topic/carrier. But from my attempts at trying to use my FiPy on Telstra where I am under full coverage, I also get the 2,4 result from CEREG but it will also sometimes connect (for a time before it crashes).
For Telstra/Australia you need to set the correct EARFCN (with 'AT!="addscanfreq band=28 dl-earfcn=9410"'). For the US the modem knows the Verizon network already so you don't need to.
@tlanier said in GPy with Hologram.io SIM:
One interesting piece of information is that the AT+CFUN=0 or AT_CFUN=1 commands do not return an "OK" response from the modem. The commands configure the control of the LED according to the manual.
I'm not sure which manual you're following but on the one we provide CFUN is definitely used to enable/disable the radio: see "2.4 Set Phone Functionality: +CFUN:".
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login