The MaaXBoard has a default Bluetooth address of AA:AA:AA:AA:AA:AA. This Bluetooth address is stored in the OTP (one time programmable) section of the Cypress chipset. Once programmed, this address can never be changed.
A Bluetooth address sometimes referred to as a Bluetooth MAC address, is a 48-bit value that uniquely identifies a Bluetooth device. In the Bluetooth specification, it is referred to as BD_ADDR
It is possible for us to change the Bluetooth address for the remainder of time that the MaaXBoard is powered. Please note that the address change will not persist across power cycles so make sure to change the address immediately after attaching to the Bluetooth device for the first time after each power-on.
I will demonstrate how to use the bdaddr tool to change the Bluetooth address. Debian does not include this tool in the bluez-utils package so we have to add it manually.
This training assumes that you are using the Debian Linux Out of Box Image
For instructions on how to program the Debian Linux Out of Box Image to a MicroSD for use by the MaaXBoard, please follow the Hackster Training "Getting Started with MaaXBoard" by Monica Houston
Gain access to the shell of the MaaXBoard.There are at least three methods to do this:
- The GUI terminal with USB keyboard, USB mouse, and a HCMI monitor.
- SSH (Secure SHell)
- Console TTL to USB adapter
I will demonstrate the SSH method from my Ubuntu host computer
I already know that my MaaXBoard was assigned IP address 192.168.1.64 by my network router
SSH to the MaaXBoard
$ ssh root@192.168.1.64
The password is avnet
The remainder of the instruction is to be performed within the MaaXBoard shell.
Since we are going to compile a software project, we must install the proper packages
root@maaxboard:~# apt install wget cmake gcc libbluetooth-dev
Download the bdtool tool archiveroot@maaxboard:~# wget http://www.petrilopia.net/wordpress/wp-content/uploads/bdaddrtar.bz2
Bunzip the archiveroot@maaxboard:~# bzip2 -d bdaddrtar.bz2
Untar the tarballroot@maaxboard:~# tar xf bdaddrtar
Change directoryroot@maaxboard:~# cd bdaddr
Build the projectroot@maaxboard:~# make
If the compile didn't work properly and you don't want to take the time to figure out how to successfully build bdaddr, you can download a pre-compiled binary bdaddr from this project.
Copy the executable to a more permanent locationroot@maaxboard:~# cp bdaddr /usr/bin
Confirm that baddr is where you placed itroot@maaxboard:~# which bdaddr
Expected result is
/usr/bin/bdaddr
Attach to the bluetooth deviceroot@maaxboard:~# hciattach /dev/ttymxc3 bcm43xx 115200
Expected result is
bcm43xx_init
Cannot open directory '/etc/firmware': No such file or directory
Patch not found, continue anyway
Set Controller UART speed to 115200 bit/s
Device setup complete
Verify the Bluetooth MAC addressroot@maaxboard:~# bluetoothctl list
Expected result is
Controller AA:AA:AA:AA:AA:AA MaaXBoard Bluetooth [default]
Alternatively we can also use bdaddr to check the MAC address
root@maaxboard:~# bdaddr -i hci0
Expected results is
Manufacturer: Broadcom Corporation (15)
Device address: AA:AA:AA:AA:AA:AA
Change the Bluetooth MAC addressroot@maaxboard:~# bdaddr -i hci0 -r AA:11:22:33:44:55
Expected result is
Manufacturer: Broadcom Corporation (15)
Device address: AA:AA:AA:AA:AA:AA
New BD address: AA:11:22:33:44:55
Address changed - Device reset successully
Reset the hci deviceroot@maaxboard:~# hciconfig hci0 reset
There should not be any response
Restart bluetooth serviceroot@maaxboard:~# systemctl restart bluetooth.service
There should not be any response
Verify the Bluetooth MAC addressroot@maaxboard:~# bluetoothctl list
Expected result is
Controller AA:11:22:33:44:55 maaxboard [default]
From this point on, until the board is power-cycled, the new Bluetooth address will be used.
After every power cycle it will be necessary to repeat the steps starting with section "Attach to the bluetooth device".
Further Reading about changing the Bluetooth device addressFurther Reading about the radio on the MaaXBoardThe CPU is connected to the wireless module through two interfaces
- SDIO Interface for Wi-Fi IEEE 802.11a/b/g/n/ac
- UART Interface for Bluetooth 4.2
The wireless module is Azurewave W-CM256SM "Infineon Wireless Module 802.11ac 1x1"
The chipset within the wireless module is Cypress CYW43455 "Single-Chip 5G WiFi Radio with Integrated Bluetooth"
Important history
- 2016 Summer - Cypress purchases Broadcom's Wireless IoT business.
- 2019 Summer - Infineon purchases Cypress.
Comments