JorgePe / BOOSTreveng

Reverse engineering the LEGO BOOST Hub
MIT License
168 stars 35 forks source link

Create powered_up_dissector.lua #34

Closed dlech closed 6 years ago

dlech commented 6 years ago

This is a protocol dissector for Wireshark. It parses GATT characteristic data into human-readable form. Currently, only device info (0x01) commands are implemented.

dlech commented 6 years ago

capture

cpseager commented 6 years ago

Have you seen this repo, will have lots of info you could add into this

https://github.com/nathankellenicki/node-poweredup

Here are a few gotchas that you might like to look at

cpseager commented 6 years ago
 var typeLookup:{[id:number]:string} = {};
 typeLookup[0x00] = TYPE_EMPTY;
 typeLookup[0x01] = TYPE_MOTOR;
 typeLookup[0x02] = TYPE_TRAIN_MOTOR;
 typeLookup[0x08] = TYPE_LIGHTS;
 typeLookup[0x14] = TYPE_VOLTAGE;
 typeLookup[0x15] = TYPE_CURRENT;
 typeLookup[0x16] = TYPE_PIEZO;
 typeLookup[0x17] = TYPE_RGB;
 typeLookup[0x22] = TYPE_TILT;
 typeLookup[0x23] = TYPE_DISTANCE;
 typeLookup[0x24] = TYPE_GENERIC;
 typeLookup[0x25] = TYPE_COLOR;
 typeLookup[0x26] = TYPE_INTERACTIVE_MOTOR;
 typeLookup[0x27] = TYPE_INTERNAL_MOTOR;
 typeLookup[0x28] = TYPE_INTERNAL_TILT;
 typeLookup[0x29] = TYPE_DUPLO_TRAIN_MOTOR;
 typeLookup[0x30] = TYPE_DUPLO_TRAIN_PIEZO;
 typeLookup[0x31] = TYPE_DUPLO_TRAIN_COLOR;
 typeLookup[0x32] = TYPE_DUPLO_TRAIN_SPEEDO;
 typeLookup[0x37] = TYPE_REMOTE_BUTTON;
 typeLookup[0x38] = TYPE_REMOTE_CURRENT;