mjbrown/bgapi

Problem with other compiled exe with bluegiga protocol.

Closed this issue · 3 comments

Whenever I open the .exe application with bgpai together, the application crashes.
I manually set the com port but the issue is not resolved.

Is there any way to peacefully use two Bluegiga dongle in one computer? Also one for compiled application and one for python bgapi scripts?

I cannot really understand the issue here. What .exe file? What application?

For reference: I'm using multiple BlueGiga dongles on one computer. Just make sure to use different COM ports for each BlueGigaClient/BlueGigaServer instance, e.g.:

import bgapi.module
client_a = bgapi.module.BlueGigaClient(port='COM4')
client_b = bgapi.module.BlueGigaClient(port='COM5')

Of course it is also possible to use different applications for different ports, thus you could open up the BLE GUI from the BlueGiga SDK, attach it to COM4 and have a Python script using bgapi that attaches to COM5.

Hope that helps,
Patrick

I attached two bluegiga bled112 dongle, and found only COM ports with smaller number (in this case, 'COM4') works.

Whenever I try to connect latter, below error shown. two dongles work find when connected solely, and the error on 2nd com port replicates with all possible combination of dongle attachment.

File "C:\Python27\lib\site-packages\pygatt\backends\bgapi\bgapi.py", line 165, in _open_serial_port
"No BGAPI compatible device detected")
pygatt.exceptions.NotConnectedError: No BGAPI compatible device detected

Uhm,

you are using pygatt's bgapi backend which AFAIK has got nothing to do with the bgapi library here. Maybe you should report your error on their Issues page?