Hi
I have a strange phenomenon when using ANT proximity function.
Configuration: nRF52840, SDK15.2.0, softdevice S340 v6.1.1
The following initialization function of an handheld ANT display are executed before pairing an ANT sensor.
case 1)
sd_ant_network_address_set(network_number,network_key);
sd_ant_channel_unassign(channel);
sd_ant_channel_assign(channel,channel_type,network_number,0);
sd_ant_channel_id_set(channel,deviceid,device_type,transmission_type);
sd_ant_channel_radio_freq_set(channel,rf_freq);
sd_ant_channel_period_set(channel,msg_period);
sd_ant_channel_radio_tx_power_set(channel,4,0);
sd_ant_channel_rx_search_timeout_set(channel,2);
sd_ant_channel_low_priority_rx_search_timeout_set(channel,12);
sd_ant_channel_open(channel);
After opening the ANT channel, the ANT display can receive the ANT sensor which is 4 meters from the ANT display.
==============================
case 2)
sd_ant_network_address_set(network_number,network_key);
sd_ant_channel_unassign(channel);
sd_ant_channel_assign(channel,channel_type,network_number,0);
sd_ant_channel_id_set(channel,deviceid,device_type,transmission_type);
sd_ant_channel_radio_freq_set(channel,rf_freq);
sd_ant_channel_period_set(channel,msg_period);
sd_ant_channel_radio_tx_power_set(channel,4,0);
sd_ant_channel_rx_search_timeout_set(channel,2);
sd_ant_channel_low_priority_rx_search_timeout_set(channel,12);
sd_ant_prox_search_set(channel, PROXIMITY_THRESHOLD_10, 0); ///< Proximity search detection radius > preset threshold (~ -80dBm on nRF51), from "ant_parameters.h".
sd_ant_channel_open(channel);
After opening the ANT channel, the ANT display can receive the ANT sensor which is 0.5 meters from the ANT display.
==============================
case 3)
sd_ant_network_address_set(network_number,network_key);
sd_ant_channel_unassign(channel);
sd_ant_channel_assign(channel,channel_type,network_number,0);
sd_ant_channel_id_set(channel,deviceid,device_type,transmission_type);
sd_ant_channel_radio_freq_set(channel,rf_freq);
sd_ant_channel_period_set(channel,msg_period);
sd_ant_channel_radio_tx_power_set(channel,4,0);
sd_ant_channel_rx_search_timeout_set(channel,2);
sd_ant_channel_low_priority_rx_search_timeout_set(channel,12);
sd_ant_prox_search_set(channel, PROXIMITY_THRESHOLD_CUSTOM, 80); //set the same RSSI value( -80dBm) by using custom proximity search selection
sd_ant_channel_open(channel);
After opening the ANT channel, the ANT display can not receive the ANT sensor which is 10 cm from the ANT display.
==============================
case 4)
sd_ant_network_address_set(network_number,network_key);
sd_ant_channel_unassign(channel);
sd_ant_channel_assign(channel,channel_type,network_number,0);
sd_ant_channel_id_set(channel,deviceid,device_type,transmission_type);
sd_ant_channel_radio_freq_set(channel,rf_freq);
sd_ant_channel_period_set(channel,msg_period);
sd_ant_channel_radio_tx_power_set(channel,4,0);
sd_ant_channel_rx_search_timeout_set(channel,2);
sd_ant_channel_low_priority_rx_search_timeout_set(channel,12);
sd_ant_prox_search_set(channel, PROXIMITY_THRESHOLD_CUSTOM, 127); //set the same RSSI value( -127dBm) by using custom proximity search selection
sd_ant_channel_open(channel);
After opening the ANT channel, the ANT display can not receive the ANT sensor which is 10 cm from the ANT display.
==============================
Questions:
1) In case 2, the proximity level is set to -80dBm, the minimum distance that the ANT display can receive the sensor is 0.5m. In case 3, the proximity level is also set to -80dBm which is same as case 2. The difference is using preset proximity threshold( case 2) and the custom proximity threshold( case 3). However, the outcome is totally different. Using the setting in case 3, the ANT display can not receive the sensor even the distance between the ANT display and the sensor is 1 or 2cm. Would you comment on it?
2) In case 2, the ANT display can receive the sensor at 0.5m if the proximity threshold level is set to PROXIMITY_THRESHOLD_10( -80dBm), mentioned in "ant_parameters.h". Then for case 1, the RSSI level is much lower than -80dBm at 4m. But, in case 4, a very low custom proximity level( -127dBm) is set. The ANT display can not receive the sensor for any distance. Why does the a very low custom proximity threshold setting(-127dBm) not work?
Thanks