I want to read the serial number of the second page package,use the SDK 13.0,\examples\ant\ant_continuous_scanning_controller,it can't get the serial number,how to do?
I want to read the serial number of the second page package,use the SDK 13.0,\examples\ant\ant_continuous_scanning_controller,it can't get the serial number,how to do?
I believe the Ant Message Protocol and Usage -document describe how you can enable Extended Messages Format. The <SDK>\examples\ant\experimental\ant_shared_channel\master_to_master in asc_master_to_master.c show for instance how to extract the peer device number and compare with it's own to select which should be the master or slave, I believe similar approach is what you want:
//determine whether this device is to be a master or a slave, and continue to the connected state if (p_ant_message[ANT_MESSAGE_FLAG_OFFSET] == ANT_EXT_MESG_BITFIELD_DEVICE_ID) { //Fill the temporary neighbor with the device number and rssi value from the received message //page number and payload are not relevant at the moment, so ignore them m_neighbor.device_number = p_ant_message[ANT_MESSAGE_EXTENDED0_OFFSET] | (((uint16_t) p_ant_message[ANT_MESSAGE_EXTENDED1_OFFSET]) << 8);
I believe the Ant Message Protocol and Usage -document describe how you can enable Extended Messages Format. The <SDK>\examples\ant\experimental\ant_shared_channel\master_to_master in asc_master_to_master.c show for instance how to extract the peer device number and compare with it's own to select which should be the master or slave, I believe similar approach is what you want:
//determine whether this device is to be a master or a slave, and continue to the connected state if (p_ant_message[ANT_MESSAGE_FLAG_OFFSET] == ANT_EXT_MESG_BITFIELD_DEVICE_ID) { //Fill the temporary neighbor with the device number and rssi value from the received message //page number and payload are not relevant at the moment, so ignore them m_neighbor.device_number = p_ant_message[ANT_MESSAGE_EXTENDED0_OFFSET] | (((uint16_t) p_ant_message[ANT_MESSAGE_EXTENDED1_OFFSET]) << 8);
I want to get the extended device number,it is 24bits data。I can’t get the high 8 bits realtime。
Isn't this part of the transmission type field? Ref:
https://www.thisisant.com/developer/resources/tech-faq/what-is-the-extended-device-number