📬❄️📦Adafruit Holiday Shipping Deadlines 2019: Attention all domestic customers! Please place UPS Ground and USPS First Class & Priority orders by 11am ET Monday December 9, 2019 📬❄️📦 Attention all international customers! Please place all UPS WORLDWIDE EXPRESS; SAVER, and DHL EXPRESS WORLDWIDE orders by 11am ET Monday December 9, 2019 📬❄️📦
0

Feather 32u4 connect to a specific MAC address
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Feather 32u4 connect to a specific MAC address

by whynx on Wed Aug 14, 2019 3:43 am

Hello everyone!

I'm new using Adafruit and I'm trying to connect my Adafruit Feather 32u4 to a specific device using its MAC address. The main idea is scan for devices and if a device with the definite MAC address is available, connect to it (so the 32u4 is working as master).

How can I do it?

Thanks in advance

whynx
 
Posts: 2
Joined: Wed Aug 14, 2019 3:34 am

Re: Feather 32u4 connect to a specific MAC address

by adafruit_support_mike on Thu Aug 15, 2019 2:48 am

What interface are you using?

USB doesn't really have a concept of MAC addresses.

adafruit_support_mike
 
Posts: 59639
Joined: Thu Feb 11, 2010 2:51 pm

Re: Feather 32u4 connect to a specific MAC address

by whynx on Mon Aug 19, 2019 11:18 am

adafruit_support_mike wrote:What interface are you using?

USB doesn't really have a concept of MAC addresses.


I'm trying to connect my Feather 32u4 via BLE to a eHealth sensor. The way to identify each eHealth sensor is using its BLE MAC address, that is formed by 12 alpha-numeric digits.

In my case, the eHealth sensor is only available via BLE in the moment in that it is measuring. I'm trying to include in a loop the funcitonality to identify that this sensor is available, to identify it by its MAC address, connect to it and, finally, obtaining the data needed.

BLE modules to Arduino work like I have discribed: identifying the BLE devices by its MAC address.

whynx
 
Posts: 2
Joined: Wed Aug 14, 2019 3:34 am

Re: Feather 32u4 connect to a specific MAC address

by adafruit_support_mike on Mon Aug 19, 2019 11:16 pm

All of our 32u4 BLE devices are peripherals. They can't make initiate connections to anything else, they just emit advertising packets and wait for a central device to open a connection. They have no control over when centrals make a connection, but can use the AT+BLEGETPEERADDR command to get a central's ID after it makes a connection.

You can use that information to shut down the connection from the peripheral side if you don't want to talk to that central.

adafruit_support_mike
 
Posts: 59639
Joined: Thu Feb 11, 2010 2:51 pm

Please be positive and constructive with your questions and comments.