I want to send my command through the UART port to a module with asp.net core application which is run in Raspbian OS on Raspberry Pi 3.
When I use System.IO.Ports.SerialPort to open the serial port, I got UnathorizedAccessException. Is any way exist for send and receive command with UART port?
@Parsakarami where you able to get it working after applying @krwq suggestions?
I'll go ahead and close this given this was a question and it was answered.
Thank you @krwq for your suggestions, I can change the permission of the Raspberry Pi UART port with the following command :
sudo chmod 777 /dev/ttyS0
To check permission also can use this command :
ls -l /dev/ttyS0
After set permission on the UART port, my problem has been solved.
Thanks.
Most helpful comment
Thank you @krwq for your suggestions, I can change the permission of the Raspberry Pi UART port with the following command :
sudo chmod 777 /dev/ttyS0To check permission also can use this command :
ls -l /dev/ttyS0After set permission on the UART port, my problem has been solved.
Thanks.