Peripheral and Broadcaster in the same time with different MAC address?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
BiDa_2697941
Level 1
Level 1
5 replies posted 10 sign-ins 5 sign-ins

There is PROJECT #007: BLE PERIPHERAL AND BROADCASTER - CHANGING GAP ROLES sample, it looks like the device can advertise only one role, I wonder if it's possible to do two roles in advertising mode at the same time

- Ble Peripheral: advertising using mac address M1

- Ble Broadcaster: acting as an iBeacon with mac address M2.

Using an app (on the phone) can scan both BLEs (M1, M2) in the same time. if M1 is connected then M2 still broadcasting.


Thanks!

0 Likes
1 Solution
Anonymous
Not applicable

e.pratt_1639216 is right. If you look at the API description of CyBle_SetDeviceAddress(), you will see that this API will return an error if the device is in connected state. To answer your question, no it won't be possible to have two address if you are both a peripheral and a broadcaster.

View solution in original post

6 Replies
Anonymous
Not applicable

I don't think so. I know there was confirmation on one of the forum threads about broadcasting while connected to a device, but I didn't see one for having two different MAC addresses. (I think cypress calls them BDAddresses)

You can definitely advertise information, and then change and broadcast the same information once connected with a device, but you won't be able to have them show up as two separate devices. (It will have a different connectable value for differentiation however)

Anonymous
Not applicable

e.pratt_1639216 is right. If you look at the API description of CyBle_SetDeviceAddress(), you will see that this API will return an error if the device is in connected state. To answer your question, no it won't be possible to have two address if you are both a peripheral and a broadcaster.

BiDa_2697941
Level 1
Level 1
5 replies posted 10 sign-ins 5 sign-ins

Thanks, e.pratt_1639216 and yssu for the answer.

The Advertising Channel PDU is 39 bytes and it contains the advertiser address itself, i wonder if cypress allows low-lever accessing the radio peripheral to transmit a BLE packet once the radio is available?

Other platforms (like Nordic - via timeslot api) allow doing that.

0 Likes
Anonymous
Not applicable

I'm not sure of documentation, extent, or abilities, but there are HCI functions and Link Layer functions in the BLE library code that make me think there is at least access to the lower level like you are wondering. For example, these functions are visible:

CyBle_L2capLeConnectionParamUpdateResponse,

CyBle_L2capLeConnectionParamUpdateRequest,

CyBle_L2capDisconnectReq,

CyBle_L2capChannelDataWrite,

CyBle_L2capCbfcSendFlowControlCredit,

CyBle_L2capCbfcConnectRsp,

CyBle_L2capCbfcConnectReq,

et cetera.

The Link Layer access functions may require certain conditions or setup for use however. I recommend reading through some of the documentation to see how deep the access goes.

Here's some of the HCI commands I found:

CyBle_HciSendPacket,

CyBle_HciSoftTransportEnable,

CyBle_HciUartTransportEnable

CyBle_HciSendPacket looks like it would have the most promise for what you are looking for. Hopefully a cypress FAE can comment on the usability of these.

0 Likes

Thanks,

It looks like Hci is used for DTM (direct test mode in BLE specification) only, if we use these functions we can't use BLE profile configuration (e.g Peripheral mode).

Seems that there is no sample for using these functions and the document doesn't provide much information for that.

0 Likes
Anonymous
Not applicable

In the PSoC 4 BLE family of devices, we do not support both HCI and profile operation simultaneously. Also, the issue is that the same address register is used for connection and for advertisement. That is why you cannot change the address after connection.