Should the Pycom GPy using a Hologram SIM card work today with LTE CAT-M1 in the US (Georgia)?
I’m trying to run their example app listed below and the program never gets past the “attach to cell network” stage.
import socket
import ssl
import time
from network import LTE
print("CAT M1 Test - V0.1")
lte = LTE() # instantiate the LTE object
lte.attach() # attach the cellular modem to a base station
i = 0
while not lte.isattached():
i = i + 1
print("not attached: {}".format(i))
time.sleep(0.25)
lte.connect() # start a data session and obtain an IP address
i = 0
while not lte.isconnected():
i = i + 1
print("not connected: {}".format(i))
time.sleep(0.25)
s = socket.socket()
s = ssl.wrap_socket(s)
s.connect(socket.getaddrinfo('www.google.com', 443)[0][-1])
s.send(b"GET / HTTP/1.0\r\n\r\n")
print(s.recv(4096))
s.close()
lte.disconnect()
lte.dettach()
We have a few boards here, we’ll give your code a shot. We have some other Cat M1 hardware that has been working with our SIM card, but not the PyCom stuff yet. We’ll let you know how it goes with ours!
Here’s updated code recommended by the Pycom forum. Attach still does not work.
import pycom
import socket
import ssl
import time
from network import LTE
def send_at_cmd_pretty(cmd):
response = lte.send_at_cmd(cmd).split('\r\n')
for line in response:
print(line)
print("CAT M1 Test - V0.1")
pycom.heartbeat(False)
lte = LTE() # instantiate the LTE object
send_at_cmd_pretty('AT+CGDCONT=1,"IP","hologram"')
lte.attach() # attach the cellular modem to a base station
i = 0
while not lte.isattached():
i = i + 1
print("not attached: {}".format(i))
if (i % 2 == 0):
pycom.rgbled(0xFF0000) # Red
else:
pycom.rgbled(0x000000) # off
time.sleep(0.25)
lte.connect() # start a data session and obtain an IP address
i = 0
while not lte.isconnected():
i = i + 1
print("not connected: {}".format(i))
if (i % 2 == 0):
pycom.rgbled(0x00FF00) # Green
else:
pycom.rgbled(0x000000) # off
time.sleep(0.25)
pycom.rgbled(0x0000FF) # Blue
s = socket.socket()
s = ssl.wrap_socket(s)
s.connect(socket.getaddrinfo('www.google.com', 443)[0][-1])
s.send(b"GET / HTTP/1.0\r\n\r\n")
print(s.recv(4096))
s.close()
lte.disconnect()
lte.dettach()
pycom.rgbled(0x000000) # off
So I modified their code to allow arbitrary AT commands from the REPL:
import socket
import ssl
import time
from network import LTE
def send_at_cmd_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"')
This shows that my signal level is not good. I’m still trying to figure out their AT command set as it’s slightly different than what I’m used to (our products mostly use uBlox modems which have some crossover), but maybe give this a shot in the meantime?
We have contacted the Verizon Open Development HelpDesk @ 800-525-0481 and they indicate that our Hologram SIM is not a valid SIM on their network. Is it possible that there is something I am not doing to properly activate the SIM on the Verizon network? We are unable to attach to the Verizon network using the Pycom GPy using CAT-M1.
Hi @tlanier - Thanks for reaching out. As your SIM and connectivity provider, Hologram is the point of contact for devices on our platform. While we partner with operators globally, depending on who you talk to they may not have direct records of the SIMs on our network. If you send over your SIM # to success@hologram.io our network ops team can check if it’s been properly activated for LTE CAT-M1 access.
As for connecting with the Pycom GPy, our team’s escalated that with Pycom directly to get more information as we’ve had other reports of potential issues with how the board is translating commands to the modem. Hope to get Pycom boards up on Cat-M1 like our Nova R404’s soon too! Our DevRel team is actually working on a tut as well for this so stay tuned.