TinyGo Launches Go Bluetooth for Go Developers Looking to Work with Bluetooth LE Devices

Designed for use alongside the TinyGo compiler, Go Bluetooth is a cross-platform package bringing BLE support to Go.

TinyGo, the open source project to create a Go compiler designed for microcontrollers and WebAssembly (WASM), has launched a new tool for Go programmers looking to work with Bluetooth Low Energy (BLE) hardware: Go Bluetooth.

"Go Bluetooth is a cross-platform package for using Bluetooth Low Energy hardware from the Go programming language," the group explains of its latest release. "It works on typical operating systems such as Linux, macOS, and Windows. It can also be used running 'bare metal' on microcontrollers produced by Nordic Semiconductor by using TinyGo. The Go Bluetooth package can be used to create both Bluetooth Low Energy Centrals as well as to create Bluetooth Low Energy Peripherals."

"The line of 'Bluefruit' boards created by Adafruit already have the SoftDevice firmware pre-loaded," TinyGo member Ron Evans notes. "This means you can use TinyGo and the Go Bluetooth package without any additional steps required. There is no smoother developer experience for TinyGo developers then using Adafruit boards to write bare-metal code for BLE devices using our favorite programming language, Go."

Adafruit boards supported by Go Bluetooth at launch include the Adafruit Circuit Playground Bluefruit, CLUE Alpha, Feather nRF52840 Express, and ItsyBitsy nRF52840. No modification on the device itself is required — only installing TinyGo and the Go Bluetooth package on the development machine.

Development of Go Bluetooth is still in flux, however, and not all features are supported on all platforms. The best support comes on Linux-based devices with BLueZ-compatible Bluetooth modules and Nordic Semi-based development boards with the SoftDevice API; partial compatibility, lacking advertisements, local services, local characteristics, and send notifications, is available on Apple macOS; Windows support, via the WinRT API, is the least developed, with only scanning support available in the present release.

Go Bluetooth, and instructions for getting started, can be found on the project's GitHub repository where the source is published under the permissive BSD 3-clause license.

Gareth Halfacree
Freelance journalist, technical author, hacker, tinkerer, erstwhile sysadmin. For hire: freelance@halfacree.co.uk.
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles