ble_ant_app_hrm.rarHi!! I want to design dual mode(BLE UART +ANT) but unfortunately I can not built it well. Can anyone tell me what kind of function or parameter? I based on example of ble_ant_app_hrm in nRF51_SDK_10.0.0_dc26b5e.
ble_ant_app_hrm.rarHi!! I want to design dual mode(BLE UART +ANT) but unfortunately I can not built it well. Can anyone tell me what kind of function or parameter? I based on example of ble_ant_app_hrm in nRF51_SDK_10.0.0_dc26b5e.
It compiles well, but you have functions that returns errors when you run the program. You should try compiling without optimizations (set Options for Target->C/C++->Optimization->Level 0) and use the debugger.
If you put at breakpoint at APP_ERROR_CHECK(err_code); below ble_advdata_set() in advertising_init() you can see that it returns error code 0x00000007, which comes from a sd_ble_uuid_encode() call. 0x00000007 returned from this function means: NRF_ERROR_INVALID_PARAM Invalid UUID type. The UUID type is invalid because you have not added the base UUID of the NUS service. This is added in services_init() which you are calling after advertising_init(). Change the order of these and the error goes away.
You will however still get an error from ble_advdata_set(), but now it is 0x0000000C which means NRF_ERROR_DATA_SIZE. You are trying to put too much information into the advertising packet. There are several questions on here that answers how to solve this issue.
It compiles well, but you have functions that returns errors when you run the program. You should try compiling without optimizations (set Options for Target->C/C++->Optimization->Level 0) and use the debugger.
If you put at breakpoint at APP_ERROR_CHECK(err_code); below ble_advdata_set() in advertising_init() you can see that it returns error code 0x00000007, which comes from a sd_ble_uuid_encode() call. 0x00000007 returned from this function means: NRF_ERROR_INVALID_PARAM Invalid UUID type. The UUID type is invalid because you have not added the base UUID of the NUS service. This is added in services_init() which you are calling after advertising_init(). Change the order of these and the error goes away.
You will however still get an error from ble_advdata_set(), but now it is 0x0000000C which means NRF_ERROR_DATA_SIZE. You are trying to put too much information into the advertising packet. There are several questions on here that answers how to solve this issue.
Hi!! Petter. I will try your advice and solve my code.
Hi!! Petter ble_ant_app_hrm in nRF51_SDK_10.0.0_dc26b5e is changed from hrm mode to UART mode available now. I so appreciate your advice. My project should be incldued FE-C(ANT) with BLE (UART mode) and replace hrm mode in ANT. Do you have FE-C(ANT) sample code? Let me can combine ble_ant_app_hrm in nRF51_SDK_10.0.0_dc26b5e and FE-C(ANT).
Great! Here is a list of the available ANT examples.