This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Run multiple dongles in parallel

Hello Developers

I have to solve a problem for which I could not find much information about online, so I am hoping you guys can help me.

I am developing a WIN32 application using pca10031 dongle and S130 driver library, and I need to operate two dongles in parallel. Not programming them or anything like that (for which I have found plenty of information about), but use two dongles to let 2 centrals connect to the application. The application will soon be part of a production-line test facility, so please don't argue why not to do this, I just need to make it Work.

My approach so far has been to start two threads, one for each dongle and try to start the dongles using sd_rpc_serial_port_name_set and sd_rpc_open. First dongle opened successfully, but second dongle failed. It is quite obvious why; only one soft-device "lives" inside the S130_nrf51_ble_driver.dll which I have loaded only once, and all threads share the same memory space inside the process.

My question is, which approach should I use instead?

Next step could be to start a process for each dongle, load the dll into the new process along with a port name and interface the dongles from there. But I have never done this before and I'm concerned to spend too much time going down the wrong road.

Can anyone suggest a better way to interface two dongles from the same pc application?

Best regards Rasmus

Related