gRPC over USB serial communication

1,612 views
Skip to first unread message

Benjamin Szőke

unread,
Aug 3, 2021, 10:08:30 AM8/3/21
to grpc.io
Hi!

Can gRPC use serial port communication?

I would like to use gRPC between an embbedded Linux board (like Raps Pi) and Windows 10 PC over USB gadget serial port. I know there is an easy solution to use USB gadget ethernet instead of it but i have really pure old solution which is a simple "home-made" JSON procedura call between C# (Win 10 PC) and Python (Linux board) over serial com port. My plan is to replace it with gRPC because there is no point in further development in my JSON protocol because gRPC is better and more complete.

Luckily on USB gadget serial the data speed is about 10 MB/s so it could be absolutely enough to do any gRPC processes over it.

Frédéric Martinsons

unread,
Aug 3, 2021, 12:22:30 PM8/3/21
to Benjamin Szőke, grpc.io
Hello Benjamin,

I worked on having USB support withing grpc several months ago. THere is a work in progress on my personnal fork (branch grpc-usb-1.35.0: https://github.com/fmartinsons/grpc/tree/grpc-usb-1.35.0) .
I guess USB serial would be pretty close to that but unfortunately this is still a work in progress that is not fully functional and I have not plan to work on this in a close future.

I hope this example can help.

For information, you can find in this thread (https://groups.google.com/g/grpc-io/c/ZS7yqRRfviY) a status on having USB (or USB serial I guess) upstreamed in gRPC project

--
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+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/d0062725-17ac-407d-acab-577279f0f474n%40googlegroups.com.

Livius

unread,
Aug 3, 2021, 6:08:09 PM8/3/21
to grpc.io
As i see you are started to implement a libusb solution in an endpoint interface, it is overkill solution for me.

It is really far from my planing. Basicly the simple question is that can gRPC support RS232 communication? USB serial comminaction is a simple TX/RX communication like UART, so it is just a virtual com port in a SW driver but their speed is a real USB 2.0 High-speed (about 10 MB/s).
Reply all
Reply to author
Forward
0 new messages