question

Kevin Windrem avatar image
Kevin Windrem asked

VictronConnect to Cerbo via bluetooth

I have discovered a bug in Cerbo's bluetooth PIN mechanism for use with VictronConnect.

A PIN that contains leading zeros is not handled properly. For example, 012345 does NOT work but 123456 does.

Entering a PIN of 000000 DOES work.

Changing the PIN from with VictronConnect appears to have the same issue with leading zeros.

Venus v2.72~4, VictronConnect v5.42, iOS 14.6

Also tested on a Raspberry PI 4 running the same version of Venus. Same results.

I've tried using dbus-spy to change the PIN but this has it's own set of problems. Alpha-numerics are accepted. Leading zeros are lost. E.g., entering 000000 results in 0; 0123345 results in 12345.

dubs-spy also prevents adding a 6-digit code again from the Cerbo menu IF I enter less than 6 characters or numbers that contain zeros at the beginning. E.g, 000000 results in 0, then the menu only allows a single number !!!!!

Venus OSVictronConnectBluetooth
2 comments
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

Paul B avatar image Paul B commented ·
Hi kevin did this affect the 000000 standard password or only changed ones with a leading zero, as I have a client who currently cant connect via bluetooth to his cerbo
0 Likes 0 ·
Kevin Windrem avatar image Kevin Windrem Paul B commented ·
Setting the PIN to the default to 000000 (6 zeros) DOES work.
0 Likes 0 ·
1 Answer
Thiemo van Engelen (Victron Energy staff) avatar image
Thiemo van Engelen (Victron Energy staff) answered ·

Hi @Kevin Windrem

Thank you for reporting this. I can say that we are able to reproduce the problems with pincodes starting with 0, but I cannot give any indication on when they will be fixed.

Some background for tinkerers/programmers:
The pincodes starting with 0 are interpreted wrong, because they are interpreted as octal numbers.

The problem with dbus-spy is that it converts the entered value into a number, removing leading zeros. This leads to localsettings storing a 5 digit string and the gui does not allow changing the length. My advice is to use "dbus -y com.victronenergy.settings /Settings/Ble/Service/Pincode SetValue 123456" to change the pincode using the command line as this sends the value as string. This still has the problem that values starting with a 0 are interpreted wrong.

Kind regards,

Thiemo van Engelen

1 comment
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

Kevin Windrem avatar image Kevin Windrem commented ·
I don't see there's a big rush to fix this. However it may be good to add to the manual. I spent many hours trying to figure out why my PIN wasn't working.
0 Likes 0 ·