5 Replies Latest reply on Jun 15, 2017 1:19 PM by Intel Corporation

    /dev/ttyMFD1, pin 0 (rx, gpio 130), pin 1 (tx, gpio 131)

    Bill.

      Hi,

       

      If you are new to this GPIO stuff read the following:

      http://www.intel.com/content/dam/support/us/en/documents/edison/sb/edison-arduino-hardware-guide.pdf

       

      I am trying to echo text to /dev/ttyMFD1 and use cat /dev/ttyMFD1 to display it, but cat doesn't show anything.

       

      My setup is:

       

          # cat /etc/version: 201606061707

          Windows 10 PC with putty installed

       

      This is what I have tried ...

       

      Step 1: Booted Edison

       

      Step 2: Displayed the direction file for the GPIOs associated with pin 0 (rx) and pin 1 (tx):

       

      Looking at /sys/class/gpio

             and /sys/kernel/debug/gpio_debug

       

      pin     GPIO    Direction       Value   current_pinmux  current_pullstrength

       

      0       130             in                    0       mode1                          2k

               216            out                  0       *no file*                      *no file*

               248           out                  0       *no file*                      *no file*

       

      1       131            out                  1        mode1                          50k

              217            in                     1        *no file*                      *no file*

              249           out                   1        *no file*                      *no file*

       

      Step 3: run the script to do the echos

       

      I used the code in the following:

      https://communities.intel.com/thread/57358

       

      I changed the code so that only "in" and "out" were used.

       

      For my rational see my post #17 and Yermi's post #18 here:

      https://communities.intel.com/thread/111658?start=15&tstart=0

       

      Step 4: Display the direction files again

       

      Looking at /sys/class/gpio

             and /sys/kernel/debug/gpio_debug

       

      pin     GPIO    Direction       Value   current_pinmux  current_pullstrength

       

      0       130          in                   0            mode1                   2k

               216          in                   0            *no file*                 *no file*

               248          in                   0            *no file*                 *no file*

       

      1       131          out                1            mode1                  50k

               217          in                  0            *no file*                 *no file*

               249          out                0            *no file*                 *no file*

       

      The contents of the Direction file (eg: /sys/class/gpio/gpio130/direction ) match what the echo script wanted to do.

       

      Step 4: Use PuTTY to open an ssh window on edison

       

      Step 5: In the ssh window: cat /dev/ttyMFD1

       

      There is no command prompt, which makes sense, since Linux is waiting for something to be displayed.

       

      Step 6: in the PuTTY com4 window: echo Edison > /dev/ttyMFD1

       

      Observation:

       

      Nothing is displayed in the PuTTY ssh window after the cat line (Step 5).

       

      I have spent a long time reading a bunch of discussions trying to figure out how to get this to work.

       

      Question: any idea what I am not doing or doing wrong?

       

      Thanks,

      Bill