pluxbiosignals / python-samples

Python programming examples using PLUX's API.
https://pluxbiosignals.com
Apache License 2.0
13 stars 4 forks source link

Connecting to openBAN on Raspbian #4

Closed doctorhenry closed 3 years ago

doctorhenry commented 3 years ago

I am attempting to connect to the openBAN which is connected to a BVP sensor, but I am getting the error "The communication port does not exist or it is already being used." I pass the same address at the back of the openBAN as the address parameter and the script is able to import the plux module. Is this solution able to run on Raspbian (Raspberry Pi 4)?

DFNOsorio commented 3 years ago

Hello,

It should be able to run on a Rasp4, although you have to pair the device with the raspberry before running the script. (https://biosignalsplux.com/downloads/docs/manuals/biosignalsplux_Solo_User_Manual.pdf page 51).

doctorhenry commented 3 years ago

Hello,

Thank you for getting back to me. I have successfully paired with the openBAN device but the same error persists. I am running the OneDeviceAcquisitionExample.py and using the exampleAcquisition function as seen in the script while I am attempting to establish a connection. I haven't made any changes to the function, but have changed Bluetooth address when calling the function at the end of the script. Do you have any other suggestions?

DFNOsorio commented 3 years ago

Hello,

Sorry for the late response. In the OneDeviceAcquisitionExample.py file, on line 20 replace plux.MemoryDev.__init__(address) with super().__init__(address). It should work.

doctorhenry commented 3 years ago

Hello.

It turns out the code was fine and the issue was with the Bluetooth address. The super() approach resulted in an error that about the argument type being passed, but the original code works fine. Thank you for all of your help. I will now work on interpreting the data.