jagheterfredrik / wallbox-pwn

Gain root access to Wallbox chargers such as Pulsar Plus, Copper SB
13 stars 6 forks source link

Not working on Bluetooth UBlox (v5.17.87) #6

Closed Florissilfhout closed 6 months ago

Florissilfhout commented 6 months ago

Hi @jagheterfredrik,

Information:
Windows 11, Python3.11

I wanted to use your solution but encountered the following error:

c:\Users\X\Downloads\wallbox-pwn-main>python wallbox-pwn.py
Please choose Wallbox:
0) WBXXXXXXX (6C:1D:EB:XX:XX:XX)
> 0
Identified Bluetooth chip: UBlox
Traceback (most recent call last):
  File "c:\Users\X\Downloads\wallbox-pwn-main\wallbox-pwn.py", line 149, in <module>
    asyncio.run(main())
  File "C:\Program Files\Python311\Lib\asyncio\runners.py", line 190, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "C:\Program Files\Python311\Lib\asyncio\runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Python311\Lib\asyncio\base_events.py", line 653, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "c:\Users\X\Downloads\wallbox-pwn-main\wallbox-pwn.py", line 102, in main
    await wb.connect(wallboxes[chosen_idx])
  File "c:\Users\X\Downloads\wallbox-pwn-main\wallbox-pwn.py", line 50, in connect
    await self.client.start_notify(self.device_definition.tx, self.handle_rx)
  File "C:\Users\X\AppData\Roaming\Python\Python311\site-packages\bleak\__init__.py", line 834, in start_notify
    await self._backend.start_notify(characteristic, wrapped_callback, **kwargs)
  File "C:\Users\X\AppData\Roaming\Python\Python311\site-packages\bleak\backends\winrt\client.py", line 974, in start_notify
    await winrt_char.write_client_characteristic_configuration_descriptor_async(
OSError: [WinError -2140864497] The attribute requires encryption before it can be read or written

So I made a small adjustment to your code on line 25:
BluetoothDevice("UBlox", False, "2456e1b9... to BluetoothDevice("UBlox", True, "2456e1b9...

After this adjustment, everything worked as expected and thanks to you, my Wallbox is now rooted!

jagheterfredrik commented 6 months ago

That's great! If you don't mind could you provide some more info on your Wallbox: model, country and approximate date of purchase?

Florissilfhout commented 6 months ago

Sure!
Model: Wallbox Pulsar Plus
Country: Netherlands
Purchase Date: 11 feb 2024
Originally Installed FW: v5.17.87 (Restoring resulted in the same FW)
Serialnumber: 1088***

By now, I've updated to v6.1.19 and I can confirm root access is still present including the MQTT bridge.

jagheterfredrik commented 6 months ago

Thanks!