This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2540 device address

Other Parts Discussed in Thread: CC2540

Hi,

I have a few questions regarding CC2540 BLE code. I am working on a remote control system that was built based on TI CC2540DK-Mini BLE development kit USB Dongle and keyfob.

1) I am not very clear abou the concept how each different devices loaded with the same firmware, hex code, result in the different devices address. From reading the post on the forum, it seems to me that the device address is derived from the IEEE address which is unique for each device. Is this correct? If so, how does each chip get its own uique identity base on the source code.

2) I ran into an issue where I only want my transmitter to be able to connected to one receiver at a time. But I ran into an issue where when I pair my tranmitter with one receiver, then I used the same transmitter and pair with another receiver. Now I resulted in two master devices with one slave device. Originally, the one to one connection was established by having the master device checking the paired transmitter device's address. However, this is not sufficient so I would like to have the master device (receiver) to check for both the transmitter device address AND ALSO the most recent receiver that transmitter device is paired to.

Ideally, I would like to concatenate the slave device address and master's device address, and send that to the master device as authenication. Looking at the source code, there is a place where it write the paired remote address into NVRAM using osal_snv_write( BLE_NVID_ADDRESSPAIRED, sizeof(linkReq.peerAddr), linkReq.peerAddr ); where linkReq.peerAddr is the 6 byte address defined using uint8 peerAddr[B_ADDR_LEN]; //B_ADDR_LEN = 6. Can I simply change the B_ADDR_LEN  = 6 ato B_ADDR_LEN  = 12 so that I could write 12 bytes of address which received from the transmitter device? The 12 bytes address will include both transmitter's device address and the receiver's address address. My concern is that the 32 bytes of data packet consist of 3 bytes of CRC, 2 bytes of ADV_NONCONN_IND, 6 bytes of MAC_ADDR, 21 bytes of payload. If I increase my mac address from 6 bytes to 12 bytes, would that cause some of the data in payload get cut off or would BLE automatically get the remaining data from payload to be send in the next tranmission event?

Thanks,

Nelson