Closed mountainsandcode closed 4 years ago
Be sure to use newest Bluez ( https://github.com/zewelor/bt-mqtt-gateway/wiki/Upgrade-Bluez-on-Raspbian ) and pair desk first https://wiki.archlinux.org/index.php/Bluetooth#Pairing . Its always possible that remote used in this desk has some change in protocol and it wont work, without some tweaks.
Bluez is up-to-date (5.5) and the desk is paired - indeed it appears that the protocol may have changed. Any suggestions for reverse engineering that helped you get the original setup running which you could share? Would be greatly appreciated!
By the way, this is what I can find with bluetoothctl
[NEW] Primary Service /org/bluez/hci0/dev_EF_XX_YY_ZZ_AA_BB/service000a 00001801-0000-1000-8000-00805f9b34fb Generic Attribute Profile [NEW] Characteristic /org/bluez/hci0/dev_EF_XX_YY_ZZ_AA_BB/service000a/char000b 00002a05-0000-1000-8000-00805f9b34fb Service Changed [NEW] Descriptor /org/bluez/hci0/dev_EF_XX_YY_ZZ_AA_BB/service000a/char000b/desc000d 00002902-0000-1000-8000-00805f9b34fb Client Characteristic Configuration [NEW] Primary Service /org/bluez/hci0/dev_EF_XX_YY_ZZ_AA_BB/service000e 99fa0001-338a-1024-8a49-009c0215f78a Vendor specific [NEW] Characteristic /org/bluez/hci0/dev_EF_XX_YY_ZZ_AA_BB/service000e/char000f 99fa0002-338a-1024-8a49-009c0215f78a Vendor specific [NEW] Characteristic /org/bluez/hci0/dev_EF_XX_YY_ZZ_AA_BB/service000e/char0011 99fa0003-338a-1024-8a49-009c0215f78a Vendor specific [NEW] Descriptor /org/bluez/hci0/dev_EF_XX_YY_ZZ_AA_BB/service000e/char0011/desc0013 00002902-0000-1000-8000-00805f9b34fb Client Characteristic Configuration [NEW] Primary Service /org/bluez/hci0/dev_EF_XX_YY_ZZ_AA_BB/service0014 99fa0010-338a-1024-8a49-009c0215f78a Vendor specific [NEW] Characteristic /org/bluez/hci0/dev_EF_XX_YY_ZZ_AA_BB/service0014/char0015 99fa0011-338a-1024-8a49-009c0215f78a Vendor specific [NEW] Descriptor /org/bluez/hci0/dev_EF_XX_YY_ZZ_AA_BB/service0014/char0015/desc0017 00002902-0000-1000-8000-00805f9b34fb Client Characteristic Configuration [NEW] Primary Service /org/bluez/hci0/dev_EF_XX_YY_ZZ_AA_BB/service0018 99fa0020-338a-1024-8a49-009c0215f78a Vendor specific [NEW] Characteristic /org/bluez/hci0/dev_EF_XX_YY_ZZ_AA_BB/service0018/char0019 99fa0021-338a-1024-8a49-009c0215f78a Vendor specific [NEW] Descriptor /org/bluez/hci0/dev_EF_XX_YY_ZZ_AA_BB/service0018/char0019/desc001b 00002902-0000-1000-8000-00805f9b34fb Client Characteristic Configuration [NEW] Characteristic /org/bluez/hci0/dev_EF_XX_YY_ZZ_AA_BB/service0018/char001c 99fa0029-338a-1024-8a49-009c0215f78a Vendor specific [NEW] Characteristic /org/bluez/hci0/dev_EF_XX_YY_ZZ_AA_BB/service0018/char001e 99fa002a-338a-1024-8a49-009c0215f78a Vendor specific [NEW] Primary Service /org/bluez/hci0/dev_EF_XX_YY_ZZ_AA_BB/service0020 99fa0030-338a-1024-8a49-009c0215f78a Vendor specific [NEW] Characteristic /org/bluez/hci0/dev_EF_XX_YY_ZZ_AA_BB/service0020/char0021 99fa0031-338a-1024-8a49-009c0215f78a Vendor specific
Maybe try to run one of this forks: https://github.com/kbancerz/linak_bt_desk or https://github.com/anetczuk/linak_bt_desk . Maybe they are handling desk better. For general BLE RE something like this: https://medium.com/@urish/reverse-engineering-a-bluetooth-lightbulb-56580fcb7546
I've also dissasembled Android app and used sniffing + reading dissasembled code to describe protcol, but now I don't remember much from it, it was long ago :\
EDIT: Did you registered desk via some android app ? I think there was some setting to allow bluetooth control etc. Maybe you need to turn it on ? Or maybe there is some other procedure now ( on some newer linak remotes etc )
Hmm, can't get it to work with either of the forks, unfortunately. Thanks for sharing the guide.
I'm using the iOS App, but can't see an option like that unfortunately but I guess that means it's unrestricted (I hope) - I'll see what I can figure out from reverse-engineering.
One small request (not time critical): Any chance you could see if you can extract your list of characteristics using bluetoothctl? Would make it much easier to try to compare what they have changed. No worries if not :)
Whats the command for characteristis extract ?
Had a chance to do further debugging on this one - I tried using some alternative scripts for the debugging. With https://github.com/apicore-engineering/linaktray, I can read out the state (i.e. height) of the desk without any problems, but I can't subscribe to changes or control the desk to a specific height. Appears to me (not being an expert) this may be a hardware limitation of the IDASEN desk
It might be that auto move is disabled is this controller. In mine I had to turn it on explicit via app ( and there was info not every controller will allow it ). Maybe you can find other controller and swap it ( not sure if there is any authorization between desk / controller )
if auto move is disabled, how are all of. the following able to do it: https://github.com/j5lien/esphome-idasen-desk-controller https://apps.apple.com/us/app/desk-remote-control/id1509037746 https://github.com/DWilliames/idasen-controller-mac
Describe the bug Appreciate this tool @zewelor - trying to get it working on the IKEA Desk running on a Raspberry Pi. Only deviation from the manual is that I'm not running it in a python venv, but it appears the bug below is unrelated.
If I remember correctly, it works correctly for you with an IKEA Desk? Any pointers would be greatly appreciated!
Debug gateway logs
Server (please complete the following information):