Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    Anyone try Soracom LTE-M?

    Scheduled Pinned Locked Moved Discussion
    ltesimhologramsoracomthingsmobile
    5 Posts 3 Posters 745 Views 4 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R Offline
      reidfo
      last edited by reidfo

      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?

      1 Reply Last reply Reply Quote 2
      • R Offline
        reidfo
        last edited by

        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

        1 Reply Last reply Reply Quote 0
        • S Offline
          svonbentzel
          last edited by

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

          1 Reply Last reply Reply Quote 0
          • J Offline
            JABarrett85
            last edited by

            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()
            
            R 1 Reply Last reply Reply Quote 1
            • R Offline
              reidfo @JABarrett85
              last edited by

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

              1 Reply Last reply Reply Quote 0

              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
              • 1 / 1
              • First post
                Last post

              Pycom on Twitter

              Pycom