50ButtonsEach / fliclib-linux-hci

Flic SDK for Linux
306 stars 54 forks source link

Node client seems to stop working on latest version of node #55

Open Roaders opened 7 years ago

Roaders commented 7 years ago

Hi

I have just updated my installed version of node to 6.10.2 and flic seems to have stopped working :-(

using the example node client I get a message saying connected to daemon and I see a new client connected in the log but that's it. No button presses are displayed. If I try the connection wizard it's the same, I get a welcome message but no button presses are detected.

When I press the button it glows red.

@hardillb - did you notice this when testing Flix recently? My version of node was updated by the node-red update script.

hardillb commented 7 years ago

Nope, works fine for me in v6.10.2

Emill commented 7 years ago

When you run the scan wizard, are you getting any timeout?

Roaders commented 7 years ago

nope, no messages at all.

Emill commented 7 years ago

I assume you have the latest binary?

Could you give the output of wireshark (the tcp traffic) between the client and daemon, as well as the btmon output?

Roaders commented 7 years ago

just did a git fetch and pull to get latest. Same result. I don't know how to run wireshark... I'll try to find the command to run btmon.

Emill commented 7 years ago

"sudo btmon > some_file.txt" is enough to run btmon. Regarding Wireshark, what platform are you running on, and are you running the client and daemon on the same machine? Do you have a graphical interface or only terminal/ssh?

Roaders commented 7 years ago

I am running on Raspberry Pi 3 via SSH. I tried sudo btmon and got nothing other than the version number printed out.

I went back to the getting started guide and when I type ps aux | grep bluetoothd I do get something returned. I tried both of the provided commands to stop it but it still seems to be running.

If bluetoothd was still running surely the flic log would mention that?

Roaders commented 7 years ago

My flic log:

Available HCI devices found:

Trying hci0
Flic server is now up and running!
Entering daemon state...
Entered daemon state.
Accepted new client
Accepted new client
Accepted new client
Roaders commented 7 years ago

I also tried the simpleclient and also got no responses.

Emill commented 7 years ago

You should first start btmon, then start the flicd. Then it should log a lot of traffic between flicd and the Bluetooth controller.

Roaders commented 7 years ago

the daemon is usually started with rc.local. I've commented that out and am now just running flicd -f flic.sqlite and I now get:

Error: No HCI devices are available. Make sure you have a Bluetooth controller plugged in into the computer.

Any idea how I can find out what is using my bluetooth controller or what's wrong with it? As well as updating node I also did a general sudo apt-get upgrade which updated over a hundred packages so it's possible one of those could be the culprit.

Emill commented 7 years ago

What's the output of "hciconfig"?

Roaders commented 7 years ago

nothing... 😕

Roaders commented 7 years ago
pi@livingroompi:~ $ hciconfig
pi@livingroompi:~ $ 
Emill commented 7 years ago

Something must be wrong with the state of the Linux distribution. I'm not sure how to fix that. What I can suggest is simply to download the latest raspberry pi sd card image and run that...

Sawtaytoes commented 5 years ago

@Roaders Do you have Ubuntu installed or Raspbian?

Roaders commented 5 years ago

Raspbian

Sawtaytoes commented 5 years ago

Yeah, that's a strange issue then. Did you ever get it working?