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

nrf5144 ANT+ two network can't work at same time

I am using the nrf51422 with softdevice 5144_2.0.1 , I set two network number using the "sd_ant_network_address_set" api , network number 0 for ANT+ cadence/heardrate.. network number 1 for shinamo di2 . I assign di2 channel to network number 1 then i can get the di2 broadcast message and if i assign cadence channel to network number 0 then i can get di2 and cadence message together .

But if i lost the cadence message (eg: uncheck the Bike cadence transmitting box in ANT+ sensor simulator tool) then i also lost the di2 message , if i close the cadence channel then di2 message back .

any comment . thanks

Parents
  • I post my code as below : If HRM channel not paired then i will not receive any ANT event from channel ANT_DI2RX_ANT_CHANNE.

    It look like network 1 will NOT receive ANT event until all channels paired or close on network 0. Why ?? Thanks .

    #define ANT_HRMRX_ANT_CHANNEL           0                                           
    #define ANT_DI2RX_ANT_CHANNEL           5 
    #define ANT_DI2RX_CHANNEL_TYPE          0x00                                         
    #define ANT_HRMRX_CHANNEL_TYPE          0x40                                         
    #define ANT_HRMRX_DEVICE_TYPE           0x78                                        
    #define ANT_DI2RX_DEVICE_TYPE           0x01                                        
    #define ANT_HRMRX_DEVICE_NUMBER         0                                           
    #define ANT_HRMRX_TRANS_TYPE            0                                           
    #define ANT_HRMRX_MSG_PERIOD            0x7E18                                       
    #define ANT_DI2RX_MSG_PERIOD            0x2006                                       
    #define ANT_HRMRX_EXT_ASSIGN            0x00                                         
    #define ANT_HRM_TOGGLE_MASK             0x80                                         
    #define ANTPLUS_NETWORK_NUMBER          1                                           
    #define DI2_NETWORK_NUMBER              0   
    #define ANTPLUS_RF_FREQ                 0x39                                         
    #define ANT_BUFFER_INDEX_MESG_ID        0x01                                         
    #define ANT_BUFFER_INDEX_MESG_DATA      0x03                                        
    #define ANT_DI2RX_NETWORK_KEY           {     under NDA                         }    
    #define ANT_NETWORK_KEY                 {0xB9,0xA5,0x21,0xFB,0xBD,0x72,0xC3,0x45} 
    
    static uint8_t                          m_ant_network_key[] = ANT_NETWORK_KEY; 
    static uint8_t                          m_di2_network_key[] = ANT_DI2RX_NETWORK_KEY;
    
        
        err_code = sd_ant_network_address_set(ANTPLUS_NETWORK_NUMBER, m_ant_network_key);
        APP_ERROR_CHECK(err_code);
    	
        err_code = sd_ant_network_address_set(DI2_NETWORK_NUMBER, m_di2_network_key); 
        APP_ERROR_CHECK(err_code);
    		// for HRM config 		
        err_code = sd_ant_channel_assign(ANT_HRMRX_ANT_CHANNEL,
                                         0,
                                         ANTPLUS_NETWORK_NUMBER,
                                         0);
        APP_ERROR_CHECK(err_code);				
        err_code = sd_ant_channel_id_set(ANT_HRMRX_ANT_CHANNEL,
                                         0x0001, // HRM ID
                                         ANT_HRMRX_DEVICE_TYPE,
                                         0);
        APP_ERROR_CHECK(err_code);		
    		err_code = sd_ant_channel_low_priority_rx_search_timeout_set(ANT_HRMRX_ANT_CHANNEL,0xFF);
    		APP_ERROR_CHECK(err_code);    
        err_code = sd_ant_channel_radio_freq_set(ANT_HRMRX_ANT_CHANNEL, ANTPLUS_RF_FREQ);
        APP_ERROR_CHECK(err_code);
        err_code = sd_ant_channel_period_set(ANT_HRMRX_ANT_CHANNEL, ANT_HRMRX_MSG_PERIOD);
        APP_ERROR_CHECK(err_code);		
        err_code = sd_ant_channel_open(ANT_HRMRX_ANT_CHANNEL);
        APP_ERROR_CHECK(err_code);
        // For Di2 config
        err_code = sd_ant_channel_assign(ANT_DI2RX_ANT_CHANNEL,
                                         0,
                                         DI2_NETWORK_NUMBER,
                                         0);
        APP_ERROR_CHECK(err_code);				
        err_code = sd_ant_channel_id_set(ANT_DI2RX_ANT_CHANNEL,
                                         0x9D5F, // Di2 ID 
                                         ANT_DI2RX_DEVICE_TYPE,
                                         0);
        APP_ERROR_CHECK(err_code);
    		err_code = sd_ant_channel_low_priority_rx_search_timeout_set(ANT_DI2RX_ANT_CHANNEL,0xFF); 
    		APP_ERROR_CHECK(err_code);
        err_code = sd_ant_channel_radio_freq_set(ANT_DI2RX_ANT_CHANNEL, ANTPLUS_RF_FREQ);
        APP_ERROR_CHECK(err_code);
        err_code = sd_ant_channel_period_set(ANT_DI2RX_ANT_CHANNEL, ANT_DI2RX_MSG_PERIOD);
        APP_ERROR_CHECK(err_code);
    		err_code = sd_ant_channel_open(ANT_DI2RX_ANT_CHANNEL);
        APP_ERROR_CHECK(err_code);
    
  • Sorry for not replying to you sooner. I'm not sure what is causing this. What SoftDevice and SDK version are you using? What hardware? What are the complete laser markings of the nRF51422 chip?

Reply Children
No Data
Related