Posts: 1
Joined: Thu Aug 03, 2017 8:22 am

[Java] Sending String to screen session

Thu Aug 03, 2017 8:30 am


I'm trying to do the task which will use the Java on Pi 3 to do serial talk to an external device.

But I just have no idea.

I know Java has Process object which I can invoke exec(String[] cmd) so I should run exec("screen", "/dev/ttyUSB0", "9600") from the main method.

The part I have no idea is to flushing some String into that screen session so the device can interpret the String further.

Thanks in advance for any suggestion.

Return to “Java”

Who is online

Users browsing this forum: No registered users and 1 guest