CDC ACM api

emresensoy

New Member
Licensed User
Longtime User
Is there any serial port library?
How can I change /dev/ttyACM0 parameters (baud, handshake, parity, stop bit etc) ?
My tablet is rooted, and i can transfer
data with shell command that;
B4X:
suShell("chmod 666 /dev/ttyACM0")
suShell("cat /mnt/local/example.txt > /dev/ttyACM0")
B4X:
Sub suShell (komut As String)
Dim Command, Runner As String
Dim stdout, stderr As StringBuilder
Dim Result As Int
    Runner = File.Combine(File.DirInternalCache, "runner")
    Command = File.Combine(File.DirInternalCache, "command")
    File.WriteString(File.DirInternalCache, "runner", "su < " & Command)
    File.WriteString(File.DirInternalCache, "command", komut & CRLF & "exit") 'Any commands via crlf, and exit at end 
    stdout.Initialize
    stderr.Initialize
    Result = Ph.Shell("sh", Array As String(Runner), stdout, stderr)

End Sub
 

emresensoy

New Member
Licensed User
Longtime User
yes but there is only baudrate option,
i need to communicate with 7data bit, 2 stop bit, even parity and hardware handshake,
how can i set these parameters in usbserial?
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…