Skip to content

Development

Peter Hutterer edited this page Jul 15, 2019 · 4 revisions

Resetting devices

Tuhi stores the device data in $HOME/.local/share/tuhi/<btaddress> (i.e. $XDG_DATA_HOME) The primary file is settings.ini which is how Tuhi remembers devices it has already seen. Removing that device and/or the whole folder makes the device unknown again and the device has to be re-registered.

BlueZ ManufacturerData

There's an oddity about the ManufacturerData property on the devices. That property is a 7-byte value when the device is running normally but a 4-byte value when the device is in register mode. The update of that property is delayed though, so a device may be in register mode before the ManufacturerData reverts to 4 bytes. And, crucially, it may stay in 4-byte mode for a successful registration but switches to 7 bytes on the next connection. When a registration times out, the device may stay in 4-byte or 7-byte ManufacturerData, it depends on some previous state.

Clone this wiki locally