Pycom's hardware is back! Tracking without GPS using the SG Wireless F1 Starter Kit


Pycom's hardware is back! Tracking without GPS using the SG Wireless F1 Starter Kit

We got to play around with the F1 Starter Kit, built around the F1 Smart Module from SG Wireless, a module which encompasses 4 different radio technologies: cellular, LoRa, Bluetooth Low Energy and WiFi.

We were given the challenge to build something, while using multiple technologies from within the module. The idea was quickly set: build a tracking application that combines Wi-Fi and cellular, with the option to add BLE beacons at a later stage.

Unboxing the F1 Starter Kit

Unboxing the F1 Starter Kit

Here's what we built, and what we experienced along the way.


Pycom’s heritage

Remember the days of Pycom? Famous for its Kickstarter campaigns and its huge community of MicroPython developers. The successful Kickstarter led to the LoPy, the LoRa, Wi-Fi and Bluetooth IoT board.

Fast-forward 6 years. By then, their latest module was developed comprising LoRa, Sigfox, WiFi, BLE and Cellular (LTE-M and NB-IoT), but reality kicked-in. Season Group, a Hong Kong-based electronics design and manufacturing company, came to the rescue and acquired Pycom's technology and its engineering team in late 2022. The assets and expertise were brought into Season Group’s IoT-focused subsidiary: SG Wireless. The module Pycom was working on at the time, based on Espressif’s ESP32-S3, eventually became the F1 Smart Module.

Today, SG Wireless combines Pycom’s developer-focused heritage with Season Group’s expertise in hardware and firmware development, certification and manufacturing, helping companies take IoT products from initial prototype to production.


The F1 Smart Module and the F1 Starter Kit

F1 Smart Module supports four connectivity options: WiFi, Bluetooth, LoRa and Cellular (LTE-M and NB-IoT). The module is pre-certified, programmable in MicroPython, native C and soon with the Arduino IDE. It's built for rapid prototyping and easy scaling. The flagship module comes with all four radios, but there are also a cellular, BLE and WiFi version and a LoRa, BLE and WiFi one.

The F1 module is built around Espressif's ESP32-S3: a dual-core 32-bit Xtensa LX7 running at up to 240 MHz, with 384 KB ROM and 512 KB SRAM on chip, plus 8 MB PSRAM and 16 MB flash on the module. In deep sleep the MCU draws around 10 µA.

Learn more at SG Wireless’ website.

The F1 Smart Module

The F1 Starter Kit is the Arduino-compatible devkit, with the F1 Smart Module on board. It comes with access to Ctrl, SG Wireless' device management platform for firmware updates as well as data storage and visualization.


The F1 Starter Kit

Wi-Fi tracking, but serverless

The goal: track the location of the device without adding any extra sensors or peripherals. So-called WiFi sniffing is a great way of localizing assets as it – other than GPS – works indoors, and doesn’t require long and time-consuming satellite scans. To do so, the device scans for Wi-Fi access points and sends their unique addresses (BSSIDs), together with their signal strengths (Received Signal Strength Indicators or RSSIs) to a cloud platform. From there, an API call is made to a database that returns the location, including an accuracy radius.

This had to work seamlessly, without me having to run a server myself.

Architecture

  1. Scan. The F1 wakes up at preconfigurable time intervals, currently set to 15 minutes, and scans for nearby Wi-Fi access points. It keeps up to 6 strongest BSSIDs and drops randomized addresses (such as phone hotspots).

    To avoid sending data while the device hasn't moved, it compares the BSSIDs with those of the last message sent. A new message is sent only when at least 50% of them have changed. If nothing changes, the device still sends an uplink at least once every 6 hours, so we can tell a stationary device from a dead one.

  2. Send. It connects over cellular using the Soracom SIM and sends the list of access point addresses and signal strengths to TagoIO in a UDP message. Once an ACK is received, the module goes to sleep.

  3. Resolve. In TagoIO, each received data message triggers a script, which sends the addresses and signal strengths to the Google Geolocation API.

  4. Store. Google returns the latitude, longitude and accuracy radius. The script writes these back to TagoIO, where they are stored.

  5. Show. A TagoIO dashboard shows the device’s location on a map, including its history.

Soracom is used as the connectivity provider, enabling the F1 Smart Module to connect over LTE-M. The Soracom SIM comes with access to a centralised management platform and a console the monitor the connection. The same platform is designed to support connected devices as they move from prototyping into larger-scale deployments.

TagoIO is a full-stack IoT cloud platform that supports light-weight, low-bandwidth data transmissions to build end-to-end applications. Apart from data storage and visualization, it comes with the ability to run scripts to automate data processing. 


Conclusion

It works, better than I expected.
The existing tools let the device run by itself, without me having to run any servers with impressive accuracy. With just 3 access points, we already get a location within 20 to 50m. More access points bring that down to less than 20m. Impressive!

The messages are small. Each access point adds about 22 bytes, so a full message is roughly 150 to 250 bytes, depending on how many access points we include. With some minor adaptations, the payload can be further reduced to make it work with LoRaWAN, which allows up to 222 bytes per message.

Only send when it moves. Currently, the application scans at a configurable time interval. When the device is stationary for a while, it keeps scanning for WiFi networks and comparing them to the previous set, which drains the battery. A better way is to add an accelerometer that triggers the Wi-Fi scan. As long as no movement is detected, the device stays in deep sleep, consuming as little energy as possible.

The other radios allow for further application development. We only used Wi-Fi and cellular, the same module could:

  • Use Bluetooth beacons for more precise location, indoors

  • Use LoRaWAN as a fallback when there is no cellular coverage (or vice versa)

  • Fall back to the cell tower location when there aren't enough Wi-Fi networks around, using a database like OpenCelliD



The F1 Starter Kit is a great platform for prototyping, giving plenty of directions to pursue due to the multi-radio setup. The kit is widely available and the documentation gets you started quickly. The Pycom community has been dormant for the past few years, but with the F1 Starter Kit, along with SG Wireless’ efforts to activate the forum, we may see part of the community revive.

The bigger promise of the F1 Starter Kit is a seamless transition from prototyping to production where the same module can be used in both stages. SG Wireless’ expertise in IoT, combined with Season Group’s capabilities in hardware development, certification and manufacturing, should lead to a seamless process to get ideas to market. But, let’s dig into the process to optimize the WiFi-based tracker and get it ready for production. A new article is coming up that describes the next steps of moving a prototype to production.

Stay tuned!
Laurens Slats