USB transport

283 views
Skip to first unread message

Robert Bielik

unread,
Feb 2, 2018, 11:51:23 PM2/2/18
to grpc.io
Hi all,

Has there been any work on using USB HID as a gRPC transport ? 

Regards
/Robert

Mark D. Roth

unread,
Feb 7, 2018, 1:54:10 PM2/7/18
to Robert Bielik, grpc.io
As far as I know, no one has requested this before, so it's not on our roadmap.

What is your use-case for this?  I'm not familiar with USB HID, but a quick web search indicates that it's for connecting things like keyboards and mice via USB, and it's not clear to me why you'd want to use gRPC for that.

--
You received this message because you are subscribed to the Google Groups "grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+unsubscribe@googlegroups.com.
To post to this group, send email to grp...@googlegroups.com.
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/bfe31c0a-ba0a-4610-8e02-80987a4a7607%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Mark D. Roth <ro...@google.com>
Software Engineer
Google, Inc.

Abhishek Parmar

unread,
Feb 7, 2018, 1:57:46 PM2/7/18
to Mark D. Roth, Robert Bielik, grpc.io
It is actually very useful for communicating with microcontrollers. We do something similar with just sending protobuf request responses using nanopb. Our microcontroller is resource limited so running the full grpc stack is not feasible on that side, but might be useful in other situations.


For more options, visit https://groups.google.com/d/optout.



--
-Abhishek

Vijay Pai

unread,
Feb 7, 2018, 4:31:46 PM2/7/18
to grpc.io
As Mark mentioned, it's not on our roadmap, but if you wanted to put one together, I can suggest https://github.com/grpc/grpc/blob/master/doc/core/transport_explainer.md for an idea of what transports need to do. If the goal is a simple message-oriented transport without reference to complex flow control, I can suggest using the in-process transport as a model for how to build a transport, as it's only a few hundred lines of code and implements the transport ops required to actually have working RPCs for its context; this might make a lot of sense if your controller is memory-mapped. Alternatively, if your controller is mapped as a file, a path forward might be to make a new endpoint akin to the UDS endpoint. This would mean that you'd be speaking HTTP/2 over your HID, but again it may be a fairly simple integration.

Good luck!

- Vijay

Robert Bielik

unread,
Feb 8, 2018, 11:18:21 AM2/8/18
to Vijay Pai, grpc.io
Mark, as Abhishek mentioned, it is quite useful in cases where a target device (usually embedded) has no networking. Thanks Vijay, I'll have a look at your suggestions.

Regards
/Robert

--
You received this message because you are subscribed to a topic in the Google Groups "grpc.io" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/grpc-io/rCOTPM65A7U/unsubscribe.
To unsubscribe from this group and all its topics, send an email to grpc-io+unsubscribe@googlegroups.com.

To post to this group, send email to grp...@googlegroups.com.
Visit this group at https://groups.google.com/group/grpc-io.

Frédéric Martinsons

unread,
Feb 13, 2021, 3:55:42 AMFeb 13
to grpc.io
Hello all,

Some years ago we had the exact same use case where we have an android application which drive an embedded devices (in USB Accessory Mode). The only way to communicate with this device is through USB channel and we wanted to use gRPC.
So we develop the USB transport channel in gRPC bask in 2018 (based on gRPC v1.13.0).
The guy from our teams that made these patches had now leaved but I'll be glad to submit a patch series if the USB support is still foreseen to be support but I may not be able to answer all the questions about tricks that came in this code.

Do you want to receive a merge request ?

Thanks for the good works gRPC guru.

On Thursday, 8 February 2018 at 17:18:21 UTC+1 robert...@gmail.com wrote:
Mark, as Abhishek mentioned, it is quite useful in cases where a target device (usually embedded) has no networking. Thanks Vijay, I'll have a look at your suggestions.

Regards
/Robert

2018-02-07 22:31 GMT+01:00 'Vijay Pai' via grpc.io <grp...@googlegroups.com>:
As Mark mentioned, it's not on our roadmap, but if you wanted to put one together, I can suggest https://github.com/grpc/grpc/blob/master/doc/core/transport_explainer.md for an idea of what transports need to do. If the goal is a simple message-oriented transport without reference to complex flow control, I can suggest using the in-process transport as a model for how to build a transport, as it's only a few hundred lines of code and implements the transport ops required to actually have working RPCs for its context; this might make a lot of sense if your controller is memory-mapped. Alternatively, if your controller is mapped as a file, a path forward might be to make a new endpoint akin to the UDS endpoint. This would mean that you'd be speaking HTTP/2 over your HID, but again it may be a fairly simple integration.

Good luck!

- Vijay

On Friday, February 2, 2018 at 8:51:23 PM UTC-8, Robert Bielik wrote:
Hi all,

Has there been any work on using USB HID as a gRPC transport ? 

Regards
/Robert

--
You received this message because you are subscribed to a topic in the Google Groups "grpc.io" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/grpc-io/rCOTPM65A7U/unsubscribe.
To unsubscribe from this group and all its topics, send an email to grpc-io+u...@googlegroups.com.

Frédéric Martinsons

unread,
Feb 13, 2021, 5:49:05 AMFeb 13
to grpc.io

There is another thread talking about USB support: https://groups.google.com/g/grpc-io/c/MZCVUShRMkM/m/y3T_fs8iAQAJ but I cannot answer there since my messages are automatically deleted (don't know why)

Frédéric Martinsons

unread,
Feb 24, 2021, 6:07:01 AMFeb 24
to grpc.io

Anybody there ? 

I think I'll made the above mentionned merge request and we will see if it is accepted or not.
Reply all
Reply to author
Forward
0 new messages