-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scan crashes if a device around is not broadcasting its name properly #12
Comments
It should be fixed by 32fc061 @IzzyWizzy666
Also I can't guarantee your bulb will work as this could be a symptom for an incompatible bulb (if you have a new version for example) |
Hi,
OK, thanks I'll give it a try :), my bulb is version 8 according to the app.
|
Something is a bit strange, I can connect sometime but when I try to do set_color red it appears to do it without any error message but the bulb stays white. Also here is the output from the ls command.......
ls
Listing Bluetooth LE devices in range for 5 minutes.Press CTRL+C to stop searching.
ID Name Mac address
-- ---- -----------
1 LEDBLE-5D6EA3E8 c1:40:5d:6e:a3:e8
2 LEDBLE-09E6DE78 f2:f1:09:e6:de:78 <---------------
3 Flower mate c4:7c:8d:61:ac:f7
4 Flower mate c4:7c:8d:61:a8:46
5 NO_NAME c4:7c:8d:61:81:35
6 NO_NAME c3:50:98:31:64:f2
7 NO_NAME f9:b7:24:6c:64:28
8 NO_NAME c4:7c:8d:61:7c:2b
ID Name Mac address
-- ---- -----------
1 NO_NAME f9:b7:24:6c:64:28
2 NO_NAME f2:f1:09:e6:de:78 <------------------
3 NO_NAME c3:50:98:31:64:f2
4 LEDBLE-5D6EA3E8 c1:40:5d:6e:a3:e8
5 NO_NAME f9:72:f8:1e:66:f4
6 NO_NAME c4:7c:8d:61:7c:2b
7 Flower mate c4:7c:8d:61:a8:46
8 NO_NAME c4:7c:8d:61:81:35
9 Flower mate c4:7c:8d:61:ac:f7
Another couple of scans and an error message.....
Magic Blue interactive shell v0.2.3Type "help" for a list of available commands
ls
Listing Bluetooth LE devices in range for 5 minutes.Press CTRL+C to stop searching.
ID Name Mac address
-- ---- -----------
1 LEDBLE-5D6EA3E8 c1:40:5d:6e:a3:e8
2 LEDBLE-09E6DE78 f2:f1:09:e6:de:78
3 Flower mate c4:7c:8d:61:81:35
4 NO_NAME f9:72:f8:1e:66:f4
5 Flower mate c4:7c:8d:61:ac:f7
6 NO_NAME f9:b7:24:6c:64:28
7 Flower mate c4:7c:8d:61:a8:46
8 NO_NAME c3:50:98:31:64:f2
9 NO_NAME c4:7c:8d:61:7c:2b^C
ls
Listing Bluetooth LE devices in range for 5 minutes.Press CTRL+C to stop searching.
ID Name Mac address-- ---- -----------
1 LEDBLE-09E6DE78 f2:f1:09:e6:de:78
2 NO_NAME c1:40:5d:6e:a3:e8
3 Flower mate c4:7c:8d:61:81:35
4 Flower mate c4:7c:8d:61:a8:46
5 NO_NAME c3:50:98:31:64:f2
6 Flower mate c4:7c:8d:61:ac:f7
7 NO_NAME f9:72:f8:1e:66:f4
8 NO_NAME f9:b7:24:6c:64:28
9 NO_NAME c4:7c:8d:61:7c:2b^C
ls
Listing Bluetooth LE devices in range for 5 minutes.Press CTRL+C to stop searching.
ID Name Mac address
-- ---- -----------
ERROR:magicblue.magicblueshell:Unexpected error with command "ls": Failed to execute mgmt cmd 'scan'
|
Ok so first problem is fixed as some devices around you aren't broadcasting their names properly. The second problem that you have is a bit more complicate to diagnose, have you tried following this : How-to-use-manually-with-Gatttool ? It could really help to see if it works with it. You can also try using |
Hi,
OK, I still can't communicate with my lights, I tried with the GATTool and although it can connect to the bulb, nothing else was possible, turning off/on, changing color etc.
If you can explain how to use bluetoothctl to communicate with the bulb I'll try that, I can trust it and connect to it, but that's as far as I've got.
|
There's still two things we can try :
Most plausible cause is difference in bulbs protocol. I've never tried v8 (yours) nor ever heard of someone who did but v9 needed a special patch that may be required for v8 as well (see #7). If that works for you the update could be pretty easy 🤞 |
Hi Benjamin,
This is the results....
pi@raspberrypi3:~ $ sudo gatttool -t public -b F2:F1:09:E6:DE:78 -I
[F2:F1:09:E6:DE:78][LE]> connectAttempting to connect to F2:F1:09:E6:DE:78
Error: connect error: Connection refused (111)
[F2:F1:09:E6:DE:78][LE]> connectAttempting to connect to F2:F1:09:E6:DE:78
[F2:F1:09:E6:DE:78][LE]>
[F2:F1:09:E6:DE:78][LE]>
quitpi@raspberrypi3:~ $ sudo gatttool -t random -b F2:F1:09:E6:DE:78 -I
[F2:F1:09:E6:DE:78][LE]> connectAttempting to connect to F2:F1:09:E6:DE:78
Connection successful
[F2:F1:09:E6:DE:78][LE]> char-write-req 0x000b 56FFFFFF00f0aa
[F2:F1:09:E6:DE:78][LE]> char-write-req 0x000b 56FFFFFF00f0aa
[F2:F1:09:E6:DE:78][LE]> char-write-req 0x000b 56FF000000f0aa
[F2:F1:09:E6:DE:78][LE]>
The char-writes had no effect :(
Cheers,Keith
|
Thank you very much for trying all of this 👍 Unfortunately I think your bulb version (v8) is currently incompatible. I created an issue specific to discussions about this version #13 and updated the README to state of this incompatibility. Now if you need this to work you'll have to dig by yourself, I can help you with the basics but not having this bulb I won't be able to study its protocol. |
ERROR:magicblue.magicblueshell:Unexpected error with command "ls": 'NoneType' object has no attribute 'split'
Probably comes from this line :
dev_name = dev.getValueText(9).split('\x00')[0]
The text was updated successfully, but these errors were encountered: