4 Replies Latest reply on May 23, 2014 7:26 AM by arduino_4_life

    How do I access /dev/ttyS0?

    JackDoan

      I can't figure out how to use /dev/ttyS0 to communicate over the Arduino UART pins (IO_0 and IO_1). This is what I'm currently doing:

       

      echo -n 40 > /sys/class/gpio/export
      echo -n 41 > /sys/class/gpio/export
      echo -n "out" > /sys/class/gpio/gpio40/direction
      echo -n "out" > /sys/class/gpio/gpio41/direction
      echo -n "0" > /sys/class/gpio/gpio40/value
      echo -n "0" > /sys/class/gpio/gpio41/value
      

       

      From what I understand, this positions the muxes in such a way that pins 0 and 1 map to dev/ttyS0. However, when I try to read from them with my bus pirate, after writing with this command:

       

      echo why does this not work > /dev/ttyS0
      

       

      I get nothing.

       

      Similarly, when I write to /dev/ttyS0 from my bus pirate and try to read it with

       

      cat /dev/ttyS0
      

       

      nothing happens.

       

       

       

      Any sort of guidance or insight would be much appreciated!