After a long run,bluetooth seem work very slowly

In my project, nrf52832 used as a communication module.

In order to let user's phone reconnect automatically,I add HID service,appearance and uuid into advertising packet.

When I power on my machine,The reconnection happened rapidly.But after run a long time (such as one week),the action will dully.

And the distance between phone and machine when reconnection finished also will shorten.

Maybe I need  to let idle_state_handle() not work?Even though it can lead to the power dissipation enlarge.

Parents
  • Hello,

    I don't know what is going on exactly. Is the nRF advertising at all? If it does, I would not suspect the nRF to behave any different. 

    What SDK version are you using? And what do you mean by "dully"?

    But after run a long time (such as one week),the action will dully.

    Maybe I need  to let idle_state_handle() not work?

    You should use idle_state_handle(). It only let's the device enter low power mode, but any event will wake it up. This is not causing whatever issues that you are seeing. 

    Are you sure it is not the computer that is having issues with the BLE behavior?

    Can you capture a sniffer trace of the connection both when it is working as expected, and when it is not? Do you see any difference? Feel free to upload the sniffer traces (.pcapng) files here, and I can have a look. You can use the nRF Sniffer for Bluetooth LE.

    Best regards,

    Edvin

  • Hello,

    I used 52832 as a communication module mounted on my machine.

    The chip will keep advertising.But the problem not happened in here.

    As I mentioned before,I hope my phone can connect automatically and fastly.Then Apps that run in the background of my phone find the connect and send command to 52832.The whole process is automatic when my phone enter the area that my phone can scan the advertising.

    But when I try to do experiment away from the host computer,a period of time after the machine is turned on,the process is fastly and expected.

    Then,when the machine run some days,I need to closer to the machine so that I can see connected display on my phone,at mean while the process used more time than before.It just like chip run dully.

    I don't know why is that.All I could think of was the long time of low power mode led to this phenomenon.

    I'm sorry I can't provide the sniffer traces  files because it seems to be a matter of perception.

    在我的代码中,我添加了hid服务,以便我可以连接和绑定电话上的52832设置

  • Hello,

    I still don't understand what you mean by "dully". I believe you mean "slower".

    So the nRF52832 is connected to your computer via some serial communication? Are you using an nRF52 DK or a custom board / 3rd party board?

    My assumption is that you are connecting to the nRF52832 via your phone, and the nRF52832 sends some data to your computer. 

    After a few days, when it behaves "dully". Do you know what is the "dully" part? Is your phone able to connect? Are you able to send the commands? Are you able to send commands from the nRF52832 to the computer? Have you tried debugging this? What if you try to send the same commands on a button press? Is it also dully after a couple of days? Just to pinpoint whether the issue is the BLE link or the serial link.

    Best regards,

    Edvin

  • Hello, 你好,

    My expression is more anthropomorphic, but I do mean to express a slower meaning.我的表达更拟人化,但我确实想表达一个更慢的意思。

    The nRF52832 just connected to STM32 by uart.I using a custom board by myself.It is not connect any other host include computer.nRF52832刚刚通过uart与STM32连接。我自己用的是定制板。不能连接任何其他主机,包括计算机。

    The work process of nrf52832 is connected by my phone.Get command from my phone and reply to phone.我的手机连接了nrf52832的工作过程。从我的手机获取命令并回复电话。

    The slower part is reconnection process.较慢的部分是重连过程。

    When my phone entry the area of nrf52832 advertising,my phone will start HID enumeration(I learned this principle from other engineers) .Due to HID service,appearance and uuid,my phone will start reconnection process automatically when they are bonded.

    This process as above will behave slower after run somedays.The command can send normally but the speed of reconnection is unsatisfactory.

    In my vision,the process should not behave so different.

    A few hours after power up,the reconnection maybe happened at a distance of three to five meters from nrf52832.But when the time comes some days later,the reconnection maybe happened at distance of less than a meter even need to wait a few seconds.The issue puzzled me is that,I want fatser reconnection all the time.

Reply
  • Hello, 你好,

    My expression is more anthropomorphic, but I do mean to express a slower meaning.我的表达更拟人化,但我确实想表达一个更慢的意思。

    The nRF52832 just connected to STM32 by uart.I using a custom board by myself.It is not connect any other host include computer.nRF52832刚刚通过uart与STM32连接。我自己用的是定制板。不能连接任何其他主机,包括计算机。

    The work process of nrf52832 is connected by my phone.Get command from my phone and reply to phone.我的手机连接了nrf52832的工作过程。从我的手机获取命令并回复电话。

    The slower part is reconnection process.较慢的部分是重连过程。

    When my phone entry the area of nrf52832 advertising,my phone will start HID enumeration(I learned this principle from other engineers) .Due to HID service,appearance and uuid,my phone will start reconnection process automatically when they are bonded.

    This process as above will behave slower after run somedays.The command can send normally but the speed of reconnection is unsatisfactory.

    In my vision,the process should not behave so different.

    A few hours after power up,the reconnection maybe happened at a distance of three to five meters from nrf52832.But when the time comes some days later,the reconnection maybe happened at distance of less than a meter even need to wait a few seconds.The issue puzzled me is that,I want fatser reconnection all the time.

Children
Related