Bluetooth API decoding protocol for GAN 356i carry

Elli_Owald

Member
Joined
Mar 25, 2023
Messages
3
Location
Germany
I have a GAN 356i carry and want to read the current state of the cube using the Bluetooth API interface. I am already able to get notifications after each move including the package of 20 Bytes for each cube state. However, because the protocol uses encryption (different to the protocol used for other smart cubes) I am not able to decode the 20 Bytes packages into meaningful state representations. My question: is there ready-to-use decoding software code available (in Java or Python) for the GAN 356i carry? I’m only looking for the current state decoding not for any other communication with the cube. I have already noticed that software like cstimer.js seem to have hacked the protocol but as I am unfamiliar with Java so far I am not sure which part of the lengthy code is doing the state decryption. I would be very grateful for guidance on that topic.
 
I have a GAN 356i carry and want to read the current state of the cube using the Bluetooth API interface. I am already able to get notifications after each move including the package of 20 Bytes for each cube state. However, because the protocol uses encryption (different to the protocol used for other smart cubes) I am not able to decode the 20 Bytes packages into meaningful state representations. My question: is there ready-to-use decoding software code available (in Java or Python) for the GAN 356i carry? I’m only looking for the current state decoding not for any other communication with the cube. I have already noticed that software like cstimer.js seem to have hacked the protocol but as I am unfamiliar with Java so far I am not sure which part of the lengthy code is doing the state decryption. I would be very grateful for guidance on that topic.
I have open sourced a javascript implementation that can talk to this cube and there is a rust implementation on github too. The simplest approach is to brute force the encryption key for javascript, but in java/python you may be able to get the key directly from the cube as it is in the manufacturer data, and that's much quicker (see tpscube).
 
That is very helpful - thank you very much!
I will have a deeper look at the code next week to find the reset function and translate it to Python.
 
Back
Top