standing-desk-interceptor

Public

nv1t/standing-desk-interceptor

Loading…

Description

Imported from GitHub: nv1t/standing-desk-interceptor · commit 7ad7408 · license CC0-1.0

Description

I wanted to intercept the communication between my Flexispot standing desk buttons. This is the progress on the project

README

standing-desk-interceptor

I wanted to intercept the communication between my Flexispot E5B standing desk buttons. This is the progress on the project. It should work on any other flexispot desk as well, as i suspect they use the same button interface with nearly the same protocol. But this needs testing!

RJ45 Pins

PINColourName
1brownRES
2whiteSWIM
3purple?
4redWAKE
5greenRX/TX (cp/mc)
6blackTX/RX (cp/mc)
7blueGND
8yellowVCC

Using SWIM

The SWIM Debug interface is on the RJ45 Port, but not possible to use, due to set Read Protection, which can only be disabled by overwriting the Chip itself.

Protocol

Every Command starts with 0x9b and ends with 0x9d. The second byte is the length of the Message with the Endbyte included. It seems like the Byte after the length is some kind of messagetype, because it stays constant for button presses, height configuration and different messages.

Start ByteLengthTypePayloadChecksumEnd Byte
9b060200 006c a19d
9b071206 06 7d38 b79d
9b04117c c39d
9b0413bd 429d
9b0415bf c29d

The checksum is a CRC16 Modbus Checksum (07 12 06 06 7d results in 0x38b7) over the Length+Type+Payload

Button presses

A button press has the message type 0x02 and can be used as a fixed command. The checksum is steady and doesn't have to be recalculated.

Those are the known commands from the button controller to the motor controller with their respective button names.

Start ByteLengthTypePayloadChecksumEnd ByteName
9b060201 00FC A09dUP
9b060202 000C A09dDOWN
9b060204 00AC A39dM1
9b060208 00AC A69dM2
9b060210 00AC AC9dM3
9b060220 00AC B89dM

Height

(Credit goes to mikrocontroller forum https://www.mikrocontroller.net/topic/493524)

The height has the MessageType 0x12 and the payload is a simple 7 Segment display output.

As an example we look at the height answer: 9b 07 12 06 06 7d 38 b7 9d which represents 116

P1P2P3
06067d

If we convert this to a regular 7 Segment Display:

aaa
fb
fb
fb
ggg
ec
ec
ec
ddddp

Converting each byte to is binary representation and mapping each bit to a segment, we can generate the following table:

Nameabcdefgdp
P101100000
P201100000
P310111110

Mapping this to the example above we can display the number 116 as a 7-Segment output. (don't want to include pictures, just believe me or try it out)

Unkown MessageTypes

We don't know about the MessageTypes 0x11, 0x13, 0x15. They are send by the motorcontroller. They seem to be constant across different tables and don't bear any payload.

Comments

No comments yet. Be the first to ask about this board.

Askabout this board