Rudis1261 / blink-server

This is the server you would need to be able to run the Blink Android Application.
MIT License
34 stars 7 forks source link

Uses wrong RFCOMM channel after first opening #8

Closed Gingerjanitor closed 5 years ago

Gingerjanitor commented 5 years ago

Bascially, I open the server, pair it up with the app via RFCOMM channel 1. Pairs up, works great. However, after closing the app via either suspending (ctrl+z) or quitting (ctrl+), the next time it opens it wants to use RFCOMM channel +1; so the second time I opened it wanted 2; then 3; then 4. When I opened the app on the phone it still acted as though it was connected, letting me bypass the connection screen (in fact I can't reconnect?) but not functioning correctly. It seems like the server needs to always open to use the same RFCOMM channel, or the app needs to recheck and sync with the server every time it is opened.

Also, simply killing the app via ctrl+c doesn't work, not sure why or if that is relevant.

system info:

System: Kernel: 4.15.0-45-generic x86_64 bits: 64 compiler: gcc v: 7.3.0 Desktop: Cinnamon 4.0.9 Distro: Linux Mint 19.1 Tessa base: Ubuntu 18.04 bionic

Rudis1261 commented 5 years ago

Hi there, sorry for the late reply. I believe you are hitting a red herring. No where in the code do I specify the channel. It's a side affect of opening a channel and not closing it. I would suggest you look for the process and kill it before attempting to start another one. That should fix the issue