Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • YouTube
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

SG Community Forum

cehlersC

cehlers

@cehlers
Unfollow Follow
About
Posts
25
Topics
7
Shares
0
Groups
2
Followers
0
Following
3

Posts

Recent Best Controversial

  • New documentation with a public repository
    cehlersC cehlers

    Our new documentation for the SG Wireless F1 series is now available at https://docs.sgwireless.com

    This is built from a public repository: https://github.com/sg-wireless/sg-documentation

    Pull requests for updates are welcome. You can also post comments here.

    Announcements

  • Secure Boot & Flash encryption
    cehlersC cehlers

    Since release 1.4.0 secure boot and flash encryption are now part of the firmware delivery. For more details, please see https://github.com/sg-wireless/sg-sdk/blob/main/docs/SECURITY.md

    Tutorials

  • Building firmware 1.4.0+ from source
    cehlersC cehlers

    This tutorial explains the setup required to build the firmware from the GitHub source repository https://github.com/sg-wireless/sg-sdk

    In this tutorial, I am using Windows 11 with Ubuntu 24.04 installed via WSL (Windows Subsystem for Linux). You can also use Ubuntu 24.04 or MacOS directly.

    Step1: Install necessary packages via apt

    sudo apt-get install git wget flex bison gperf python3 python3-pip python3-setuptools cmake ninja-build ccache libffi-dev libssl-dev dfu-util libusb-1.0-0 python3-venv python3-toml python3-serial
    

    Step2: Clone the SG Wireless Open Source SDK

    git clone https://github.com/sg-wireless/sg-sdk.git
    

    Note: If you previously cloned the repository, you can just fetch the latest version. When updating from 1.3.0 to 1.4.0+, it is recommended to deinit and re-init the submodules:

    git remote update
    git submodule deinit --all -f
    git pull
    

    Step3: Build the firmware

    cd sg-sdk && ./fw_builder.sh --board SGW3501-F1-StarterKit build
    

    Note: You can copy/rename the defaults.sdk.example to file defaults.sdk to define build defaults such as board type and port.

    Step4: Flashing the firmware

    If you are using Ubuntu Linux natively on your PC, you can simply connect the Starter Kit and run:

    ./fw_builder.sh --board SGW3501-F1-StarterKit flash --port /dev/ttyUSB0
    

    Note: You can copy/rename the defaults.sdk.example to file defaults.sdk to define build defaults such as board type and port.

    If you are using WSL, I suggest installing wsl-usb-gui or wsl-usb-manager

    c90bff24-431a-4d51-a8ea-071f259ce6a6-image.png

    Select the entry with “Silicon Labs CP210x USB to UART Bridge (COMx)” that corresponds to the board you want to flash. In the screenshot above, I have two Starter Kits connected to my PC.

    Once the device is attached to the WSL subsystem, you can flash it with the same command as above:

    ./fw_builder.sh --board SGW3501-F1-StarterKit flash --port /dev/ttyUSB0
    

    Note: On older versions of Ubuntu (ex: 22.04), the version of cmake installed with apt is too old. You can install a newer version by running:

    sudo apt-get install python3-pip && pip3 install -U cmake
    

    Please make sure you add the PATH where cmake is installed:

    export PATH=~/.local/bin:$PATH
    

    Please let me know if you experience any issues with building the firmware.

    Tutorials

  • Building the firmware from source
    cehlersC cehlers

    You can reset the devnonce on TTN (or even set it to be ignored). Go to the end devices section on TTN, open the end device affected, go to settings and scroll down all the way to join settings and click expand.

    image.png

    The devnonce is stored in the nvs partition, which is normally not erased when just flashing a firmware update. But if the board is erased completely then the last devnonce used is also erased.

    Tutorials

  • I have a board with Pycom, can I still use it for testing?
    cehlersC cehlers

    Hello Pauleera , yes the board can still be used, the documentation is available here: https://docs.pycom.io/

    The Pybytes platform however is no longer online, and old Pycom products are not supported on the SG Wireless Cloud platform.

    Comments & Feedback

  • Communication with external USB device
    cehlersC cehlers

    To modify the functionality of J102, which is the USB OTG peripheral of the esp32s3, you need to modify ext/micropython/ports/esp32/usb.c

    The REPL on UART0 is enabled by default, you cannot just re-assign the UART peripheral, which is why the board crashes.

    If you want to disable the REPL on UART0, you can modify https://github.com/sg-wireless/sg-sdk/blob/40dbabba63db543aeeaa9a313fc00faebd0169cb/src/platforms/F1/sdk-main/micropython/mpconfigboard.h#L7

    F1 Starter Kit

  • Coulomb counting for primary battery?
    cehlersC cehlers

    Hi jandls, to add to wilsonto, we do have direct support in MicroPython to interact with the BQ27441. Please note that it is only powered when a battery is connected.

    https://github.com/sg-wireless/sg-sdk/blob/main/src/platforms/F1/comps/fuel-gauge-if/fuel_gauge.md

    F1 Starter Kit

  • Communication with external USB device
    cehlersC cehlers

    Yes, J102 is connected to the USB OTG peripheral of the esp32. I can be used in host or device mode depending on the application requirements. The MicroPython firmware configures it in device mode with serial REPL support.

    Please note that the starter kit cannot be powered via J102.

    Updated in regards to powering connected devices

    F1 Starter Kit

  • How to access the micro-SD card on F1 starter kit?
    cehlersC cehlers

    These are the defaults when using SPI mode according to the MicroPython source code ext/micropython/ports/esp32/machine_sdcard.c

        if (is_spi) {
            // SPI interface
            #if CONFIG_IDF_TARGET_ESP32S3
            STATIC const sdspi_slot_config_t slot_defaults[2] = {
                {
                    .gpio_miso = GPIO_NUM_36,
                    .gpio_mosi = GPIO_NUM_35,
                    .gpio_sck = GPIO_NUM_37,
                    .gpio_cs = GPIO_NUM_34,
                    .gpio_cd = SDSPI_SLOT_NO_CD,
                    .gpio_wp = SDSPI_SLOT_NO_WP,
                    .dma_channel = 2
                },
                SDSPI_SLOT_CONFIG_DEFAULT()
            };
    
    F1 Starter Kit

  • Wake up (from Deep sleep) example in documentation
    cehlersC cehlers

    Thanks a lot for the feedback, jandls. This was taken straight from the old Pycom documentation and hasn’t been reviewed/updated yet.

    Comments & Feedback

  • How to access the micro-SD card on F1 starter kit?
    cehlersC cehlers

    Hello jandls,

    Please see the following from the MicroPython documentation:

    image.png

    Please note that on the Starter Kit, only 1 of the data pins is connected to the ESP32-S3 as anything else would require a hardware license from the SD Association. You would have to populate R506, R508 and R510 with 0Ohm resistors to connect the GPIO pins and if necessary R500-R502 for the pull-ups.

    3e223c30-2bd1-46a0-8c81-14ba4b42eb19-image.png

    On the starter kit, you can mount a FAT formatted SD Card like this:

    import machine
    sd = machine.SDCard()
    os.mount(sd, '/sd')
    os.listdir('/sd')
    

    The pins are hard coded but can be changed here: https://github.com/sg-wireless/sg-sdk/blob/main/src/platforms/F1/mpy-hooks/patches/machine_sdcard.c.patch on custom designs.

    F1 Starter Kit

  • LTE Mode check (and switching) not possible in PPP mode?
    cehlersC cehlers

    Yes, you can use lte.pppsuspend() to run AT commands, but then please use lte.connect() to re-connect. If you switch modes, you need to attach again first as the modem resets.

    F1 Starter Kit

  • 1NCE sim card: how can I register it under my name on the 1NCE portal?
    cehlersC cehlers

    I discussed this with the 1NCE commercial team. If you (already) have a business relationship with them, we can transfer the SIM card to your account. We are also looking into solutions to integrate SIM card management on our CTRL platform. I will let you know when I have more details to share.

    F1 Starter Kit

  • Which machine commands are available?
    cehlersC cehlers

    There are no F1 specific modules in the machine module. You can find the documentation for the machine library here: https://docs.micropython.org/en/v1.19.1/library/machine.html

    F1 Starter Kit

  • LTE Mode check (and switching) not possible in PPP mode?
    cehlersC cehlers

    The mode means operating mode of the currently running LTE modem firmware. If you switch between CAT-M and NB-IoT mode, the modem will change the operation mode and will reset to load the firmware for the new mode. If it returns 0 it means it is running the CAT-M firmware, if it returns 1 it means it is running the NB-IoT firmware.

    The device automatically enabled the LTE connection in order to provision the device on our cloud platform using the bundled 1NCE SIM car. In order to communicate with the cloud platform, it will use PPP (point to point) protocol. In the mode, the modem exchanges data with the host (the esp32-s3 running MicroPython) using a binary protocol. When this is active, it is currently not possible to send AT commands to the modem.

    F1 Starter Kit

  • Possible to save and restore the LoRaWAN state (joined status, network keys, packet counters, etc) to/from non-volatile memory?
    cehlersC cehlers

    This is done automatically by the firmware. It is not necessary to run any commands to get this functionality.

    F1 Starter Kit

  • Errors in the example script given for LoRaWAN v1.1.x?
    cehlersC cehlers

    Thanks again for raising this jandls , the team is looking into it asap.

    Comments & Feedback

  • Wrong link in documentation
    cehlersC cehlers

    Thanks for raising this issue, jandls . The team is looking into it and will apply necessary fixes where necessary.

    Comments & Feedback

  • Documentation mentions Sigfox?
    cehlersC cehlers

    Sorry, the board does not support Sigfox at this time. We used the old Pycom documentation as a base and it seems there are instances where the team did not remove Sigfox properly. We will review and remove all mentions to Sigfox. We may support Sigfox again in the future but no decision has been made at this point.

    Comments & Feedback

  • F1 introduction video
    cehlersC cehlers

    Hello everyone,

    I have created an introduction video for the F1 kit:

    https://youtu.be/8fsoL0ga_lo

    Feedback is greatly appreciated. Please let me know what you would like to see in future installments.

    Tutorials
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • YouTube