0

Background: I am using the "base block" to power and access the UART2 console on the edison. I have an arduino block with a sketch to print data to serial. https://www.sparkfun.com/products/13036

The serial data is transmitted from the arduino and I intend to use a node script to read that data and perform network related functions. Intel Edison and NodeJS serial port communication: I am receiving strange characters

I attempted to follow the edison serial instructions: https://communities.intel.com/message/265411#265411

However at the GPIO configuration at line 2 it already fails.

root@edison:~# echo -n "214" > /sys/class/gpio/export sh: write error: No such device

Interestingly if I run the "uart.js" from the "Intel Edison and NodeJS..." question I do get data, but it's not what's expected:

<Buffer 84 e9 f3 f4 e1 ee c3 e5 7a 20 72 75 75 0d 0a 8d c5 f3 f3 c1 c7 e5 20 f3 e5 ee f4 7a 60 70 0d 0a c2 c5 e1 ed 40 e2 f2 cf eb e5 ce 7a 60 30 0d 0a> <Buffer 84 c9 f3 f4 e1> <Buffer ce e3 e5 7a 60 72 75 75 0d 0a 8d e5 f3 f3 e1 e7 c5 60 f3 c5 ce f4 3a 40 70 0d 0a 82 e5 c1 ed 60 e2 f2 ef eb c5 ee 7a 40 70 0d 0a>

Lastly using mraa.getPinCount(); I always get 56 back. (Found that while searching around the net)

Thanks for the help!

Community
  • 1
  • 1
sk1tt1sh
  • 198
  • 1
  • 2
  • 11

1 Answers1

0

It appears 115200 is an unusable baud for the Edison serial to Arduino block! I set the baud to 9600 and have successfully gotten the expected data.

Additionally, the gpio pins for the Arduino block is 130 and 131. (130==rx, 131==tx) echo -n 130 > /sys/class/gpio/export //may not need, may already be exported echo -n 131 > /sys/class/gpio/export //may not need, may already be exported echo mode1 > /sys/kernel/debug/gpio_debug/gpio130/current_pinmux // potentially unneeded as well. echo mode1 > /sys/kernel/debug/gpio_debug/gpio131/current_pinmux // potentially unneeded as well. echo in > /sys/class/gpio/gpio130/direction echo out > /sys/class/gpio/gpio131/direction .. cat /dev/ttyMFD1

sk1tt1sh
  • 198
  • 1
  • 2
  • 11