This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to set the ANT shared address to receive on NRF51422 ?

what is the C function ?

  • Please try to include details about what you have tried and exactly what you are trying to achieve. This may be helpful.

  • An implementation using Shared Channels is explained in Section 8.2 in the ANT Message Protocol and Usage.

    On the slave side, once the channel is opened, the host should send a single broadcast message to ANT with the first one or two bytes indicating Node B’s shared channel address. This configures ANT to listen to messages that are addressed to Slave Node B.

  • hello petter this is my slave channel cfg : //Slave channel memset(&ch_slave_shared,0,sizeof(ch_slave_shared)); ch_slave_shared.ch_ID=_ANT_CHANNEL_SLAVE_ID; ch_slave_shared.ch_type=CHANNEL_TYPE_SHARED_SLAVE; ch_slave_shared.ch_ext_byte=EXT_PARAM_AUTO_SHARED_SLAVE; ch_slave_shared.ch_transmission_type=0x03; ch_slave_shared.ch_device_type=_ANT_HUB_LINK_ETABLISHING_INFO_TYPE; //On reçoit ce type de données ch_slave_shared.ch_device_number=ANT_COMMON_DEVICE_NUMBER; //master id info to receive ch_slave_shared.ch_period=ANT_COMMON_CHANNEL_PERIOD; ch_slave_shared.ch_freq=ANT_COMMON_FREQUENCY; ch_slave_shared.ch_hight_prio_timeout=7; //par pas de 2.5s ch_slave_shared.ch_low_prio_timeout=2; ch_slave_shared.CallBack_p=(type_CallBack_p)ant_rx_shared_channel_process;

    And after when the channel is opened, I set the shared channel address:

    void hub_set_shared_address(ant_channel_params_t ant_ch_p,U16 device_unic_id,U8 * payload_p) { memcpy(payload_p,(U8)&device_unic_id,sizeof(device_unic_id)); sd_ant_broadcast_message_tx(ant_ch_p->ch_ID, ANT_STANDARD_DATA_PAYLOAD_SIZE, payload_p);
    }

    hub_set_shared_address(&ch_slave_shared,u16MyUnicId,ch_slave_shared.payload);

  • Yes, I ever read it, but I am not able to receive on the shared address, only the 0x0000 shared address frame are received. best regards

  • Please edit your question to include the information. If you want me to test your application, please upload your complete project and include information about chip revision, SDK version and SoftDevice version. Remember that this is public, if your code is secret, please create a case int he MyPage support portal, and add it there.

Related