serial_port_flutter
serial_port_flutter copied to clipboard
Does not support multiple serial ports working at the same time(Because of the singleton pattern?)
Serial serialPortA = await FlutterSerialPort.createSerialPort( Device("deviceNameA", "/your/device/path"), 9600); Serial serialPortB = await FlutterSerialPort.createSerialPort( Device("deviceNameB", "/your/device/path"), 115200);
bool openResultA = await serialPortA.open(); print(serialPortA.isConnected) // true
bool openResultB = await serialPortB.open(); print(serialPortB.isConnected) // false
serialPortA.receiveStream.listen((recv) { print("Receive: $recv"); });
serialPortB.receiveStream.listen((recv) { print("Receive: $recv"); });
你可以参照: https://github.com/Marcello168/react-native-multi-serial-port
Hi @sanxianlee 最近也發現了這個問題,感謝提供參考。
This is an issue for me as well.
Hi @mortenboye , actually I need some help for developing v1.0.0. I recently busy on my company job.
If you have time implementing this feature, I will be appreciated. 😃