Help me~!!!About serial port of android
I need use serial port,but it's tell me DllNotFoundException:MonoPosixHelper when program call sp.Open()... I can't open COM3 port ,but i don't konw why! please help me ,thank all...
void SerialPortInit(string com) { string portName; if (com == null) portName = "COM0"; else portName = com; int baudRate = 115200; Parity parity = Parity.None; int dataBits = 8; StopBits stopBits = StopBits.One; int ReadTimeOut = 400; SerialPort sp = null; sp = new SerialPort(portName, baudRate, parity, dataBits, stopBits); sp.ReadTimeout = ReadTimeOut; try { if (sp.IsOpen) { sp.Close(); sp.Open(); } else { sp.Open(); } } catch (Exception ex) { Debug.Log("error:" + ex.Message); } }
Your answer
Follow this Question
Related Questions
send string to serial port on android 0 Answers
Android to single board computer over serial error 4 Answers
App - device connection in Android 0 Answers
I need to connect arduino and android device via USB and send data via serial port with Unity. 4 Answers
Monetization breaks iOS build in XCode. Also breaks Android build. 1 Answer