Raspberry Pi Gives the Pico W a Bluetooth Boost, Classic and BLE Modes Now Available in MicroPython
Newly-unlocked Bluetooth capabilities represented "a substantial engineering challenge," says Raspberry Pi co-founder Eben Upton.
Raspberry Pi has announced a big upgrade for Raspberry Pi Pico W owners: the radio chip's Bluetooth 5.2 support is now almost fully unlocked in both C/C++ and MicroPython.
The Raspberry Pi Pico W launched in June last year as a slightly more expensive sibling to the popular Raspberry Pi Pico. Its overall design remained largely unchanged, retaining the breadboard- and surface-mount-friendly castellated pin headers and micro-USB connector, and it was still powered by the dual-core Raspberry Pi RP2040 microcontroller — but it gained an Infineon CYW43439 radio module for Internet of Things (IoT) projects.
The CYW43439 is a dual-mode module with both 802.11n Wi-Fi and Bluetooth 5.2 capabilities — but, at launch, only Wi-Fi functionality was available. Six months after launch, Raspberry Pi announced it was working on unlocking the Bluetooth mode — but while the Raspberry Pi Pico C/C++ Software Development Kit (SDK) gained initial Bluetooth support four months ago, MicroPython has been lagging behind until now.
"Routing both Wi-Fi and Bluetooth traffic over the single three-pin SPI bus between RP2040 and CYW43439 has been a substantial engineering challenge," says Raspberry Pi co-founder Eben Upton of the difficulties faced along the way. "We’d like to express our thanks to our friends at Infineon, and in particular Graham Smith, for their assistance in productionizing this capability. Here at Raspberry Pi, Peter Harper was responsible for the Pico W host-side software; Graham Sanderson developed the SDK; and Alasdair Allan wrote the docs. Last, but not least, Damien George is (of course) responsible for making MicroPython work."
The new MicroPython firmware unlocks Bluetooth Classic and Bluetooth Low Energy (BLE) modes, though the former lacks support for Asynchronous Connectionless Link (ACL) and Synchronous Connection Oriented Link (SCO) modes — something Raspberry Pi is working to address in a future update. BLE mode, meanwhile, supports both Central and Peripheral operating modes — and the company has released two MicroPython demo projects to demonstrate broadcasting and receiving a temperature reading to show off its new support.
The software stack providing Bluetooth support is BlueKitchen's BTstack library — a commercial license for which is provided as standard with every Raspberry Pi Pico W sold, Upton confirms, meaning there should be no licensing issues with using a Bluetooth-enabled Pico W in commercial products. "Matthias Ringwald provided extensive assistance with integration and verification," Upton adds.
Existing Raspberry Pi Pico W owners will be able to upgrade to the new MicroPython firmware immediately by downloading it from the official website; there's no need to buy new hardware. Anyone looking to get started with Bluetooth in either C/C++ or MicroPython, meanwhile, will find the details in the data book Connecting to the Internet with Raspberry Pi Pico W (PDF).