(DeviceUtils.getAPI("serial0", SerialPortAPI.class));
final ByteChannel channel = api.getChannel(null);
System.out.println("Writing a test string to the serial port.");
PrintWriter w = new PrintWriter(new OutputStreamWriter(
new ChannelOutputStream(channel, 1000)));
w.print("Hello World!\r\n");
w.print("This is a second line of text!\r\n");
w.print("Just for fun, a third line!\r\n");
w.flush();