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

ble_app_uart on nrf6310

Hello, I am trying to use ble_app_uart example from pca10001 to nrf6310 board from development kit. My nexus 7 detects the BLE device as 'Nordic_UART' but disconnects immediately saying 'Device doesn't support UART. Disconnecting'. It would be a great help if someone can tell me how to modify the program to work with the DK. Sincerely, Hari

Parents
  • Hi

    The ble_app_uart example should work equally well on the development kit as on pca10001 (evaluation kit). The real functional difference is that buttons and leds are mapped differently on those two kits but as soon as you flash your code to the development kit, it should start to advertise and you should be able to connect to the device. However, if any other application is advertising on your development board and you try to connect to it with your Android phone, then you will see the error message 'Device doesn't support UART. Disconnecting'.

    To map the buttons and leds to the development board, you should define the BOARD_NRF6310 constant instead of the BOARD_PCA10001 constant in Keil -> Options for Target, see below image

    C:\fakepath\Capture - Define the constant for the development kit in Keil Target Options.JPG

    So, make sure you are connecting to a device with device name 'Nordic_UART' and make sure your Nexus phone/tabled has at least Android v4.3. If it still not works, try to delete all bonded devices on your phone/tablet by selecting Settings -> Bluetooth. Also try to disable Bluetooth and enable it again, and perhaps restart the nRF UART app on your phone.

  • Thank you Very much Stefan, your help is very much appreciated! Your suggestion works fine! I have been trying to send an analog value from NRF6310 board to the android tablet. I have declared 'ch' as analog value to be used in the following code. I dont receive any values on the android device. Thank you very much! void UART0_IRQHandler(void) { static uint8_t data_array[BLE_NUS_MAX_DATA_LEN]; static uint8_t index = 0; uint32_t err_code;

    /**@snippet [Handling the data received over UART] */ data_array[index] = ch;//ch is analog // data_array[index] = simple_uart_get(); index++;

    // if ((data_array[index - 1] == '\n') || (index >= (BLE_NUS_MAX_DATA_LEN - 1))) // { err_code = ble_nus_send_string(&m_nus, data_array, index + 1 );//index + 1 if (err_code != NRF_ERROR_INVALID_STATE) { APP_ERROR_CHECK(err_code); }

        index = 0;
    

    // }

    /**@snippet [Handling the data received over UART] */
    

    }

Reply
  • Thank you Very much Stefan, your help is very much appreciated! Your suggestion works fine! I have been trying to send an analog value from NRF6310 board to the android tablet. I have declared 'ch' as analog value to be used in the following code. I dont receive any values on the android device. Thank you very much! void UART0_IRQHandler(void) { static uint8_t data_array[BLE_NUS_MAX_DATA_LEN]; static uint8_t index = 0; uint32_t err_code;

    /**@snippet [Handling the data received over UART] */ data_array[index] = ch;//ch is analog // data_array[index] = simple_uart_get(); index++;

    // if ((data_array[index - 1] == '\n') || (index >= (BLE_NUS_MAX_DATA_LEN - 1))) // { err_code = ble_nus_send_string(&m_nus, data_array, index + 1 );//index + 1 if (err_code != NRF_ERROR_INVALID_STATE) { APP_ERROR_CHECK(err_code); }

        index = 0;
    

    // }

    /**@snippet [Handling the data received over UART] */
    

    }

Children
No Data
Related