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

    New Pybytes firmware 1.18.1.r9 (Experimental LTE support)

    Scheduled Pinned Locked Moved Announcements & News
    beta
    10 Posts 4 Posters 1.7k Views 5 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.
    • X Offline
      Xykon administrators
      last edited by Xykon

      Hello everyone,

      I have now released a new Pybytes firmware version 1.18.1.r9

      This fixes the issue reported here, however I noticed that data sent via LoRa currently doesn't seem to display correctly. I'll ask the Pybytes team to look into this tomorrow.

      It is now possible to enable ssl with a single command (for WiFi and LTE connections):

      pybytes.enable_ssl()

      After a reset, this will automatically create the pycom-ca.pem file if it does not already exist in /flash/cert.

      Experimental LTE support (Please make sure your modem is updated to the latest CAT-M1 or NB-IoT firmware as Pybytes may not work with older versions):

      To enable connectivity via LTE, you need to manually update the configuration to connect via LTE. If you have not already, first set up your device using WiFi and then use the following to connect via LTE:

      The first step is to configure the LTE connection parameters. There are 5 parameters, depending on your connection:

      carrier: If you use a carrier for which auto-configuration is available (ex: Verizon), you just need to set this
      band: If you did not configure a carrier, it is highly suggested that you specify the band used by the network you are trying to reach. Scanning through all enabled bands can take a very long time.
      cid: is a Connection ID. This is carrier specific, for Verizon use cid=3. Most other operators use cid=1 which is the default
      apn: Some operators require that you specify an APN name.
      reset: If set True this will reset the modem when disconnecting

      Some configuration examples:

      Verizon: pybytes.set_config('lte', { "carrier": "verizon", "cid": 3 })
      CAT-M1 band 13: pybytes.set_config('lte', { "band": 13})
      NB-IoT band 20: pybytes.set_config('lte', { "band": 20, "apn": "default.mnc001.mcc001.gprs", "reset": True})

      After setting the LTE parameters, you need to tell Pybytes to use the LTE connection. You can either use just the LTE connection:

      pybytes.set_config('network_preferences', ["lte"])

      Or you can configure multiple network connections. For example, when using pybytes.set_config('network_preferences', ["wifi", "lte"]), Pybytes will attempt to connect via WiFi first and fall back to LTE if the WiFi network is out of range.

      You can check your configuration with pybytes.print_config()

      To activate the new configuration, restart your device.

      Update:

      I also added some debugging features to Pybytes that are especially useful when tryout out LTE.
      To activate this please use the following:

      import pycom
      pycom.nvs_set('pybytes_debug', 1)
      

      You can set various debug levels from 0 (some warnings) to 6 (currently the highest being used).

      Christian Ehlers

      1 Reply Last reply Reply Quote 0
      • E Offline
        Eric Waai
        last edited by Eric Waai

        @Xykon
        Hi
        nice update one question.
        if i want to add a fipy in pybytes i can't add the LTE-m as network connection.

        as far i can read i have to do it manually, is this optoin to automate this coming to pybytes.

        i'm also quite unfamiliar with json can you give an example json file?

        J 1 Reply Last reply Reply Quote 0
        • E Offline
          Eric Waai
          last edited by Eric Waai

          0_1546860841813_stack_overflow coredump.py never mind,

          got it working ;)

          got the first stack overflow also

          1 Reply Last reply Reply Quote 0
          • P Offline
            protean
            last edited by

            For anyone else having issues, I had better luck with the following:

             "network_preferences": ["lte"], ""lte": {"carrier": "standard"}
            

            This works with Hologram in the US on Verizon.

            It connects to MQTT and such:

            Pybytes configuration read from /flash/pybytes_config.json
            LTE init(carrier=standard)
            LTE attach(band=None, apn=None)
            LTE connect(cid=1)
            LTE is_connected()
            LTE connection established
            Using MQTT over TLS
            This is PybytesProtocol.start_MQTT(check_interval=0.5, networkType=0)
            This is PybytesProtocol.__start_recv_mqtt()
            Using 8192 bytes as stack size
            Connected to MQTT mqtt.pybytes.pycom.io
            This is PybytesProtocol.__check_mqtt_message()
            Pybytes connected successfully (using the built-in pybytes library)
            This is pack_info_message()
            __pack_message: b'\x81\x05\x04\x90\x03\x8a\x04'
            Sending message:[b'\x81\x05\x04\x90\x03\x8a\x04'] with topic:[None] and finalTopic: [xxxx-xxxx-xxxx-xxxx-xxxx]
            Now starting user code in main.py
            

            But, the terminal, flash browser, etc... on pybytes do NOT work over LTE, still. Is that expected? It says my device is offline. However, I can talk to the internet just fine from my device.

            So I understand, this does not provide LTE support for Pybytes, on the web, just for auto-connecting to LTE? Or should it work?

            1 Reply Last reply Reply Quote 0
            • J Offline
              jirkakrepl @Eric Waai
              last edited by

              @eric-waai Hi, we're going to add LTE support to Pybytes at the end of Q1, start Q2.

              software developer @ Pycom

              Have you checked out our docs for the answer? (Now with an easy search function) https://docs.pycom.io

              Check out our newly revamped device management platform, Pybytes! https://pybytes.pycom.io/

              P 1 Reply Last reply Reply Quote 0
              • P Offline
                protean @jirkakrepl
                last edited by

                @jirkakrepl Does this mean REPL and firmware/OTA updates will work over cellular natively in pybytes then?

                J 1 Reply Last reply Reply Quote 0
                • J Offline
                  jirkakrepl @protean
                  last edited by

                  @protean Absolutely:)

                  software developer @ Pycom

                  Have you checked out our docs for the answer? (Now with an easy search function) https://docs.pycom.io

                  Check out our newly revamped device management platform, Pybytes! https://pybytes.pycom.io/

                  P 1 Reply Last reply Reply Quote 1
                  • P Offline
                    protean @jirkakrepl
                    last edited by

                    @jirkakrepl Is this still happening?

                    J 1 Reply Last reply Reply Quote 0
                    • J Offline
                      jirkakrepl @protean
                      last edited by jirkakrepl

                      Hi @protean

                      I haven't tested it thoughtfully myself yet. But it is now possible:

                      1. Create LTE configuration in Pybytes https://pybytes.pycom.io/settings/lte-settings/add
                      2. Create a device and use this LTE configuration
                      3. Use firmware updater to add this device to Pybytes https://docs.pycom.io/pybytes/connect/quick/

                      If your LTE configuration is correct, your device with a Simcard should connect to Pybytes using LTE.
                      Then Terminal and Flash OTA update should work too.

                      Screen Shot 2019-10-30 at 14.27.42.png

                      software developer @ Pycom

                      Have you checked out our docs for the answer? (Now with an easy search function) https://docs.pycom.io

                      Check out our newly revamped device management platform, Pybytes! https://pybytes.pycom.io/

                      P 1 Reply Last reply Reply Quote 0
                      • P Offline
                        protean @jirkakrepl
                        last edited by

                        @jirkakrepl said in New Pybytes firmware 1.18.1.r9 (Experimental LTE support):

                        If your LTE configuration is correct, your device with a Simcard should connect to Pybytes using LTE.
                        Then Terminal and Flash OTA update should work too.

                        Awesome, I'll try it out soon, thanks! LTE OTA was only thing holding us back from a production release.

                        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