Skip to content

Multiple devices connection #52

Answered by Jakeler
rasbianer asked this question in Q&A
Discussion options

You must be logged in to vote

Yes, this works. Just start it multiple times, in separate processes.
I would not recommend to import it in as python module, while it is certainly possible to pass the correct parameters, ble-serial is not really designed for it. Use the command line interface instead.
To run it in parallel you can use the shell background job feature. Add the -p (port) option to make sure every instance has a unique path. Also you probably want to redirect the log output to keep it separate. Resulting command lines could look like:

$ ble-serial -d $ADDR1 -p /tmp/ttyBLE1 2> dev1.log &
[1] 178378

$ ble-serial -d $ADDR2 -p /tmp/ttyBLE2 2> dev2.log &
[2] 178397

The & at the end causes it to go into backgr…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@rasbianer
Comment options

Answer selected by Jakeler
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants