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

Bluetooth at Golioth, so far (2025)

The Golioth team has been busy creating new technologies to securely connect your Bluetooth device to the Cloud through gateways. Read about all of the features of Golioth Connectivity and Pouch and get a preview of what is coming in the new year.

Using Custom Work Queues for Sensor Readings in Zephyr

Custom Work Queues enable things like thread-aware debugging, larger amounts of customization, and the Zephyr work queue features that we know and love. This article details how to set up your next custom work queue to improve your Golioth-enabled application.

Send-when-idle using Zephyr and Golioth Pouch

Bundling data to send when a device is no longer generating new events is an efficient way to operate a low power Bluetooth device. This post explores how to use Zephyr RTOS components to easily wait until a device is idle to start transmitting using Golioth Pouch.

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.