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

Bluetooth stops working after integrating ble_nus service

Hello developers, I am trying to integrate ADC, TWI based MPU6050 for accelrometer with ble_nus service for data transmission. The ADC and MPU6050 works perfect but once I integrate ble_nus the code compiles but my NRF51 DK does not advertise data (the LED also does not blink indicating no ble). I have attached my main.c file, please help me to figure out the issue with my code. I am stuck here already for 5 days now.main.c

I guess the issue is with advertising_init() function. Any inputs are really appreciated.

Thank you and regards, Sid

PS: I have used ble_hrs example as template. My softdevice is s130 the latest version.

Parents
  • Hi Sid

    Ok, not getting any error codes, that is good. Also check if your code runs to the main loop in the main function. Even if you do not capture any errors, there might be a hard fault. If it runs to the main loop, next step is to comment out custom code to see when it starts advertising. E.g. start with commenting out call to twi_setup() or mpu_setup(). At some point it will start advertising, and then you will figure out what part of your code causes the problem.

Reply
  • Hi Sid

    Ok, not getting any error codes, that is good. Also check if your code runs to the main loop in the main function. Even if you do not capture any errors, there might be a hard fault. If it runs to the main loop, next step is to comment out custom code to see when it starts advertising. E.g. start with commenting out call to twi_setup() or mpu_setup(). At some point it will start advertising, and then you will figure out what part of your code causes the problem.

Children
No Data
Related