This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

S120 BLE Heart Rate Collector Example

你好, 我用的板子是 PCA10001 ,sdk 6,s110_nrf51822_7.0.0_softdevice.hex,s120_nrf51822_1.0.0-1.alpha_softdevice.hex,代码路径:S120: \nrf6310\s120\experimental\ble_app_hrs_c s110:pca10001\s110\ble_app_hrs ,我修改了s120的led 、button、uart的管脚重定义。 我想要让主机连上从机,从机可以发送广播,但是主机不会触发任何的事件,我想要问怎么才能让主机连上从机?是不是需要特别的外部硬件?

hello my board is PCA10001 ,the sdk is 6,s110_nrf51822_7.0.0_softdevice.hex,s120_nrf51822_1.0.0-1.alpha_softdevice.hex,Code path is S120: \nrf6310\s120\experimental\ble_app_hrs_c s110:pca10001\s110\ble_app_hrs , I modified the pin redefine led, button, uart's. I want to make a host connected to the slave, the slave can send a broadcast, but the host does not trigger any event, I want to ask how to make a host connected to the slave? Is not require special external hardware?

Parents
  • In the documentation for the ble_app_hrc_c example you can see that the display that comes with the nRFgo motherboard is used to show the data received from the heart rate server (the device running the ble_app_hrs code). Since you are using the PCA10001, you dont have this display so you must disable the code in the ble_app_hrs_c example that tries to write to the display. To do that, comment out the following code in the main file in the ble_app_hrs_c example:

    bool lcd_write_status = APPL_LCD_WRITE("Scanning", 8, LCD_UPPER_LINE, 0);
    if (!lcd_write_status)
    {
        APPL_LOG("[APPL]: LCD Write failed!\r\n");
    }
    
Reply
  • In the documentation for the ble_app_hrc_c example you can see that the display that comes with the nRFgo motherboard is used to show the data received from the heart rate server (the device running the ble_app_hrs code). Since you are using the PCA10001, you dont have this display so you must disable the code in the ble_app_hrs_c example that tries to write to the display. To do that, comment out the following code in the main file in the ble_app_hrs_c example:

    bool lcd_write_status = APPL_LCD_WRITE("Scanning", 8, LCD_UPPER_LINE, 0);
    if (!lcd_write_status)
    {
        APPL_LOG("[APPL]: LCD Write failed!\r\n");
    }
    
Children
  • Debugging information: [DM]: >> dm_init. ......... [DM]: << dm_register. [DM]: Application Instance allocated. [DM]: << dm_register.

    I modified the following code: static void ble_evt_dispatch(ble_evt_t * p_ble_evt) { app_trace_log("evt\r\n");//debug information ..... } i think the s120 is like S110, but the ble_evt_dispatch function does not print out any information。

Related