1 Reply Latest reply on May 11, 2015 8:39 AM by DiegoV_Intel

    ttyMFD1 node js communication at 115200K

    hanumant

      Hi

       

      I have edison arduino breakout board.

      i need to write a nodejs application that can talk to a serial device connected to the TX, RX pins of the arduino board (gpios 130 and 131, I believe).

       

      1)The baudrate has to be 115.2K, is that supported on /dev/ttyMFD1 ?

      2) Do I need to configure the gpios as shown on this thread Serial problem with edison ?

          a) If yes then I seem to be getting an error when trying to run this step

                 echo -n "130" > /sys/class/gpio/export

                  sh: write error: Device or resource busy.


      3)If step 2) is not needed has anyone tried using node js serialport to communicate on /dev/ttyMFD1.


      Please note if there is a better way to talk to the serial device from node js (some other port?) please let me know



        • 1. Re: ttyMFD1 node js communication at 115200K
          DiegoV_Intel

          Hi hanumant,

           

          I will answer your questions one by one:

          1. A baudrate of 115200 is supported by ttyMFD1 (pins 1 and 0 on Arduino Expansion Board).
          2. Yes, you have to configure the GPIOs before you can setup the UART interface. The error message that you are getting is because the GPIO you are trying to export is already exported. When you try to export a GPIO that is already exported you will get that error message. It doesn't affect the configuration process so you can ignore it and continue with the rest of the commands.
          3. I haven't used Node.js but I would suggest you to check the MRAA library: intel-iot-devkit/mraa · GitHub. There are some examples in C, Python and Node.js. You might find these examples useful.

           

          I hope this information has answered your questions.

           

          Regards,

          Diego.