Is it possible to communicate to a Serial ports of a client machine making use of Blazor Client?
If yes, any clue or links?
Blazor WebAssembly doesn't support to access local serial port on client. You will get the error below.
It's danger and illegal for accessing the serial port from client side. You could try another approach:
Write a Windows Service (I assume your machine runs Windows), configure it with necessary privileges. You will have to install something on the machine anyway. The service can be implemented in any language.
Add HTTP(S) server capabilities to it and choose communication protocol over HTTP. You could use JSON, Ajax, WebSockets, SignalR, etc.
· Send data byte from serial port to /.
· Recieve command byte from serve to serial port .
Build a web server to process the data with client.
Create a front page to display your data and control it.
If the answer doesn’t solve your issue, please provide more details of error that will help us track down what’s happening.
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
4 people are following this question.