Now on NXP’s Application Code Hub: Golioth Connectivity via the FRDM-MCXW71

Golioth’s Bluetooth example using Pouch on the FRDM-MCXW71 and the FRDM-RW612 is now available on NXP’s Application Code Hub (ACH). The demo makes it easy to show how a Bluetooth device can connect to the cloud through a standard gateway implementation. ACH makes it easy for NXP developers to boot up examples via VS Code.

The way things were

Getting started in any new ecosystem can be tough. Vendor tooling like ACH gives users a way to quickly find and try out an application and find all the required dependencies. Pairing the ACH with NXP’s VS Code plugin can help ease the complexity of the Zephyr toolchain, which can be useful for engineers transitioning to a new ecosystem.

My earliest memories of interacting with an IDE includes the confusing setup of an Eclipse environment and then using the built-in tooling to pull down a set of examples that are able to run on target hardware. To its credit, when it worked, this ecosystem approach made it simpler to have all the required libraries and build systems to start with an example; often it would not work or I’d be mired in the setup doldrums for days on end.

How the demo works

The MCX-W71 is a Bluetooth and 802.15.4 chipset meant for low power applications in industrial and smart home applications normally powered via Matter. For this demo, we are accessing this chip via the FRDM-MCXW71, their development platform. We were immediately interested in this chipset for the integrated Cortex-M33 and variety of other powerful NXP peripherals and the affordable pricetag. The chip is running a slightly modified version of the Pouch BLE GATT demo, which wraps up data in end-to-end encryption and also makes it possible to send data to the Cloud via a Pouch Gateway. The FRDM-MCXW71 in this demo also has a “Weather Click” plugged into it, which is a BME280 sensor on a MikroBus compatible breakout board.

The Pouch Gateway for this demo is a precompiled binary that goes onto the FRDM-RW612, a chipset that has Ethernet, Wi-Fi, Bluetooth, and 802.15.4 connectivity options. It’s targeted at Matter Border Router applications, but also works great as a Pouch Gateway (in fact, it’s one of our standard recommended options).

The FRDM-MCXW71 wakes up on a thread every second and takes a reading from the BME280 and puts the reading onto the ZBus. Every 20 seconds, the Bluetooth will advertise that it has a reading and once it connects to the gateway, it will grab the latest reading off of ZBus and publish that using Golioth Stream over Pouch. The Pouch is encrypted and sent up to the cloud via the gateway with no application-side hassles.

static void pouch_event_handler(enum pouch_event event, void *ctx)
{
    if (POUCH_EVENT_SESSION_START == event)
    {
        char buf[52];
        get_latest_weather(buf,sizeof(buf));
        LOG_DBG("Returned JSON: %s",buf);
        if (POUCH_EVENT_SESSION_START == event)
        {
            pouch_uplink_entry_write(".s/sensor",
                POUCH_CONTENT_TYPE_JSON,
                buf,
                strlen(buf),
                K_FOREVER);
            )
            golioth_sync_to_cloud();
        }
    }

Much like how Golioth Stream writes to the Cloud in our Firmware SDK, the Pouch uplink simply requires that you pass in data you’d like to transmit up to the cloud. Once the data gets to the Cloud, it is routed through Golioth Pipelines to an end destination such as our timeseries product LightDB Stream. This is a database where you can view the output on the Console and also query that data using Golioth’s REST API.

Hear more about the setup

Golioth joined Bridgette and Kyle from NXP to talk through the demo and how Bluetooth devices can talk to the Cloud on NXP’s podcast, the Edgeverse Tech Cast.

Chris Gammell
Chris Gammell
Chris is the Head of Developer Relations and Hardware at Golioth. Focusing on hardware and developer relations at that software company means that he is trying to be in the shoes of a hardware or firmware developer using Golioth every day. He does that by building hardware and reference designs that Golioth customers can use to bootstrap their own designs.

Post Comments

No comments yet! Start the discussion at forum.golioth.io

More from this author

Related posts

spot_img

Latest posts

Why build hardware at a software company?

Golioth has built a range of custom hardware to test out many of the aspects of our own IoT offering. These challenges mirror what our customers face with their IoT products. We continue to probe these challenges as hardware gets smaller, more power constrained, and takes on new capabilities.

Handling Button Press, Longpress, and Double-Tap with the Zephyr Input Subsystem

Embedded engineers know the joys and pains with button inputs: debouncing them, triggering actions, and more advanced input patterns like long holding the button...

WiFi HaLoW with Morse Micro, Zephyr, and Golioth

Wi-Fi HaLoW enables high throughput, at a long distance using ISM band radios (850-950 MHz, depending on location). This post introduces the concepts behind the demo and shows how to use Morse Micro, Zephyr, and Golioth to send data through walls and up to the cloud.

Want to stay up to date with the latest news?

Subscribe to our newsletter and get updates every 2 weeks. Follow the latest blogs and industry trends.