MySensors on sunxi kernel. A10 Cubieboard.



  • Hi ! Does anybode run mySensors gateway on sunxi boards? It seem to be Orange pi but in my distro Pins have another definition:
    0 lrwxrwxrwx 1 root root 0 Nov 18 17:01 gpio1_ph7 -> ../../devices/platform/gpio-sunxi/gpio/gpio1_ph7
    If i set in config like this: -my-rf24-ce-pin=gpio1_ph7
    i have a error: ./drivers/RF24/RF24.cpp:52:17: note: in expansion of macro 'MY_RF24_CE_PIN'
    hwDigitalWrite(MY_RF24_CE_PIN, level);

    if i set simple: --my-rf24-ce-pin=1 mySensors build is ok but i have another error in runtime -
    ERROR Could not open /sys/class/gpio/gpio1/direction i suppouse i need to use sunxi headers for correct pin definition but i do not know do it.



  • @артем-тихонович which os with which kernel version do You run on the cubieboard ?
    check if You can do this in the console:

    echo 1 > /sys/class/gpio/export
    cat /sys/class/gpio/gpio1/direction
    

    there may be also permission problems so try also as root



  • @rozpruwacz i run ArchLinuxArm:
    uname -a
    Linux Archey 3.4.103-ARCH+ #4 PREEMPT Mon Dec 22 19:54:28 UTC 2014 armv7l GNU/Linux

    This is output:
    cat /sys/class/gpio/gpio1_ph7/direction
    out

    May be problem in names of GPIO pin number + port_pin.
    Few years ago i find RF24 library for my Cubieboard A10 but i cant up it.
    In this lib gpio defined with macros:
    RF24 radio(SUNXI_GPI(14), SUNXI_GPI(15), "/dev/spidev2.0");

     ./configure --spi-spidev-device=/dev/spidev0.0 --my-transport=nrf24 --my-rf24-ce-pin=1 --my-rf24-cs-pin=2  --my-gateway=mqtt --my-controller-ip-address=127.0.0.1 --my-mqtt-publish-topic-prefix=mysensors-out --my-mqtt-subscribe-topic-prefix=mysensors-in --my-mqtt-client-id=mygateway1
    
    ./mysgw
    Nov 24 17:31:26 INFO  Starting gateway...
    Nov 24 17:31:26 INFO  Protocol version - 2.3.0
    Nov 24 17:31:26 DEBUG MCO:BGN:INIT GW,CP=RNNGL---,VER=2.3.0
    Nov 24 17:31:26 DEBUG TSF:LRT:OK
    Nov 24 17:31:26 DEBUG TSM:INIT
    Nov 24 17:31:26 DEBUG TSF:WUR:MS=0
    Nov 24 17:31:37 ERROR Could not open /sys/class/gpio/gpio1/direction[
    
    

    if i set --my-rf24-ce-pin=gpio1_ph7 i got an compile error:
    ./drivers/RF24/RF24.cpp:52:17: note: in expansion of macro 'MY_RF24_CE_PIN'
    hwDigitalWrite(MY_RF24_CE_PIN, level);



  • @артем-тихонович the 3.4 kernel is the "legacy" kernel and is not compatible with mainline kernel. I would suggest to install os with the mainline kernel. Otherwise you need to change mysensors code.



  • @rozpruwacz thank you! I just try to build and install mainline kernel. for my board. Now a10 supprot ok in mainline.


Log in to reply
 

Suggested Topics

  • 1
  • 5
  • 2
  • 1
  • 2
  • 10

22
Online

11.2k
Users

11.1k
Topics

112.5k
Posts