Yeah good thinking, the app does have a pin which you need to provide, either via the app or physically, for it to connect (the first time).
I actually have Bluetooth packets sniffed from my phone that I’ve looked at in Wireshark. It looks like the authentication dialog between my phone and the mower is all there (SMP protocol). I did a factory reset, authenticated with my phone/Gardena app again and then sent a “cut the grass for 30 minutes” command. Then I stopped the sniffing. There also seems to be services and characteristics declared.
There’s a lot of information there, I’m just not sure what to do with it This is my first time working with Bluetooth and Wireshark so a lot of new information and concepts to grasp.
Ultimately I would have wanted to just replay the conversation between the phone and the mower but have not found a good tool to help with that yet.
Not sure it’s possible to get. But the trace you showed above showed just requests, ie stuff sent to the device. Not the responses. Could the responses have been filtered away?
The trace had the responses filtered out, I do have those as well (if necessary).
BUT…I managed to connect! I had tried to use bluetoothctl before but did it properly this time and factory reset the mower again and then tried to connect again.
I’ve not tried your gardena_bluetooth script but perhaps it’s not necessary any more?
Now that I’m connected through the computer, should I try to write values back to the mower, e.g. through bluetoothctl and the gatt menu (write)? Perhaps using a write command from the sniffed packets?
p.s. the **TEST** comes from me modifying your script and increasing the timeout in the connect method.
I accidentally had bluetoothctl running in another terminal and got the question to Accept pairing (yes/no). Don’t think I would have gotten the output if I hadn’t been running this. It looks identical to the output received earlier.
Soo… the mowers seem to work on a very different protocol than the watering units. You can find the protocol at this location in tha apk: sources/com/husqvarnagroup/dss/amc/blelib in the app.
In essence, they just use BLE services to transport raw packet data for their proprietary protocol which seemingly support events and other commands.
I will not have time to re-implement that in python. If anybody get’s to doing it i’ll review and accept pull requests for it on the library.
Following this topic as I’d love to see this working. All I would like is start, stop, and return to base control, recognising that the Bluetooth range isn’t very good so it would probably need some kind of outside aerial.
Any progress in this? i am also very interested in this. I have two mowers. One sileno city and one sileno minimo i would like to try this on:slightly_smiling_face:. Very god work btw