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

Connect to phone in background

I'm trying to get my nRF52 BLE peripheral to connect to my phone while its screen is off and it's in sleep mode. Other consumer BLE peripherals that I have can connect to my phone while its screen is off but my peripheral can't and will only reconnect once I turn the screen on. Is there some sort of setting or configuration to enable the background connect functionality? Thanks!

Parents
  • @Vaiblhav: Are you talking about iOS or Android ? On Android you can create a background service, like this

    For iOS you may want to have a look at this.

  • @Hung Bui I have a sniffer and there is a difference in "randomized tx address" bit in the ADV_IND packet header. Do you know how to set this? Other than that, the adv packet is essentially the same, and my peripheral can communicate with the app only when the app is in the foreground, so it probably isn't an issue with advertisement since other peripherals wouldn't advertise differently since they wouldn't know when to connect to mobile app in the background or foreground. It's sort of hard to use a sniffer to catch packets when connecting in the background since the moment I turn on the device it immediately connects to the app before I can configure the sniffer. Is there a way around this issue? Thanks for the help!

Reply
  • @Hung Bui I have a sniffer and there is a difference in "randomized tx address" bit in the ADV_IND packet header. Do you know how to set this? Other than that, the adv packet is essentially the same, and my peripheral can communicate with the app only when the app is in the foreground, so it probably isn't an issue with advertisement since other peripherals wouldn't advertise differently since they wouldn't know when to connect to mobile app in the background or foreground. It's sort of hard to use a sniffer to catch packets when connecting in the background since the moment I turn on the device it immediately connects to the app before I can configure the sniffer. Is there a way around this issue? Thanks for the help!

Children
No Data
Related