title: Cannot receive data from ORSSerialPort
body: <p>I'm trying to use ORSSerialPort to send and receive data to and from serial port.</p>
  <p>I'm following the example here but I'm using commandline app:
  <a href="https://github.com/armadsen/ORSSerialPort/tree/master/Examples/ORSSerialPortDemo" rel="nofollow noreferrer">https://github.com/armadsen/ORSSerialPort/tree/master/Examples/ORSSerialPortDemo</a></p>
  <p>I believe I copied/implemented every required method, but the problem is although I can send data to my serial port(I double confirmed from my serial port log and the send succeeded), I cannot receive anything.</p>
  <p>My code is very simple as below - it is only intended to be a prototype so the code might not be well designed.</p>
  <p>So am I missing anything that I cannot receive data from serial port? Any suggestions are appreciated.</p>
  <pre class="lang-swift prettyprint-override"><code>import ORSSerial
  
  
  class SerialController : NSObject, ORSSerialPortDelegate {
          var port : ORSSerialPort?
  
          init(path: String){
              port = ORSSerialPort(path: path)
              port?.close()
          }
  
          func open(){
              port?.baudRate=115200
              port?.delegate=self
              port?.open()
          }
  
          func close(){
              port?.delegate=nil
              port?.close()
          }
  
          func SendString(data: String){
              let dataa = Data(data.utf8)
              port?.send(dataa)
          }
  
      func serialPortWasOpened(_ serialPort: ORSSerialPort) {
              print(&quot;PORT IS OPEN....&quot;)
          }
  
      func serialPortWasClosed(_ serialPort: ORSSerialPort) {
              print(&quot;PORT IS CLOSE&quot;)
          }
  
      func serialPort(_ serialPort: ORSSerialPort, didReceive data: Data) {
          print(NSString(data: data as Data, encoding: String.Encoding.utf8.rawValue)!)
          }
  
      func serialPortWasRemovedFromSystem(_ serialPort: ORSSerialPort) {
              print(&quot;PORT REMOVED&quot;)
          }
  
      private func serialPort(serialPort: ORSSerialPort!, didEncounterError error: NSError!) {
          print(&quot;PORT ERR \(String(describing: error))&quot;)
          }
      }
  
  
  
  var mySerial = SerialController(path: &quot;/dev/myserialport&quot;)
  
  mySerial.open()
  
  mySerial.SendString(data: &quot;test&quot;)
  </code></pre>