armadsen / ORSSerialPort

Serial port library for Objective-C and Swift macOS apps
MIT License
751 stars 183 forks source link

cannot find any available serial ports from serialportmanager.availablePorts #151

Open JiahongXue opened 4 years ago

JiahongXue commented 4 years ago

I followed the document and trying to figure out what's the port path. Here is what I did: ORSSerialPortManager *portManager = [ORSSerialPortManager sharedSerialPortManager]; NSArray *availablePorts = portManager.availablePorts; NSLog (@"Available ports are: %lu", (unsigned long)[availablePorts count]); And it returned 0 in the console. I used matlab to double check with serailportlist("available"). And it gives me 6 ports.

Any idea what I could go wrong? Also, is there any way I can check if a serial port is connected after I did [serialPort open];?