Jakeler / ble-serial

"RFCOMM for BLE" a UART over Bluetooth low energy (4+) bridge for Linux, Mac and Windows
https://blog.ja-ke.tech/tags/#bluetooth
MIT License
274 stars 38 forks source link

BLE serial link for multiple devices #65

Closed KamiK2K closed 2 years ago

KamiK2K commented 2 years ago

Hi,

I need to use this script and tools to provide multiple COM ports for multiple BLE devices. I tried modifying the ble-serial packages to make this possible but I had no luck. Is there a way to use modify this tool to provide multiple OCM ports for multiple BLE devices (one for each device obviously)?

Thank you in advance, Kami

Jakeler commented 2 years ago

Hi Kami, this is already possible, without modifications. Just run ble-serial mutiple times, I have described how this works for Linux in https://github.com/Jakeler/ble-serial/discussions/52#discussioncomment-1782799. On Windows it is only slightly different.

Also make sure to specify the right port for every additional instance, so in this example --port BLE2.

I should probably add a section to the readme, cause this question comes up quite regularly.

KamiK2K commented 2 years ago

I appreciate your help and support Jake, I worked and it is perfect. This is a very useful tool to use.

Just a quick question, I am assuming that it is possible to establish more than two BLE<->COM links right?

I am using two BLE devices right now and I was wondering if it is possible to establish up to five BLE<->COM port links.

Sincerely, Kami

Jakeler commented 2 years ago

Of course you can have >2, the other discussion was also about several devices, I was just using 2 as example.

Only limiting factor is the bluetooth baseband layer, which uses a Active Member Address (AMA, 3 bit), so max. 8 values. Since address zero is always occupied by the host, you should be able to connect up to 7 devices.