Jump to content

Xamarin Android serial port reading doesn't work but writing


kreestyahn

Recommended Posts

I cannot receive data on serial port ttyS5. I able to write onto it, but the reading doesnt work. I'm using this https://github.com/officialdoniald/Xamarin.Android.SerialPort . I tried using adb shell commands like "cat < /dev/ttyS5" but there is no received data either. When I try to send data with "LibSerialPort.WriteLine("text")" I can see it in Hercules Terminal so the writing works. In Visual Studio Output there is this line:

[c.SerialPortPoc] type=1400 audit(0.0:532): avc: denied { read write } for name="ttyS5" dev="tmpfs" ino=2487 scontext=u:r:untrusted_app_27:s0:c512,c768 tcontext=u:object_r:serial_device:s0 tclass=chr_file permissive=1 app=SerialPortPoc.SerialPortPoc

Device: Orange Pi Zero 2, Android 10

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines