MCCI Model 2101 Connection Exerciser, RedwoodComm RWC5020B LoRaWAN tester and MCCI Catena 4610

arduino-lmic v6.1.0: LoRaWAN sessions that survive deep sleep

MCCI has released version 6.1.0 of the MCCI LoRaWAN LMIC library for Arduino, the open-source LoRaWAN stack for the Semtech SX127x and SX126x radios.

A battery-powered device can now keep its LoRaWAN session through deep sleep or a reset. LMIC_saveSessionState() copies the session state into a buffer, which the application stores with the session keys in flash, FRAM or RTC memory. After a wake-up, LMIC_restoreSessionState() puts the state back, and the device sends its next uplink without joining again. The saved state holds the frame counters, the settings and channels that the network sent, and the duty-cycle waits. Until now, applications did this by copying the library’s internal structure, which broke whenever the structure changed.

The library also tells the application when it can sleep. os_queryNextJobTicks() reports how long it is until the LMIC next needs the processor, and os_runloop_once_ex() runs any pending work and returns the same figure. A new example, ttn-otaa-session-sleep, shows both features together.

Other changes in 6.1.0:

  • FSK transmit and receive now work on the SX127x and SX126x radios.
  • Join-Requests stay within the airtime limits of LoRaWAN 1.0.4, and the DevNonce counts up from a value the application can save.
  • Accessor functions, named as in the LoRaWAN specification, read the fields that applications used to take from the LMIC structure.
  • An application can request a link check, query the channel list, and set the ADR_ACK limits at run time.
  • LMIC_getRSSI() returns the RSSI of the last received frame in dBm, so a sketch no longer needs to correct LMIC.rssi itself.

The SX126x driver, used with the SX1261 and SX1262, has a series of fixes. Class C receive keeps running after an uplink. The driver allows time for the radio’s cold-start setup and opens each receive window at the right time. The DIO2 RF switch check works, and RSSI and SNR of received frames are valid. Boards can set the crystal trim.

The release adds pin maps for the MCCI Catena 5220 and 5230 and the MCCI Model 4916, 4917, 4931 and 4933.

One change can stop an existing sketch from compiling. The Class B code (beacon tracking and ping slots) is untested, so the library no longer compiles it by default. A sketch that uses Class B must set LMIC_ENABLE_class_b to 1 in its project configuration. Other builds get about 2 KB smaller.

Thanks to Pontus Oldberg, who made ABP work with the secure element and added crystal trim settings for SX126x boards; to @gerontec, who found and fixed an encryption error in frames of 128 bytes or more; and to Stephen Horvath, who added support for the SX127x chip version used in the S76G.

We developed and tested 6.1.0 on a hardware-in-the-loop bench. A RedwoodComm RWC5020B tester acts as the LoRaWAN gateway and network server: an MCCI Catena 4612, connected to it by RF cable, joins it, takes downlinks from it, and keeps its frame counters against it. An ST-LINK/V2 programs and resets the board. It connects through an MCCI Model 2101 Connection Exerciser, so a script can disconnect the probe. Another script logs the board’s USB console with timestamps. MCCI’s open-source Python libraries control the RWC5020B (rwc-python-api) and the Connection Exercisers (cricketlib), and a Nordic Power Profiler Kit II can power a board and measure its sleep current. With this bench, Claude Code, working under our direction, could reproduce a bug, try a fix and confirm it on a real radio. The session example ran in all seven band plans, EU868, US915, AU915, AS923, AS923 Japan, KR920 and IN866: join, downlink, restart from the saved session, and more uplinks with the frame counter continuing, with the script switching the tester between regions. A later post will describe the bench.

APIs added in v6.1 describes the new functions and what to check when upgrading from 6.0. The release notes list every change. The Arduino Library Manager lists the library as “MCCI LoRaWAN LMIC library”.

USB 3.2 SuperSpeed for Zephyr RTOS on NXP i.MX 8M Plus

MCCI now offers USB 3.2 device support for Zephyr RTOS. The package adds a device controller driver for the Synopsys DesignWare USB 3 (DWC3) core to Zephyr’s own device_next USB stack, with the device tree and clock bindings the Zephyr tree lacks, SuperSpeed Gen 1 at 5 Gbit/s and Gen 2 at 10 Gbit/s, and USB bulk streams. Applications written to Zephyr’s USB device API keep working and gain SuperSpeed.

