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

SDK17.0 BEHAVING UNEVEN IN DIFFERENT PC .

HI,

  •        we created an application on SDK "nRF5_SDK_17.0.0_9d13099"  .The example code used to develop the  application is "ble_app_hids_mouse". 
  •        we developed the application code successfully and its working fine with our  device.
  •        I developed the application code by using segger IDE (version :- 4.10a) in a windows os.

ISSUES

  • After i developed the application code i zipped the SDK and shared it to my colleague . He unzipped the SDK and opened our application code in his mac os system.
  • He is also using segger IDE but the version was different . He build the code successfully and flashed the code to our device but now the device is not working with exactly same code .
  • Why the device is behaving uneven when we flashed the same code from two different system (with mac os and windows os )?
  • Please help me to find out this issue as soon as possible.
  • Hi,

    He build the code successfully and flashed the code to our device but now the device is not working with exactly same code .

    Exactly what do you mean by not working? Have you checked that the application isn't asserting somewhere? 

    regards

    Jared

  • Jared said:
    Exactly what do you mean by not working?

     Our device is a bluetooth 2d- 3d mouse . when we flash the code to our device the device will start advertising exactly like nordic ble_app_hid_mouse but now its not advertisng when i flashed the code from his system .

     

    Jared said:
    Have you checked that the application isn't asserting somewhere?

    What you mean by asserting?

     We debugged  the code in his system and find out the reason for the device not working .Actually its due to "APP_ERROR_CHECK(err_code)". 

    We  avoid the APP_ERROR_CHECK(err_code) from the function which return err_code but the issue is showing with the next function which using  APP_ERROR_CHECK(err_code) .

    NOTE:- The APP_ERROR_CHECK(err_code)  function halt the code execution only if we define DEBUG but in our project settings we are not included the DEBUG in preprocessor directives.

     

    Is there any issue with segger ide version ?i am using segger ide v 4.10a and he is using segger ide V 4.52c

  • Hi,

    The APP_ERROR_CHECK() function call will make the application assert by calling the error handler if the err_code is anything else than 0x00.  What is err_code() and what function returns the code?

    regards

    Jared 

  • Hi Jared,

    Jared said:
    What is err_code() and what function returns the code?

     error code() is returning "2"  ie  NRF_ERROR_SOFTDEVICE_NOT_ENABLED

    please look the screen shot.

    Why this error happening in his system and not in my system? what is the reason for this ?

    please look the below code which causes this error . After we  put some  condition before APP_ERROR _CHECK the issue was solved  

    /*__________________________________________________
    // @brief: Function for the battery level update.
    * @param[in] battery_level     battery level in percentage.
    __________________________________________________*/
    void battery_level_update(uint16_t battery_level)
    {
        ret_code_t err_code;
    
        err_code = ble_bas_battery_level_update(&m_bas, battery_level,BLE_CONN_HANDLE_ALL);
        if ((err_code != NRF_SUCCESS) &&
        (err_code != NRF_ERROR_BUSY) &&
        (err_code != NRF_ERROR_RESOURCES) &&
        (err_code != NRF_ERROR_FORBIDDEN) &&
        (err_code != NRF_ERROR_INVALID_STATE) &&
        (err_code != BLE_ERROR_GATTS_SYS_ATTR_MISSING)
        )
        {
           APP_ERROR_HANDLER(err_code);
        } 
    }
    

    But we need a solid reason why this issue was happening in other system.

Related