Alljoyn.js error after setting up LininoIO

asked 2015-04-06 06:19:55 -0700

AllJoyner gravatar image

Hi, I have installed Linino OS and LininoIO on a couple of Arduino Yun boards, they all worked fine for about a week, i was able to run all the examples and today all of a sudden one of the boards gave me this error (the same one i had before installing LininoIO) :

ALERT: Error: Failed to configure digital output pin: 022 ajs_io.c:210 light_00409608_0002 light strict preventsyield global yun-ledslider.js:28 preventsyield

The error disappeared after restarting the board but the same error appeared on another Arduino Yun, and it does not disappear even after resetting it. I am assuming that the lininoIO library does not load or something, if anyone had the same problem please let me know how you solved it.

Thank you!

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2015-04-06 10:31:08 -0700

jprestwo gravatar image

updated 2015-04-06 10:50:01 -0700

This is strange. My guess is that there was not proper cleanup of the pin files for linino IO. If you could look in /sys/class/gpio and see what files exist there. If there are files like gpio1/gpio115 etc. then something wasn't cleaned up properly, most likely due to a Ctrl-C while AJS was running. It may fix it if you do this:

echo "your pin" > /sys/class/gpio/unexport

Replace "your pin" with the pin that is causing you trouble. This pin should be one that is located in the /sys/class/gpio directory. The pin number or "your pin" is the number that is appended to the /sys/class/gpio/gpioXXX file. This will do the cleanup that should have been done already.

Here is a detailed tutorial about how to use sysfs on the Yun, which is what AllJoyn.js is doing under the hood: http://wiki.linino.org/doku.php?id=wiki:lininoio_sysfs

edit flag offensive delete publish link more


There are files D13, gpio21, gpio22, gpio23, gpiochip0, gpiochip100 I tried doing echo 21 > /sys/class/gpio/unexport but i get this error: ash: write error: Invalid argument I tried putting 21 in quotes and putting gpio21 for "your pin" but i always get the same error

AllJoyner ( 2015-04-06 11:18:36 -0700 )edit

Btw i have looked in /sys/class/gpio of the other boards that worked at the time, and they had the same gpioxxx files, so i am guessing that that's not an issue? It is strange because all of them produce this error at some point.

AllJoyner ( 2015-04-07 08:56:28 -0700 )edit

And your still trying to use D13 as the pin? or have you changed it? You would get this error if you are using a pin that does not support digital out but it seems like you are just running the same script that has worked before. One more thing you could try is to export the pin first, then try to unexport it again.

jprestwo ( 2015-04-07 09:04:28 -0700 )edit

But D13 does support digital out on yun? I dont have the board on me right now to check, but i am pretty sure that i have tried changing it to D12 and it gave me the same error. I can confirm it tomorrow.

AllJoyner ( 2015-04-07 09:50:04 -0700 )edit

Yes D13 is a digital out pin. I think that D13 is the only pin in the DXX format so I don't believe D12 exists (unless you have set D12 to pin[12] or something)

jprestwo ( 2015-04-07 09:59:39 -0700 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2015-04-06 06:19:55 -0700

Seen: 226 times

Last updated: Apr 06 '15