9 Replies Latest reply on Feb 11, 2015 11:56 PM by krish11

    Intel Edison - not able to read GPS input from /dev/ttyMFD1 using node.js

    Virender

      Hello,

       

      I am not able to read gps data in my Intel Edison Arduino breakout board using Nodejs program. The GPS module is sending the data as I can see this data using cat /dev/ttyMFD1. The nodejs program is not able to read, connection to serial port open but data is not received.

      Edison-GPS-Issue.png

       

      Nodejs program

       

      var serialPort = new SerialPortFactory.SerialPort(port,
          {
          baudrate: 115200, 
          dataBits: 8, 
          parity: 'none', 
          stopBits: 1, 
          flowControl: false,
          parser: SerialPortFactory.parsers.readline()
      }, false);
      serialPort.open(function (error) {
          if (error) {
              console.log('Failed to open: ' + error);
          } 
          else {
              console.log('open');
              serialPort.on('data', function (data) {
                  console.log('data received: ' + data);
              });
              serialPort.on('close', function () { 
              
                  console.log("Serial Port closed.");
              });
              serialPort.on('error', function (error) {
                  
                  console.log("Serial Port Error. " + error);
              });
          }
      });