[OpenWrt-Devel] [ramips] Linkit Smart 7688

Ivan Hörler ivanhoerler at gmail.com
Thu Sep 19 14:18:46 EDT 2019


Hi
I have problems makeing libmraa working on Linkit Smart 7688.
The installation worked without problems and i tested with a python script. See details below:

what i did: 
- Compiled a openWRT 18.6
- opkg update 
- opkg install libmraa
- opkg install python3-light
- opkg install libmraa-python3

- copied this skript to /root: 

import mraa
import time

try:
    print (mraa.getVersion())
except:
    print("no mraa available")

# Refer to the pin-out digram for the GPIO number to silk print mapping
# in this example the number 44 maps to Wi-Fi LED.
pin = mraa.Gpio(2)
pin.dir(mraa.DIR_OUT)
while True:
    pin.write(1)
    time.sleep(1)
    pin.write(0)
    time.sleep(1)

- and executed:
root at OpenWrt:~# python3 mraa-test-simple.py 
v2.0.0
Traceback (most recent call last):
  File "mraa-test-simple.py", line 11, in <module>
    pin = mraa.Gpio(2)
  File "/usr/lib/python3.7/site-packages/mraa.py", line 391, in __init__
    _mraa.Gpio_swiginit(self, _mraa.new_Gpio(pin, owner, raw))
ValueError: Invalid GPIO pin specified


- checked with a LED on pin2 like this if GPIO2 works:
root at OpenWrt:~# cd /sys/class/gpio/
root at OpenWrt:/sys/class/gpio# ls
export      gpiochip0   gpiochip32  gpiochip64  unexport
root at OpenWrt:/sys/class/gpio# echo 2 > export
root at OpenWrt:/sys/class/gpio# ls
export      gpio2       gpiochip0   gpiochip32  gpiochip64  unexport
root at OpenWrt:/sys/class/gpio# cd gpio2
root at OpenWrt:/sys/devices/platform/10000000.palmbus/10000600.gpio/gpiochip0/gpio/gpio2# echo "out" > direction
root at OpenWrt:/sys/devices/platform/10000000.palmbus/10000600.gpio/gpiochip0/gpio/gpio2# cat value
0
root at OpenWrt:/sys/devices/platform/10000000.palmbus/10000600.gpio/gpiochip0/gpio/gpio2# echo 1 > value

- redone previous step with no changes in error output.

what am i missing?

Thanks for comments, Ivan Hörler
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20190919/34e6fd64/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list