bluetooth icon indicating copy to clipboard operation
bluetooth copied to clipboard

invalid field detected *device.Device1Properties.Bonded

Open vlappa opened this issue 2 years ago • 4 comments

I'm running code (on Linux) based on the heartrate-monitor example. The server is a board with a esp32 chip, using the esp32 BLE C++ library. I do get this warning. Any idea what triggers this?

scanning... WARN[0000] MapToStruct: invalid field detected *device.Device1Properties.Bonded WARN[0000] MapToStruct: invalid field detected *device.Device1Properties.Bonded WARN[0000] MapToStruct: invalid field detected *device.Device1Properties.Bonded WARN[0000] MapToStruct: invalid field detected *device.Device1Properties.Bonded WARN[0000] MapToStruct: invalid field detected *device.Device1Properties.Bonded WARN[0000] MapToStruct: invalid field detected *device.Device1Properties.Bonded WARN[0000] MapToStruct: invalid field detected *device.Device1Properties.Bonded WARN[0000] MapToStruct: invalid field detected *device.Device1Properties.Bonded WARN[0000] MapToStruct: invalid field detected *device.Device1Properties.Bonded WARN[0000] MapToStruct: invalid field detected *device.Device1Properties.Bonded found device: 40:22:D8:3B:ED:16 -59 ESP32 WARN[0000] MapToStruct: invalid field detected *device.Device1Properties.Bonded connected to 40:22:D8:3B:ED:16 discovering services/characteristics found service adaf0200-c332-42a8-93bd-25e905756cb8 found characteristic adaf0201-c332-42a8-93bd-25e905756cb8

vlappa avatar Sep 06 '23 08:09 vlappa

Hello @vlappa I would guess that the version of BlueZ installed on your Linux machine does not match version we are using for this package.

What kernel version/BlueZ version are your running?

deadprogram avatar Sep 09 '23 06:09 deadprogram

Arch Linux: bluez 5.69-1 6.1.38.12.realtime1-4-rt-lts 6.1.53-1

I think I got the same message on both.

vlappa avatar Sep 15 '23 09:09 vlappa

Can confirm, I have had this pop up when playing around with Bluez configs. In my case, I was compiling 5.69 for a Raspberry Pi 4 and playing with the configuration to see if that fixed the Bluetooth connectivity issues I was having (it didn't). Reinstalling the original 5.55 that came with Raspbian cleared things up.

However, I believe what caused it was enabling experimental features in Bluez which I think added extra fields to its Device1 object that it registers on DBus thus the errors. They are harmless, but obviously not fun to see.

TirelessDev avatar Sep 22 '23 10:09 TirelessDev

https://github.com/tinygo-org/bluetooth/pull/216 fixes this issue by not using the code that causes these warnings.

aykevl avatar Jan 03 '24 16:01 aykevl

Now closing since 0.9.0 has been released. Thank you!

deadprogram avatar Mar 24 '24 17:03 deadprogram