UsbSerial icon indicating copy to clipboard operation
UsbSerial copied to clipboard

How to communicate with more than one USB Serial devices

Open sburdka opened this issue 9 years ago • 3 comments

I am trying to make android code work which can communicate with multiple USB serial devices and android tablet.

I am able to communicate with single USB device at a time. but, now when I try to connect and communicate with multiple USB serial device App is failing.

sburdka avatar Jan 15 '17 11:01 sburdka

I am also look for the solution of can not communicate multiple USB serial devices.

jiuwu0905 avatar Feb 06 '17 14:02 jiuwu0905

public void openDevice() { connection = usbManager.openDevice(printer); debug.append("printer: "+printer +"\n"); debug.append("connection: "+connection+"\n"); serialDevice = UsbSerialDevice.createUsbSerialDevice(printer, connection); debug.append("serialDevice: "+serialDevice.toString()+"\n"); if (serialDevice != null) { if (serialDevice.open()) { serialDevice.setBaudRate(9600); serialDevice.setStopBits(UsbSerialInterface.STOP_BITS_1); serialDevice.setParity(UsbSerialInterface.PARITY_NONE); serialDevice.setFlowControl(UsbSerialInterface.FLOW_CONTROL_OFF); serialDevice.setRTS(true); // serialDevice.read(mCallback); } else { debug.append("Printer port not open \n"); } } else { debug.append("Serial is null \n"); } }

JudeBautista avatar Oct 01 '18 14:10 JudeBautista