Skip to main content
DS.4
Senior
July 22, 2021
Question

STM32WB Does master hold slaves MAC address?

  • July 22, 2021
  • 12 replies
  • 2810 views

Slave can configure his MAC address either in the payload or internally. This I know.

My question is , after connection, does the masters packets hold that (slaves) MAC address?

Can Slave extract (its own) MAC address from the Masters packets?

If, so , how can slave get hold of this data from code?

This topic has been closed for replies.

12 replies

Remi QUINTIN
ST Technical Moderator
August 19, 2021

Yes! this is the HCI_LE_CONNECTION_COMPLETE_EVENT event that is processed via the hci_le_connection_complete_event (...) function.

The LE Connection Complete event indicates to both of the Hosts forming the

* connection that a new connection has been created. Upon the creation of the

* connection a Connection_Handle shall be assigned by the Controller, and

* passed to the Host in this event. If the connection establishment fails this

* event shall be provided to the Host that had issued the LE_Create_Connection

* command.

* This event indicates to the Host which issued a LE_Create_Connection command

* and received a Command Status event if the connection establishment failed

* or was successful.

DS.4
DS.4Author
Senior
October 7, 2021

Hi, almost there,

On HCI_LE_CONNECTION_COMPLETE_EVENT I get this payload:

Payload 20002d7c: 

01 FF FF FF F4 02 03 20 F4 02 03 20 90 2D 00 20 3F F0 00 08 A5 A5 A5 A5 00 00 00 00 A5 A5 A5 A5 49 DC 00 08 A5 A5 A5 A5 A5 A5 A5 A5 00 00 00 00 68 00 00 80 E4 2C 00 20 00 00 00 00 94 1B 00 20 94 1B 00 20 B0 2D 00 20 8C 1B 00 20 20 00 00 00 00 00 00 00 00 00 00 00 B0 2D 00 20 00 00 00 00 18 00 00 00

Then the PDU is at 0x200302F4:

74 01 00 20 74 01 00 20 04 3E 13 01 00 01 08 01 00 2A 6A CF 50 A0 00 07 00 00 00 0A 00 07 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

2A 6A CF 50 A0 00 is the the clients address.

According to picture it should be the 6 previous bytes, but that is not my (=server) address.

Where can I see my address?