Other Parts Discussed in Thread: CC2540, CC2541
I am using the CC2540 Mini DK and have the USB dongle as the central device and the KeyFob as the peripheral. I have the KeyFob update the advertisement data with the accelerometer positions as it is moved. I would like the USB to scan for these values and then print them to a file somewhere so I can track the movement. In order to do this, I want to start just by figuring out how to read the address of the connecting device (in this case, the peripheral device). How would I go about doing that?
I'm using the SimpleBLECentral code on the dongle . I know that a series of "GAP_DEVICE_INFO_EVENT" events are added to the stack and that these have a type gapDeviceInfoevent_t. Inside this struct there is a pEvtData array which holds the advertisement data. However, when I flash the code to the dongle and have the KeyFob advertising, it doesn't recognize it and doesn't reach any of the GAP_DEVICE_INFO_EVENTS.
If you have any specifics about reading the address of the peripheral device, writing this value to a file, or reading the advertising data, that would be helpful.
Thanks!