Uplift Desk Automation
Message Syntax
Transmit
A transmitted message has the following syntax.
0xF1, 0xF1, <cmd>, 0x00, <crc>, 0x7E
0xF1, 0xF1indicates the message startcmdis one of:0x01- Up0x02- Down0x2B- Stop0x03- Save sitting height0x04- Save standing height0x05- Recall sitting height0x06- Recall standing height0x06- Sync
crcis the sum of the bytes at index 2 and 3.0x7Eindicates the end of message.
Receive
A received message has the following syntax.
0xF2, 0xF2, <cmd>, <len>, <data...>, 0x0F, <crc>, 0x7E
0xF2, 0xF2indicates the message startcmdis one of:0x01- Height value0x25-UnknownSit Height (Calculation Unknown)0x26-UnknownStand Height (Calculation Unknown)0x27- Unknown0x28- Unknown0x37- Unknown0x38- Unknown0x39- Unknown- Unknown0x40
lenindicates how many messages will be sent next, excluding the CRC and EOT.datawill contain the incoming data values, explained for height readings below.0x0F- Unknowncrcwill be the sum of bytes at index 2 up to the CRC.0x7Eindicates the end of message.
Received Height Message
When a new height value comes in, the message will look something like this:
0xF2, 0xF2, 0x01, 0x03, 0x01, 0x1B, 0x0F, 0x2F, 0x7E
In this case, the desk was at 28.3". Here is how we can calculate that.
- First off, the command is
0x01, so we know we're about to receive height data. - The next byte tells us to listen for 3 data bytes.
- The relevant data comes in as
0x01, 0x1B. This will be converted to a height value later. - Then, we add all of the previous bytes (other than the header) to verify the CRC is correct.
0x01 + 0x03 + 0x01 + 0x1B + 0x0F = 0x2F
Height Calculation
To do. For now, see https://embedded-elixir.com/post/2019-01-18-nerves-at-home-desk-controller/.
Sources
https://hackaday.io/project/4173-uplift-desk-wifi-linkhttps://hackaday.io/project/164931-standing-desk-remote-controlHeight Calculation@justintout Spec DocumentationFCC ListingProduct Listing
/u/deadman96385
https://github.com/deadman96385/uplift_desk_controller_app/blob/a58bcadfb77ac993751758465f1cf20f71d6d8fd/app/src/main/java/com/deadman/uplift/BluetoothHandler.javahttps://imgur.com/a/MUbXwnMhttps://i.imgur.com/DyMf3Ee.jpghttps://i.imgur.com/KtsWpVQ.jpghttps://i.imgur.com/BS62C1E.jpghttps://i.imgur.com/woWoQMe.jpghttps://i.imgur.com/Lta5Nab.jpg