Anyone try Soracom LTE-M?



  • I just purchased a few Soracom SIM cards to test on the GPy after not being satisfied with connectivity on ThingsMobile (won't connect to Verizon in the US, unresponsive support). Has anyone else tried Soracom?



  • @JABarrett85 Thanks. Are you using CAT-M1 or NB-IoT? I couldn't tell from Soracom's website which they supported.



  • I have a Soracom SIM in Japan with KDDI as the provider, after a lot of trial and error I was able to get the service to connect - Soracom expects username and password authentication to connect which the built-in LTE function doesn't provide. If it helps with testing my successful code for KDDI is as follows (you should just need to change the band numbers):

    import time
    from machine import RTC
    from network import LTE
    import pycom
    
    NTP_SERVER = "au.pool.ntp.org"
    
    # Need to use global variables.
    # If in each function you delare a new reference, functionality is broken
    lte = LTE()
    rtc = RTC()
    
    pycom.heartbeat(False)
    
    def send_at_cmd_pretty(cmd):
        response = lte.send_at_cmd(cmd).split('\r\n')
        for line in response:
            print(line)
    
    # Returns a network.LTE object with an active Internet connection.
    def getLTE():
    
        # If already used, the lte device will have an active connection.
        # If not, need to set up a new connection.
        if lte.isconnected():
            return lte
    
        # Modem does not connect successfully without first being reset.
        print("Resetting LTE modem ... ", end='')
        lte.send_at_cmd('AT^RESET')
        print("OK")
        time.sleep(5)
        lte.send_at_cmd('AT+CFUN=0')
        time.sleep(5)
    
        #send_at_cmd_pretty('AT!="fsm"')
        # While the configuration of the CGDCONT register survives resets,
        # the other configurations don't. So just set them all up every time.
        print("Configuring LTE ", end='')
        lte.send_at_cmd('AT!="clearscanconfig"')
        print(".", end='')
        lte.send_at_cmd('AT!="RRC::addScanBand band=26"')
        print(".", end='')
        lte.send_at_cmd('AT!="RRC::addScanBand band=18"')
        print(".", end='')
        lte.send_at_cmd('AT+CGDCONT=1,"IP","soracom.io"')
        print(".", end='')
        lte.send_at_cmd('AT+CGAUTH=1,1,"sora","sora"')
        print(".", end='')
        lte.send_at_cmd('AT+CFUN=1')
        print(" OK")
    
        # If correctly configured for carrier network, attach() should succeed.
        if not lte.isattached():
            print("Attaching to LTE network ", end='')
            lte.attach()
            while(True):
                if lte.isattached():
                    #send_at_cmd_pretty('AT+COPS?')
                    print(" OK")
                    time.sleep(5)
                    break
                print('.', end='')
                pycom.rgbled(0x0f0000)
                time.sleep(0.5)
                pycom.rgbled(0x000000)
                time.sleep(1.5)
    
        # Once attached, connect() should succeed.
        if not lte.isconnected():
            print("Connecting on LTE network ", end='')
            lte.connect()
            while(True):
                if lte.isconnected():
                    print(" OK")
                    break
                print('.', end='')
                time.sleep(1)
    
        # Once connect() succeeds, any call requiring Internet access will
        # use the active LTE connection.
        return lte
    
    # Clean disconnection of the LTE network is required for future
    # successful connections without a complete power cycle between.
    def endLTE():
    
        print("Disonnecting LTE ... ", end='')
        lte.disconnect()
        print("OK")
        time.sleep(1)
        print("Detaching LTE ... ", end='')
        lte.dettach()
        print("OK")
    
    # Sets the internal real-time clock.
    # Needs LTE for Internet access.
    def setRTC():
    
        # Ensures LTE session is connected before attempting NTP sync.
        lte = getLTE()
    
        print("Updating RTC from {} ".format(NTP_SERVER), end='')
        rtc.ntp_sync(NTP_SERVER)
        while not rtc.synced():
            print('.', end='')
            time.sleep(1)
        print(' OK')
    
    # Only returns an RTC object that has already been synchronised with an NTP server.
    def getRTC():
    
        if not rtc.synced():
            setRTC()
    
        return rtc
    
    # Program starts here.
    try:
        print("Initially, the RTC is {}".format("set" if rtc.synced() else "unset"))
        rtc = getRTC()
        while(True):
            print("RTC is {}".format(rtc.now() if rtc.synced() else "unset"))
            pycom.rgbled(0x000f00)
            time.sleep(0.5)
            pycom.rgbled(0x000000)
            time.sleep(4.5)
    except Exception:
        pass # do nothing on error
    
    finally:
        endLTE()
    


  • Hello, I have the same issue, can you please share your code for Thingsmobile? many Thanks !



  • Update: I got my Soracom SIM cards today, and so far have had no luck getting them to attach to the network. I can see an available carrier (Verizon) but can't attach to the network. I'm having a different issue in which on my dev devices I can only see and attach to Verizon (I'm in the southern US). Strangely, the devices I have in the field will all only attach to AT&T. I haven't figured out why. Anyway, I'll keep trying Soracom and any other operators that look promising and provide updates here.

    So far:
    Hologram: successful connection via Verizon only (because of the above problem only seeing Verizon as an available carrier with AT+COPS=?).

    ThingsMobile: successful connection via AT&T only (will not connect to Verizon, TM support has not been helpful)

    Soracom: No successful connection so far



Pycom on Twitter