mac-adress of circuit playground bluefruit?

For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
bjoarnae
 
Posts: 4
Joined: Fri Sep 25, 2020 3:07 am

mac-adress of circuit playground bluefruit?

Post by bjoarnae »

I wonder uif there are some way of finding each circuit playground bluefruit board mac-adress via bluetooth connection?

User avatar
bjoarnae
 
Posts: 4
Joined: Fri Sep 25, 2020 3:07 am

Re: mac-adress of circuit playground bluefruit?

Post by bjoarnae »

Or alternatively: how can I connect more than two cpb's, using one as master and the other one's as slave - without having some spesific different addresses to use?

User avatar
danhalbert
 
Posts: 4652
Joined: Tue Aug 08, 2017 12:37 pm

Re: mac-adress of circuit playground bluefruit?

Post by danhalbert »

When a board running CircuitPython does a BLE advertisement, by default it advertises with the name "CIRCUITPYnnnn", where nnnn is the last four hex digits of the BLE address. You can also set the name by doing something like:

Code: Select all

ble = BLERadio()
ble.name = "NewName"
So the central doing the advertising scanning can check the name.

The address is also available as `ble.address_bytes`.

User avatar
bjoarnae
 
Posts: 4
Joined: Fri Sep 25, 2020 3:07 am

Re: mac-adress of circuit playground bluefruit?

Post by bjoarnae »

Thank you a lot danhalbert! Exellent! just what I need. I gues that since the name of each cpb can be changed (the first part, before nnnn) I can do that to more easily seperate the different cpb's.
Best regards Bjorn Arne

User avatar
danhalbert
 
Posts: 4652
Joined: Tue Aug 08, 2017 12:37 pm

Re: mac-adress of circuit playground bluefruit?

Post by danhalbert »

You can change the name to anything; the nnnn is not preserved or required: it just appends that to CIRCUITPY to make it semi-unique.

Locked
Please be positive and constructive with your questions and comments.

Return to “Wireless: WiFi and Bluetooth”