Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Development
  3. MySensors on sunxi kernel. A10 Cubieboard.

MySensors on sunxi kernel. A10 Cubieboard.

Scheduled Pinned Locked Moved Development
5 Posts 2 Posters 1.5k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • А Offline
    А Offline
    Артем ТИхонович
    wrote on last edited by
    #1

    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.

    rozpruwaczR 1 Reply Last reply
    0
    • А Артем ТИхонович

      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.

      rozpruwaczR Offline
      rozpruwaczR Offline
      rozpruwacz
      wrote on last edited by rozpruwacz
      #2

      @артем-тихонович 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

      1 Reply Last reply
      0
      • А Offline
        А Offline
        Артем ТИхонович
        wrote on last edited by
        #3

        @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);

        rozpruwaczR 1 Reply Last reply
        0
        • А Артем ТИхонович

          @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);

          rozpruwaczR Offline
          rozpruwaczR Offline
          rozpruwacz
          wrote on last edited by
          #4

          @артем-тихонович 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.

          А 1 Reply Last reply
          0
          • rozpruwaczR rozpruwacz

            @артем-тихонович 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.

            А Offline
            А Offline
            Артем ТИхонович
            wrote on last edited by
            #5

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

            1 Reply Last reply
            0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            16

            Online

            12.0k

            Users

            11.2k

            Topics

            113.4k

            Posts


            Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • MySensors
            • OpenHardware.io
            • Categories
            • Recent
            • Tags
            • Popular