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
T

Tag

@Tag
About
Posts
54
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • 💬 Building a Orange Pi Gateway
    T Tag

    @Reza

    Did you also change the SPI channel?

    --spi-spidev-device=/dev/spidev0.0
    

    if you use the OPIzero pinout, SPI1 will be SPI0 on the OPI one......

    Your other option will be using a serial gateway: https://www.mysensors.org/build/serial_gateway
    This works for sure on the OPI One

    Announcements

  • 💬 Building a Orange Pi Gateway
    T Tag

    @Reza

    try this:

    ./configure --spi-spidev-device=/dev/spidev0.0 --my-transport=nrf24 --my-rf24-ce-pin=2 --my-rf24-cs-pin=3
    

    See this page for your header pinout: http://linux-sunxi.org/Orange_Pi_One#Orientation_of_the_GPIO_header

    the --my-rf24-cs-pin= is key to have it right on your system

    Announcements

  • 💬 Building a Orange Pi Gateway
    T Tag

    @Reza

    Can imagine that it is complicated, assuming you used the OPI zero pinout, try the configure example from my previous post. might work.

    Another option you have is get an arduino with the radio attached and just plug it into usb, your messages will appear on i.e /dev/ttyUSB0

    Announcements

  • 💬 Building a Orange Pi Gateway
    T Tag

    @Reza

    I do not have the OPI One HW available..... so that will be a problem.
    you need to start reading the OPI documentation, and see if the pinout you are using is correct, I know for example that OPI Zero used the SPI1 channel since SPI0 is used for the NAND flash. now it might be that the OPI One does not have the NAND flash so you can use the SPI0 channel.

    Try to start here

    or here

    If you read carefully you will see that pin 19-21-23 are on the opi ONE SPI0, and on the OPI Zero SPI1.....

    This is the OPI Zero page: http://linux-sunxi.org/Orange_Pi_Zero#Orientation_of_the_GPIO_header

    ANd the OPI One page:
    http://linux-sunxi.org/Orange_Pi_One#Orientation_of_the_GPIO_header

    @marceloaqno helped build this for the OPI Zero.... and SPI was an important part to get this working...

    Try this:

    ./configure --spi-spidev-device=/dev/spidev0.0 --my-transport=nrf24 --my-rf24-ce-pin=2 --my-rf24-cs-pin=3
    

    worth a try if you use SPI0, and GPIO3 for the CE pin (on the ONE the ce SPI0 pin is 3 according to the wiki page)

    Announcements

  • 💬 Building a Orange Pi Gateway
    T Tag

    @Reza

    Seems you are not able to communicate with your radio..... you need to figure out which GPIO pins you need to use, and which SPI channel.....

    The steps from the OrangePI page are based on the OrangePI zero model

    Announcements

  • 💬 Building a Orange Pi Gateway
    T Tag

    @Reza
    I got this working like a charm on armbian( Debian Jessie) https://www.armbian.com/orange-pi-zero/

    But you need to follow ALL steps........

    Which OrangePI board do you use?

    Announcements

  • 💬 Building a Orange Pi Gateway
    T Tag

    @Reza
    You must use the OrangePI instructions, these are different conmpared to the RaspberryPI instructions
    Thx SdeWeb!, same toughts!! :)

    Announcements

  • 💬 Building a Orange Pi Gateway
    T Tag

    @Reza

    Are you sure your git environment is okay?
    Maybe do a fresh git pull for mysensors?
    See the howto on the orangePI page just follow from the start.... I have serious questions that your env is correct since configure was not executable....

    Announcements

  • 💬 Building a Orange Pi Gateway
    T Tag

    @Reza
    Seems your ./configure script is not executable... try:

    chmod 755 ./configure
    
    Announcements

  • Is serial.print blocked by mySensors?
    T Tag

    @samburner3

    Strange, will have a look later today see if i can recreate your issue.
    Did you post your complete sketch?

    Troubleshooting

  • Is serial.print blocked by mySensors?
    T Tag

    Hi!,

    Where did the following piece of code go?

    void setup()
    {
    Serial.Begin(115200);
    }
    

    That might help, since it will tell the sketch you want to talk to the outside world using serial communication.
    Have you tried that?

    Another option is adding this in your sketch:
    (before you include the mysensors lib!)

    #define MY_DEBUG 
    

    See: https://www.mysensors.org/build/debug

    Troubleshooting

  • 💬 Building a Raspberry Pi Gateway
    T Tag

    @Anduril
    you will get all the build options for the mysgw with the command

    ./configure -help
    

    Here you can configure all options like serial and ethernet

    Announcements

  • 💬 Building a Raspberry Pi Gateway
    T Tag

    @Shantanu-Mhapankar

    This is also new for me since i do not send data into any cloud... but i can imagine that you can use MQTT. (see https://www.mysensors.org/build/mqtt_gateway for more details) is important that the receiving side supports MQTT. in this case google is your friend ;)

    if you do a ./configure --help you will find you can build the mysensors gateway with MQTT support

    ./configure --help 
    ...
        --my-gateway=[ethernet|serial|mqtt]
                                    Gateway type, set to none to disable gateway feature. [ethernet]
        --my-node-id=<ID>           Disable gateway feature and run as a node with given id.
        --my-controller-url-address=<URL>
                                    Controller or MQTT broker url.
        --my-controller-ip-address=<IP>
                                    Controller or MQTT broker ip.
        --my-port=<PORT>            The port to keep open on gateway mode.
                                    If gateway is set to mqtt, it sets the broker port.
    ...
    
    Announcements

  • Mysensors Gateway on OrangePi (Zero) (opi)
    T Tag

    @marceloaqno

    Thank you for your hard work and continued support on this!!

    Development

  • 💬 Building a Raspberry Pi Gateway
    T Tag

    @Shantanu-Mhapankar

    Data is not stored... to store the data and do something usefull with it (or not) you need a controller. I use mycontroller, and from this software you can "push" data to an external server.
    I use my controller, but i am sure that other controller software also has this feature.

    Announcements

  • Mysensors Gateway on OrangePi (Zero) (opi)
    T Tag

    @mihai.aldea
    Great!!, found out the SPI0 is used for the NAND flash, once you add SPI1 to the script.bin, also the need board paragraph with bus 1 needs to be added otherwise it will not work.... anyway great you got mysensors up and running!!
    About the RPI, i like both boards, and in my opinion the enormous success of the RPI is responsible, for the large collection of OPI boards that is available these days ;)

    Development

  • Mysensors Gateway on OrangePi (Zero) (opi)
    T Tag

    @marceloaqno

    looks great!! thx!!:thumbsup:

    Development

  • Mysensors Gateway on OrangePi (Zero) (opi)
    T Tag

    @pansen
    Yes correct, for OPI Zero only ARMbian 3.x is available as a download image.
    I used the debian jessie one

    Development

  • Mysensors Gateway on OrangePi (Zero) (opi)
    T Tag

    Hi All,

    I put together the steps to get MySensors running on the OrangePi Zero:
    Take note of the SPI part, 1 typo and you will not see /dev/spidev1.0

    • Download and Install the ARMbian(debian) OS image
      https://www.armbian.com/orange-pi-zero/

    • Install sunxi-tools:
      These tools are required to make changes in the boot area of the system

    sudo apt-get update
    sudo apt-get install sunxi-tools
    
    • How to add /dev/spidev1.0 (which is required since /dev/spidev0.0 is used for the onboard NAND flash)
    cd /boot
    bin2fex /boot/script.bin /root/myscript.txt
    

    Now edit /root/myscript.bin and add/change the following so it looks exactly like the part below:

    [spi0]
    spi_used = 1
    spi_cs_bitmap = 1
    spi_mosi = port:PC00<3><default><default><default>
    spi_miso = port:PC01<3><default><default><default>
    spi_sclk = port:PC02<3><default><default><default>
    spi_cs0 = port:PC03<3><1><default><default>
    	
    [spi1]
    spi_used = 1
    spi_cs_bitmap = 1
    spi_cs0 = port:PA13<2><1><default><default>
    spi_sclk = port:PA14<2><default><default><default>
    spi_mosi = port:PA15<2><default><default><default>
    spi_miso = port:PA16<2><default><default><default>
    	
    [spi_devices]
    spi_dev_num = 2
    	
    [spi_board0]
    modalias = "spidev"
    max_speed_hz = 33000000
    bus_num = 0
    chip_select = 0
    mode = 0
    full_duplex = 1
    manual_cs = 0
    	
    [spi_board1]
    modalias = "spidev"
    max_speed_hz = 33000000
    bus_num = 1
    chip_select = 0
    mode = 0
    full_duplex = 1
    manual_cs = 0
    
    • Then recompile the script file:
    fex2bin /root/myscript.txt /boot/script.bin
    

    Reboot the system

    reboot
    

    2 device files should exist now:

    root@orangepizero:~# ls -l /dev/spi*
    crw------- 1 root root 153, 0 Jan 11 16:31 /dev/spidev0.0
    crw------- 1 root root 153, 1 Jan 11 16:31 /dev/spidev1.0
    

    Load the gpio module

    modprobe gpio-sunxi
    

    To load the module gpio-sunxi automagically load at boot time, add gpio-sunxi to /etc/modules

    echo gpio-sunxi >> /etc/modules
    
    • Now it is time to install the GW.
    cd /root
    git clone https://github.com/marceloaqno/MySensors.git orangepi 
    cd orangepi/ 
    git pull origin spidev
    ./configure --spi-spidev-device=/dev/spidev1.0
    make
    

    Working like a charm!

    If you tested "/bin/mysgw -d" and all works as expected, make the installation permanent:

    make install
    

    Additional
    If you want to read data into a controller using a device file (i.e Mycontroller) use the build string below

     ./configure --spi-spidev-device=/dev/spidev1.0  --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyMySensorsGateway
    

    Hope this helps!! have fun!!

    Development

  • 💬 Building a Orange Pi Gateway
    T Tag

    Hi!,

    Found a typo: ./condigure --spi-spidev-device=/dev/spidev1.0 ,should be configure

    Great work!! :thumbsup:

    Announcements
  • Login

  • Don't have an account? Register

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