libzmq icon indicating copy to clipboard operation
libzmq copied to clipboard

Transmission of messages via USB possible?

Open carlosvalderrama opened this issue 4 years ago • 10 comments

Please use this template for reporting suspected bugs or requests for help.

Issue description

Is it possible to use libzmq for the communication between a USB host and device? If not, has this feature ever been under consideration?

Environment

  • libzmq version (commit hash if unreleased): latest
  • OS: all

carlosvalderrama avatar Nov 25 '20 06:11 carlosvalderrama

No it is not possible, someone would need to add support for USB as a transport protocol for this to work. If you want to implement this, feel free to send a PR.

bluca avatar Nov 25 '20 09:11 bluca

Thanks @bluca for the prompt response. I trust you have set up some infrastructure and abstraction in the project in order to make such additions possible. Could you please give me some pointers to the code where the current transport protocols are implemented? I am completely new to the project, so thanks in advance for your help.

carlosvalderrama avatar Nov 25 '20 09:11 carlosvalderrama

You can check how the websocket (WS) transport was added, there's a few new classes to implement it

bluca avatar Nov 25 '20 09:11 bluca

Hi, I'm interested in something like that as well and was thinking to build on libusb. @carlosvalderrama, did you end up implementing something and have suggestions/tips ?

eniv avatar Nov 30 '21 17:11 eniv

@eniv No, sorry. We chose not to go along this route.

carlosvalderrama avatar Dec 04 '21 07:12 carlosvalderrama

OK, Thank you.

eniv avatar Dec 05 '21 02:12 eniv

Hi, I'm interested in something like that as well and was thinking to build on libusb. @eniv did you end up implementing something and have suggestions/tips ?

MoreTore avatar Feb 24 '23 12:02 MoreTore

Hi @MoreTore, After more research I also ended up not going that route. The USB connection topology is more limited than LAN and therefore quite a few of ZMQ's communication patterns are not applicable. The ZMQ API is friendly and concise but for my use case it didn't justify forcing the ZMQ infrastructure for USB bulk data transfers.

eniv avatar Feb 24 '23 18:02 eniv