The technology comes from the MCCI USB DataPump®, ported to run as a native Zephyr stack. It is not a port of DataPump itself: it uses Zephyr’s API and build, and brings over what MCCI has learned about USB 3 device controllers in the years since the DataPump first ran on DWC3 silicon.

We brought the package up on the NXP i.MX 8M Plus EVK, running Zephyr 3.7 on the Cortex-M7 core. The 8M Plus controller is Gen 1; it answers a receive with a transmit in 12 microseconds, from the wire through the client task and back. Gen 2 is verified on a customer’s DWC3-based SoC, where loopback against a Linux host sustains 7.8 Gbit/s in each direction. The Gen 1 part does about half that.

MCCI is a Registered Partner in the NXP Partner Program, and MCCI’s USB software has shipped on NXP silicon since the Philips and Freescale days. The NXP partner page lists what runs on the i.MX, i.MX RT, MCX, LPC and Layerscape families today, on INTEGRITY, FreeRTOS, CMSIS-RTOS, RTEMS, Linux, Android and bare metal.

The Zephyr package is licensed in source form. For other DWC3-based SoCs, MCCI ports for a fixed fee or supports your engineers doing the port. Details are on the Zephyr RTOS USB Support page. Questions to sales@mcci.com.

2022Q1 Update

2021 is behind us, and 2022 is ahead. Here’s what’s going on at MCCI.

Our activities right now are divided into three main categories:

Many of the items in these categories merit blog posts of their own. Some of them already have but many do not.

To keep the length a little more tolerable, I’ve broken this up into a series of posts, one for each major topic. To make the reading a little more interesting, I’ve added some teasers about our plans for 2022.

If you have any questions or want more details, please send us an email, and one of our engineers will get right back to you.

Heltec HT-M2808 Helium Mining Hotspot

Introducing the Heltec HT-M2808 Helium-mining Hotspot

Want to move LoRaWAN traffic for an IoT project while earning a little cryptocurrency on the side? Or want to jump into the world of Helium HNT Mining, backed by expert support? Want a greener approach to blockchain than burning electricity for proof-of-work?

We might have the product you need.

Introducing the Heltec HT-M2808 Helium Mining Hotspot, a small (less than 5″ x 5″), professional, all-in-one hotspot with everything you need to get started. After a simple setup with the Helium phone-based app, the hotspot will start moving LoRaWAN traffic and mining Helium Network Tokens (HNT). Designed by LoRaWAN hardware experts at Heltec Automation, it’s backed by MCCI’s team of LoRaWAN system and deployment experts. We can’t guarantee your earnings, but we can guarantee that we’ll help you get the best possible results from your hotspot.
Continue reading →

Picture of Catena 4802

Catena 4802 combines Qwicc, Temperature, Humidity with Modbus

Our new MCCI Catena 4802 builds on our popular MCCI Catena 4801 — a minimal RS-485/Modbus/Mbus device with LoRaWAN support — adding two important features.

  • A Sensirion SHT31-DIS-F temperature/humidity sensor, with PTFE membrane protection.
  • A Sparkfun Qwicc connector, allowing access to a large variety of sensors, LCDs, relays and more, via I2C.

Continue reading →

Nvidia Tegra Jetson Nano support

MCCI has added support for the Nvidia Tegra Jetson Nano XUSB device controller to the MCCI USB DataPump®. We support the full feature set of the XUSB IP block, including bulk, interrupt and control transfers, including superspeed, high speed and full speed operation. Combined with MCCI’s UVC 1.5 support, multi-stream support, and multi-function support, this makes an excellent platform for implementing advanced webcams. The DataPump allows zero-copy video streaming data paths, for maximum throughput. High-level APIs separate kernel and user mode functionality cleanly and efficiently.
Continue reading →

Open source Python API for RWC LoRaWAN Testers

MCCI has released a new version of our open-source Python API library for RedwoodComm RWC5020B and RWC5020M testers. The MCCI rwc-python-api library, available on GitHub, gives Python programs full access to all the features of the RWC testers, using either serial port or Ethernet connections.

The library supports RedwoodCommm firmware versions v1.150 to v1.305.

Contact MCCI via email for more information.