Hello
a lot of time has passed. Did you solve this problem?
I have a computer with android 4.4.2, this comes with 4 serial ports rs232 (I use ttyS6). It works very well only after running Serial_Port_Api (Console option). but if I do not run I can not read data by ttyS6. The code is:
Sub Activity_Create(FirstTime As Boolean)
' '''coment THI NOT FUNTION : Result = Ph.Shell("stty -F /dev/ttyO0 115200 cs8 -parenb -cstopb -crtscts", Arh, StdOut, StdErr) ' set 115200,N,8,1 '' this no funtion
sout = File.OpenOutput("","/dev/ttyS6",True) ' open serial output
sinp = File.OpenInput("","/dev/ttyS6") ' open serial input
......
......
Sub Timer2_Tick
''desde aqui serial
Dim c, rxlen,vDes,vHas,i As Int
timer2.Enabled = False
rxlen = sinp.BytesAvailable ' check if bytes available on serial input Label5.Text = rxlen
If rxlen > 0 Then
sinp.ReadBytes(inpkt,0,rxlen) ' read pending characters For c = 0 To rxlen-1' build string from characters
.......
........
Juan