question

oli avatar image
oli asked

Venus rPi and Bluetooth

I'm aware that Bluetooth is currently not supported in the Venus OS for Raspberry Pi. Is anyone currently working on this that I can share code/help with? Am wanting to pick up the data from a BlueSmart 24|16|1 in the Pi as I can't see that the Blue Smart has any cabled options (ve.Direct etc)

Venus OSchargerBluetooth
12 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.

Rob Duthie avatar image Rob Duthie commented ·

Hi

I have a Bluetooth USB adapter plugged into my Raspi with the current ver 2.33 software

and i am paired etc. just cant use the victron connect app to log in to it.

I have to start the Bluetooth manually on the raspi via bitvise to make it run not automated yet to start automatically on start up etc.

So just seeing what is being done to update the code to do this or to were to add the changes to the configuration folders etc.

0 Likes 0 ·
dsecco avatar image dsecco commented ·

Hi Rob, How did you enable the bluetooth ? I get no default controller available ? did you have to install something ?


Thank you

0 Likes 0 ·
Rob Duthie avatar image Rob Duthie dsecco commented ·

Hi

Used a USB Bluetooth dongle to start with (it has a internal one but have not got onto that yet) Need to check the the Bluetooth is not blocked by using this command.

rfkill list (checks for blocked bluetooth devices)
rfkill unblock bluetooth (unblock with this command)
hciconfig (to check BLE to running etc)

hciconfig hci0 up ( to start the Bluetooth module)

hcitool lescan ( scan for Bluetooth devices running)

bluetoothctl (to go into the Bluetooth device for control and testing etc)

Blue tooth rules added on the developer version: not in the Candidate version?
add to etc/udev/rules.d folder.
file name bluetooth.rules

ACTION=="add", SUBSYSTEM=="bluetooth", ENV{DEVTYPE}=="host", RUN+="bt-config %k"
ACTION=="remove", SUBSYSTEM=="bluetooth", ENV{DEVTYPE}=="host", RUN+="bt-remove %k"

I do have large txt file with all the extra commands for checking etc. if required.

Still not being able to link the Bluetooth device to the D bus to access data for the Victron connect app, as i am not a software engineer mainly hardware, but learning as i go.

Work in progress, as i know Victron are not interested in getting it functional for the Raspi etc.


0 Likes 0 ·
dsecco avatar image dsecco Rob Duthie commented ·

Thank you Rob, looks like the P3+ internal Bluetooth is not working.


root@raspberrypi2:~# rfkill list
0: phy0: wlan
Soft blocked: no
Hard blocked: no


0 Likes 0 ·
Rob Duthie avatar image Rob Duthie dsecco commented ·

Hi

Yes the internal BLE is turned off, working at that too, but an External USB Bluetooth does connect and pair.


0 Likes 0 ·
dsecco avatar image dsecco Rob Duthie commented ·

Sorry Rob, One more question which USB bluetooth did you use ? Did you use the Victron USB Bluetooth cable?

0 Likes 0 ·
Rob Duthie avatar image Rob Duthie dsecco commented ·

Hi

No i used a BLE to USB adapter directly into the USB port of the raspi

Mini USB Bluetooth CSR V4.0 Dongle Dual Mode Wireless Adapter Device 3Mbps 20M

0 Likes 0 ·
dsecco avatar image dsecco commented ·

USB Bluetooth works - now just need to work out how to get the data into Venus


10 82 81 a3 ....
[CHG] Device E7:B5:2F:2D:4D:E3 AdvertisingFlags:
06 .
[CHG] Device E7:B5:2F:2D:4D:E3 ManufacturerData Key: 0x02e1
[CHG] Device E7:B5:2F:2D:4D:E3 ManufacturerData Value:
02 6b 15 fd 67 9a 2e 9e a8 3d 74 2a 61 eb 10 97 .k..g....=t*a...
db ad 91 ab 88 29 b9 32 24 d7 ea .....).2$..
[CHG] Device E7:B5:2F:2D:4D:E3 AdvertisingFlags:
00 .
[CHG] Device E7:B5:2F:2D:4D:E3 ManufacturerData Key: 0x02e1
[CHG] Device E7:B5:2F:2D:4D:E3 ManufacturerData Value:
10 82 81 a3 ....
[CHG] Device E7:B5:2F:2D:4D:E3 AdvertisingFlags:
06 .
[CHG] Device E7:B5:2F:2D:4D:E3 ManufacturerData Key: 0x02e1
[CHG] Device E7:B5:2F:2D:4D:E3 ManufacturerData Value:
01 6b 15 fd 67 9a 31 9e a8 3d 00 00 e4 36 88 71 .k..g.1..=...6.q
[CHG] Device E7:B5:2F:2D:4D:E3 AdvertisingFlags:
00 .
[SmartSolar HQ1901YBPH1]# exit



0 Likes 0 ·
Rob Duthie avatar image Rob Duthie dsecco commented ·

Hi

Did you use USB adapter or the internal one BLE on the raspi?

0 Likes 0 ·
dsecco avatar image dsecco Rob Duthie commented ·

USB adapter using the bluetoothctl command

agent on, scan on pair XX:XX:XX:XX:XX iPhone then opened the app


Dave


0 Likes 0 ·
Rob Duthie avatar image Rob Duthie dsecco commented ·

Hi

I had to update my software to Ver 2.40-19 for the my BLE to open the app,

as the the candidate version Ver 2.33 BLE doesn't work etc.

So it just opens the generic Venus device but cant go further than that.

A bit more work required to open the app. it is either the App software needs up dating than the device software.

When i was testing on the candidate version for BLE, i did manged to see the app icon for my Muiltplus2 pop up but disappear again. But by using the testing ver 2.40-19 the BLE link is rock solid and logs on etc, just cant do anything with it.

0 Likes 0 ·
danny01 avatar image danny01 dsecco commented ·

Try to get the smart battery sensor data to the VRM Portal via RP3.

Pairing done, but I do not see data?!

Info XX:XX:XX:XX:XX


Paried: yes

Trusted: yes

Connected: yes


Any idea?

0 Likes 0 ·
1 Answer
dsecco avatar image
dsecco answered ·

USB external. Victon connect app is working also . Not that much you can do with it just change the Bluetooth pin and click on open VMR online portal. Not that sure how to get the data from the Bluetooth connection into canbus yet. more read needed

9 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.

Rob Duthie avatar image Rob Duthie commented ·

Hi

How did you connect the VictronConnect App? I can connect OK threw the wifi network OK but not Bkuetooth yet.

I am running candidate version 2.33.

0 Likes 0 ·
Rob Duthie avatar image Rob Duthie Rob Duthie commented ·

Hi

Ok the candidate is not fully configured for BLE as the Developer version does work now. Need to compare the two programs etc.

0 Likes 0 ·
sbcdave avatar image sbcdave Rob Duthie commented ·

Any new info on this?

0 Likes 0 ·
Rob Duthie avatar image Rob Duthie sbcdave commented ·

Hi

The Blue tooth works OK using version 2.40.34

0 Likes 0 ·
sbcdave avatar image sbcdave Rob Duthie commented ·

I'm a data acquisition team lead for a non profit called KiloWatts for Humanity, who installs solar minigrids for rural communities in developing countries.

I'm trying to add code, to our RPi remote data logger, I've been developing for 4 years-GitHub:sbcdave, that will allow it to connect to the nearby victron charge controller and inverter via Bluetooth, and pull data from them to send back to our servers. Bonus points if I can also adjust their config over the Bluetooth connection, since we're able to fire code remotely via SMS. It's an open source open engineered minigrid remote GSM/SMS SCADA system, and the added functionality of Bluetooth SCADA of the victron equipment would be a huge level up.

It sounds like you have achieved this functionally I'm after. I have a CS senior design team working on this for me right now as their capstone project, but they are hoping to abandon Bluetooth (worried about the difficulty I think) and instead use USB or Ethernet. Can you help point us in the right direction?

0 Likes 0 ·
Rob Duthie avatar image Rob Duthie sbcdave commented ·

Hi

Late reply. in the later versions 2.60-1 the USB bluetooth dongle works automatically now.

0 Likes 0 ·
neoneddy avatar image neoneddy Rob Duthie commented ·

Did the internal Bluetooth ever work?

0 Likes 0 ·
Rob Duthie avatar image Rob Duthie neoneddy commented ·

Hi

No, the software was not implemented at all for the internal Bluetooth.

0 Likes 0 ·
Innar Järva avatar image Innar Järva Rob Duthie commented ·

Hi, just asking if there are any updates with raspberry pi 4 image? Latest version from the tmp folder is from november 2019... Bluetooth dongle connects and transmits to external USB bluetooth, but Venus OS cannot see the MPPT behind it.

0 Likes 0 ·