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
Christian SimonsenC

Christian Simonsen

@Christian Simonsen
About
Posts
32
Topics
4
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • 💬 Building a Raspberry Pi Gateway
    Christian SimonsenC Christian Simonsen

    @dopeeye

    Sadly not. I ended up creating an serial gateway (arduino with NRF24L01 and a USB connector) and connected this to the Raspberry Pi, rather than connecting the NRF24L01 directly to the GPIO pins. This worked perfectly straight away.

    Announcements

  • How do I setup Raspberry Pi 2 with NRF24L01 as MySensor 2.0 Gateway with MyController as controller
    Christian SimonsenC Christian Simonsen

    @alexsh1

    Hi Alex,

    I tested the Sanity check on the the Arduino sensor node, and status came back OK. However I could get this to work on the Raspberry Pi, seems like this function is not yet supported. At least I couldn't find any info on it using the "./configuration -h".

    I don't have a AMS1117 available so I can test that.

    I connected my Arduino Nano and NRF24L01+ to the Raspberry Pi via USB, that would really well. So I might just use this solution instead as I see little benefit of connecting the NRF24L01 directly to the GPIO pins on the Raspberry Pi.

    Next step is to start building some battery powered sensors that I can use, and get MyController setup properly.

    Hardware mycontroller.org gpio raspberry pi 2 rbp2 nrf24l01

  • How do I setup Raspberry Pi 2 with NRF24L01 as MySensor 2.0 Gateway with MyController as controller
    Christian SimonsenC Christian Simonsen

    HI,

    I've been doing some testing. I have two Gateways

    1. Raspberry Pi 2 with a NRF24L01+ module connected to the GPIO pins
    2. Arduino Nano with a NRF24L01+ module connected via a breadboard to my MacBook Pro

    The sensor node is an Arduino Uno with a NRF24L01+ module. This sensor is sending out a higher number for each packet (eg. 1, 2, 3, 4)

    Between the Raspberry Pi 2 gateway is have a lot of data loss as shown in earlier posts even with just 3 meters a part. However using the Arduino Nano as the gateway I can walk across the apartment with loosing anything (10+ meters away).

    I've switched the NRF24L01 modules around and the result is the same.

    I have now two possible reasons:

    1. Something is wrong related to the Raspberry Pi 2 - The code, libraries, power to the NRF24L01 etc.
    2. The Raspberry Pi is next to my ASUS RT-AC87U wireless router... maybe it is interfering (I don't think it is this, as I didn't have any packet loss with the Arduino Nano when I held it next to the router)

    I therefore think it is related to point 1. The Raspberry Pi 2. But don't know what it could be...

    Any ideas?

    Hardware mycontroller.org gpio raspberry pi 2 rbp2 nrf24l01

  • How do I setup Raspberry Pi 2 with NRF24L01 as MySensor 2.0 Gateway with MyController as controller
    Christian SimonsenC Christian Simonsen

    My sensors are located about 3 meters apart with nothing in between. To mitigate the packet loss I've increased by the Gateway to RF24_PA_HIGH and the Arduino to RF24_PA_MAX. I tested MAX on the Gateway aswell, but it didn't seem to handle this setting.

    Note I've changed the code of the Node - it now sends a number per msg, and it increases by 1 for each message. This way I found it easier to track which msg that succeeded and which didn't.

    First it looked ok, but the msg started to fail after some time (note: I have 3 seconds between each message now)

    When I start the Gateway by using "sudo ./examples_linux/mysGateway -d" it starts fine, and connects with the Arduino which I restart at the same time as I type the code above in terminal to start the Gateway on the Raspberry Pi.

    After the setup it seems like most of the first 13 messages go through successfully. Then the next 10 messages fail (atleast looks like it on the GW debug info). Then there is another good period from 23-40, but with a few lost. Then the rest fail, and the sensor also starts reporting the messages as failed. After this I have to restart the Sensor node to be able to regain communication.

    Do anyone know what is wrong... ?

    The Raspberry Pi Gateway:

    pi@raspberrypi:~/MySensors $ sudo ./examples_linux/mysGateway -d
    mysGateway: Starting gateway...
    mysGateway: Protocol version - 2.0.1-beta
    mysGateway: MCO:BGN:INIT GW,CP=RNNG---,VER=2.0.1-beta
    mysGateway: TSF:LRT:OK
    mysGateway: TSM:INIT
    mysGateway: TSM:INIT:TSP OK
    mysGateway: TSM:INIT:GW MODE
    mysGateway: TSM:READY
    mysGateway: MCO:REG:NOT NEEDED
    mysGateway: MCO:BGN:STP
    mysGateway: MCO:BGN:INIT OK,ID=0,PAR=0,DIS=0,REG=1
    mysGateway: TSF:MSG:READ,1-1-0,s=0,c=1,t=23,pt=2,l=2,sg=0:1
    mysGateway: TSF:MSG:READ,1-1-0,s=0,c=1,t=23,pt=2,l=2,sg=0:2
    mysGateway: TSF:MSG:READ,1-1-0,s=255,c=3,t=12,pt=0,l=3,sg=0:1.0
    mysGateway: TSF:MSG:READ,1-1-0,s=255,c=3,t=26,pt=1,l=1,sg=0:2
    mysGateway: TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=27,pt=1,l=1,sg=0,ft=0,st=OK:1
    mysGateway: TSF:MSG:READ,1-1-0,s=255,c=3,t=26,pt=1,l=1,sg=0:2
    mysGateway: !TSF:MSG:LEN,0!=8
    mysGateway: TSF:MSG:READ,1-1-0,s=0,c=1,t=23,pt=2,l=2,sg=0:3
    mysGateway: TSF:MSG:READ,1-1-0,s=0,c=1,t=23,pt=2,l=2,sg=0:4
    mysGateway: TSF:MSG:READ,1-1-0,s=0,c=1,t=23,pt=2,l=2,sg=0:6
    mysGateway: TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0:
    mysGateway: !TSF:MSG:LEN,17!=7
    mysGateway: TSF:MSG:READ,1-1-0,s=0,c=1,t=23,pt=2,l=2,sg=0:8
    mysGateway: TSF:MSG:READ,1-1-0,s=0,c=1,t=23,pt=2,l=2,sg=0:9
    mysGateway: TSF:MSG:READ,1-1-0,s=0,c=1,t=23,pt=2,l=2,sg=0:10
    mysGateway: TSF:MSG:READ,1-1-0,s=0,c=1,t=23,pt=2,l=2,sg=0:11
    mysGateway: TSF:MSG:READ,1-1-0,s=0,c=1,t=23,pt=2,l=2,sg=0:13
    mysGateway: TSF:MSG:READ,1-1-0,s=0,c=1,t=23,pt=2,l=2,sg=0:13
    mysGateway: !TSF:MSG:LEN,0!=9
    mysGateway: TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0:
    mysGateway: !TSF:MSG:LEN,9!=7
    mysGateway: TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0:
    mysGateway: !TSF:MSG:LEN,9!=7
    mysGateway: TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0:
    mysGateway: !TSF:MSG:LEN,9!=7
    mysGateway: TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0:
    mysGateway: !TSF:MSG:LEN,9!=7
    mysGateway: TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0:
    mysGateway: !TSF:MSG:LEN,0!=7
    mysGateway: TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0:
    mysGateway: !TSF:MSG:LEN,9!=7
    mysGateway: TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0:
    mysGateway: !TSF:MSG:LEN,9!=7
    mysGateway: TSF:MSG:READ,1-1-0,s=0,c=1,t=23,pt=2,l=2,sg=0:23
    mysGateway: TSF:MSG:READ,1-1-0,s=0,c=1,t=23,pt=2,l=2,sg=0:25
    mysGateway: TSF:MSG:READ,1-1-0,s=0,c=1,t=23,pt=2,l=2,sg=0:25
    mysGateway: !TSF:MSG:LEN,0!=9
    mysGateway: TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0:
    mysGateway: !TSF:MSG:LEN,9!=7
    mysGateway: TSF:MSG:READ,1-1-0,s=0,c=1,t=23,pt=2,l=2,sg=0:28
    mysGateway: TSF:MSG:READ,1-1-0,s=0,c=1,t=23,pt=2,l=2,sg=0:30
    mysGateway: TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0:
    mysGateway: !TSF:MSG:LEN,9!=7
    mysGateway: TSF:MSG:READ,1-1-0,s=0,c=1,t=23,pt=2,l=2,sg=0:31
    mysGateway: TSF:MSG:READ,1-1-0,s=0,c=1,t=23,pt=2,l=2,sg=0:33
    mysGateway: TSF:MSG:READ,1-1-0,s=0,c=1,t=23,pt=2,l=2,sg=0:34
    mysGateway: TSF:MSG:READ,1-1-0,s=0,c=1,t=23,pt=2,l=2,sg=0:37
    mysGateway: TSF:MSG:READ,1-1-0,s=0,c=1,t=23,pt=2,l=2,sg=0:40
    mysGateway: TSF:MSG:READ,1-1-0,s=0,c=1,t=23,pt=2,l=2,sg=0:40
    mysGateway: !TSF:MSG:LEN,0!=9
    

    And the Arduino sensor node:

    Starting sensor (RNNNA-, 2.0.0)
    TSM:INIT
    TSM:RADIO:OK
    TSP:ASSIGNID:OK (ID=1)
    TSM:FPAR
    TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSP:MSG:READ 0-0-1 s=255,c=3,t=8,pt=1,l=1,sg=0:0
    TSP:MSG:FPAR RES (ID=0, dist=0)
    TSP:MSG:PAR OK (ID=0, dist=1)
    TSM:FPAR:OK
    TSM:ID
    TSM:CHKID:OK (ID=1)
    TSM:UPL
    TSP:PING:SEND (dest=0)
    TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=ok:1
    TSP:MSG:READ 0-0-1 s=255,c=3,t=25,pt=1,l=1,sg=0:1
    TSP:MSG:PONG RECV (hops=1)
    TSP:CHKUPL:OK
    TSM:UPL:OK
    TSM:READY
    TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=ok:0100
    TSP:MSG:SEND 1-1-0-0 s=255,c=0,t=17,pt=0,l=5,sg=0,ft=0,st=ok:2.0.0
    TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=6,pt=1,l=1,sg=0,ft=0,st=ok:0
    TSP:MSG:READ 0-0-1 s=255,c=3,t=15,pt=6,l=2,sg=0:0100
    TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=11,pt=0,l=12,sg=0,ft=0,st=ok:Light Sensor
    TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=12,pt=0,l=3,sg=0,ft=0,st=ok:1.0
    TSP:MSG:SEND 1-1-0-0 s=0,c=0,t=16,pt=0,l=0,sg=0,ft=0,st=ok:
    Request registration...
    TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=26,pt=1,l=1,sg=0,ft=0,st=ok:2
    TSP:MSG:READ 0-0-1 s=255,c=3,t=27,pt=1,l=1,sg=0:1
    Node registration=1
    Init complete, id=1, parent=0, distance=1, registration=1
    TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:0
    TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:1
    TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:2
    TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:3
    TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:4
    TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:5
    TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:6
    TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:7
    TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:8
    TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:9
    TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:10
    TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:11
    TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:12
    TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:13
    TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:14
    TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:15
    TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:16
    TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:17
    TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:18
    TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:19
    TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:20
    TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:21
    TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:22
    TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:23
    TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:24
    TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:25
    TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:26
    TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:27
    TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:28
    TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:29
    TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:30
    TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:31
    TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:32
    TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:33
    TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:34
    TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:35
    TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:36
    TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:37
    TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:38
    TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:39
    TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:40
    TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:41
    TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:42
    TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:43
    !TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=fail:44
    !TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=1,st=fail:45
    !TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=2,st=fail:46
    !TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=3,st=fail:47
    !TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=4,st=fail:48
    !TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=5,st=fail:49
    !TSM:UPL FAIL, SNP
    TSM:FPAR
    TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    !TSP:SEND:TNR
    !TSP:SEND:TNR
    !TSP:SEND:TNR
    !TSP:SEND:TNR
    
    Hardware mycontroller.org gpio raspberry pi 2 rbp2 nrf24l01

  • How do I setup Raspberry Pi 2 with NRF24L01 as MySensor 2.0 Gateway with MyController as controller
    Christian SimonsenC Christian Simonsen

    I have connection, however the communication seem to fail after a while. Seems to get worse and worse. I'm currently sending a msg every 30 seconds from the node. See code below.

    Gateway on the Raspberry Pi:

    pi@raspberrypi:~/MySensors $ sudo ./examples_linux/mysGateway -d
    mysGateway: Starting gateway...
    mysGateway: Protocol version - 2.0.1-beta
    mysGateway: MCO:BGN:INIT GW,CP=RNNG---,VER=2.0.1-beta
    mysGateway: TSF:LRT:OK
    mysGateway: TSM:INIT
    mysGateway: TSM:INIT:TSP OK
    mysGateway: TSM:INIT:GW MODE
    mysGateway: TSM:READY
    mysGateway: MCO:REG:NOT NEEDED
    mysGateway: MCO:BGN:STP
    mysGateway: MCO:BGN:INIT OK,ID=0,PAR=0,DIS=0,REG=1
    mysGateway: TSF:MSG:READ,1-1-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
    mysGateway: TSF:MSG:PINGED,ID=1,HP=1
    mysGateway: TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=OK:1
    mysGateway: TSF:MSG:READ,1-1-0,s=255,c=3,t=15,pt=6,l=2,sg=0:0100
    mysGateway: TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100
    mysGateway: TSF:MSG:READ,1-1-0,s=0,c=1,t=23,pt=2,l=2,sg=0:50
    mysGateway: TSF:MSG:READ,1-1-0,s=0,c=1,t=23,pt=2,l=2,sg=0:57
    mysGateway: TSF:MSG:READ,1-1-0,s=0,c=1,t=23,pt=2,l=2,sg=0:57
    mysGateway: !TSF:MSG:LEN,0!=9
    mysGateway: TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0:
    mysGateway: !TSF:MSG:LEN,9!=7
    mysGateway: TSF:MSG:READ,1-1-0,s=0,c=1,t=23,pt=2,l=2,sg=0:56
    mysGateway: TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0:
    mysGateway: !TSF:MSG:LEN,9!=7
    mysGateway: TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0:
    mysGateway: !TSF:MSG:LEN,9!=7
    mysGateway: TSF:MSG:READ,1-1-0,s=0,c=1,t=23,pt=2,l=2,sg=0:57
    

    And the code from the Arduino Uno Node

    Starting sensor (RNNNA-, 2.0.0)
    TSM:INIT
    TSM:RADIO:OK
    TSP:ASSIGNID:OK (ID=1)
    TSM:FPAR
    TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSP:MSG:READ 0-0-1 s=255,c=3,t=8,pt=1,l=1,sg=0:0
    TSP:MSG:FPAR RES (ID=0, dist=0)
    TSP:MSG:PAR OK (ID=0, dist=1)
    TSM:FPAR:OK
    TSM:ID
    TSM:CHKID:OK (ID=1)
    TSM:UPL
    TSP:PING:SEND (dest=0)
    TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=ok:1
    TSP:MSG:READ 0-0-1 s=255,c=3,t=25,pt=1,l=1,sg=0:1
    TSP:MSG:PONG RECV (hops=1)
    TSP:CHKUPL:OK
    TSM:UPL:OK
    TSM:READY
    TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=ok:0100
    TSP:MSG:SEND 1-1-0-0 s=255,c=0,t=17,pt=0,l=5,sg=0,ft=0,st=ok:2.0.0
    TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=6,pt=1,l=1,sg=0,ft=0,st=ok:0
    TSP:MSG:READ 0-0-1 s=255,c=3,t=15,pt=6,l=2,sg=0:0100
    TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=11,pt=0,l=12,sg=0,ft=0,st=ok:Light Sensor
    TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=12,pt=0,l=3,sg=0,ft=0,st=ok:1.0
    TSP:MSG:SEND 1-1-0-0 s=0,c=0,t=16,pt=0,l=0,sg=0,ft=0,st=ok:
    Request registration...
    TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=26,pt=1,l=1,sg=0,ft=0,st=ok:2
    TSP:MSG:READ 0-0-1 s=255,c=3,t=27,pt=1,l=1,sg=0:1
    Node registration=1
    Init complete, id=1, parent=0, distance=1, registration=1
    50
    TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:50
    55
    TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:55
    57
    TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:57
    57
    56
    TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:56
    56
    57
    TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:57
    58
    TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:58
    57
    TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:57
    58
    TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=ok:58
    56
    !TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=fail:56
    55
    !TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=1,st=fail:55
    55
    55
    59
    !TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=2,st=fail:59
    58
    !TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=3,st=fail:58
    56
    !TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=4,st=fail:56
    58
    !TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=5,st=fail:58
    !TSM:UPL FAIL, SNP
    TSM:FPAR
    TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    56
    !TSP:SEND:TNR```
    Hardware mycontroller.org gpio raspberry pi 2 rbp2 nrf24l01

  • How do I setup Raspberry Pi 2 with NRF24L01 as MySensor 2.0 Gateway with MyController as controller
    Christian SimonsenC Christian Simonsen

    @alexsh1

    You are 100 % correct :+1: :)

    I changed the NRF24L01 module with the antenna, with a standard NRF24L01+ module. And it works like a charm.

    Here are the Serial Monitor code from the Arduino (Sensor node). I don't currently understand what all the code says, but it seems like they are communicating.

    Starting sensor (RNNNA-, 2.0.0)
    TSM:INIT
    TSM:RADIO:OK
    TSP:ASSIGNID:OK (ID=1)
    TSM:FPAR
    TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSP:MSG:READ 0-0-1 s=255,c=3,t=8,pt=1,l=1,sg=0:0
    TSP:MSG:FPAR RES (ID=0, dist=0)
    TSP:MSG:FPAR (PPAR FOUND)
    TSP:MSG:PAR OK (ID=0, dist=1)
    TSM:FPAR:OK
    TSM:ID
    TSM:CHKID:OK (ID=1)
    TSM:UPL
    TSP:PING:SEND (dest=0)
    TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=ok:1
    TSP:MSG:READ 0-0-1 s=255,c=3,t=25,pt=1,l=1,sg=0:1
    TSP:MSG:PONG RECV (hops=1)
    TSP:CHKUPL:OK
    TSM:UPL:OK
    TSM:READY
    TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=ok:0100
    TSP:MSG:SEND 1-1-0-0 s=255,c=0,t=17,pt=0,l=5,sg=0,ft=0,st=ok:2.0.0
    TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=6,pt=1,l=1,sg=0,ft=0,st=ok:0
    TSP:MSG:READ 0-0-1 s=255,c=3,t=15,pt=6,l=2,sg=0:0100
    TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=11,pt=0,l=12,sg=0,ft=0,st=ok:Light Sensor
    TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=12,pt=0,l=3,sg=0,ft=0,st=ok:1.0
    TSP:MSG:SEND 1-1-0-0 s=0,c=0,t=16,pt=0,l=0,sg=0,ft=0,st=ok:
    Request registration...
    !TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=26,pt=1,l=1,sg=0,ft=0,st=fail:2
    !TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=26,pt=1,l=1,sg=0,ft=1,st=fail:2
    !TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=26,pt=1,l=1,sg=0,ft=2,st=fail:2
    !TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=26,pt=1,l=1,sg=0,ft=3,st=fail:2
    Init complete, id=1, parent=0, distance=1, registration=1
    50
    !TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=4,st=fail:50
    56
    !TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=5,st=fail:56
    !TSM:UPL FAIL, STATP
    58
    !TSP:MSG:SEND 1-1-0-0 s=0,c=1,t=23,pt=2,l=2,sg=0,ft=0,st=fail:58
    58
    58
    
    

    And from the Raspberry Pi

    mysGateway: TSM:INIT:TSP OK
    mysGateway: TSM:INIT:GW MODE
    mysGateway: TSM:READY
    mysGateway: MCO:REG:NOT NEEDED
    mysGateway: MCO:BGN:STP
    mysGateway: MCO:BGN:INIT OK,ID=0,PAR=0,DIS=0,REG=1
    mysGateway: TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0:
    mysGateway: !TSF:MSG:LEN,8!=7
    mysGateway: TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0:
    mysGateway: !TSF:MSG:LEN,0!=7
    mysGateway: TSF:MSG:READ,1-1-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
    mysGateway: TSF:MSG:BC
    mysGateway: TSF:MSG:FPAR REQ,ID=1
    mysGateway: TSF:PNG:SEND,TO=0
    mysGateway: TSF:CKU:OK
    mysGateway: TSF:MSG:GWL OK
    mysGateway: TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0
    mysGateway: TSF:MSG:READ,1-1-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
    mysGateway: TSF:MSG:PINGED,ID=1,HP=1
    mysGateway: TSF:MSG:SEND,0-0-1-1,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=OK:1
    mysGateway: TSF:MSG:READ,0-1-0,s=255,c=3,t=6,pt=1,l=1,sg=0:0
    mysGateway: TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0:
    mysGateway: !TSF:MSG:LEN,8!=7
    
    Hardware mycontroller.org gpio raspberry pi 2 rbp2 nrf24l01

  • How do I setup Raspberry Pi 2 with NRF24L01 as MySensor 2.0 Gateway with MyController as controller
    Christian SimonsenC Christian Simonsen

    @alexsh1

    Again thanks for all the help, very much appreciated.

    I started last evening putting together a few more NRF24L01 sensors such as the one on the Node. I will also setup a new extra Arduino Gateways, so I also can test communication between two Arduinos, before testing the same with the Raspberry Pi. Ill report back later tonight when I know the results.

    Hardware mycontroller.org gpio raspberry pi 2 rbp2 nrf24l01

  • 💬 Building a Raspberry Pi Gateway
    Christian SimonsenC Christian Simonsen

    @marceloaqno said:

    @Christian-Simonsen

    mysGateway: TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0:
    mysGateway: !TSF:MSG:LEN,0!=7
    

    looks like a power issue with the nrf24 module.

    Ok,

    I've tested with the Voltmeter and the NRF24L01 module do get a steady 3.26 V. Both the gateway module and the Arduino sensor node...

    Im now building a few extra sensor nodes, so I can test without the Raspberry pi. Hopefully I can atleast get them talking based on Arduinos first. Before testing the Raspberry Pi.

    Announcements

  • How do I setup Raspberry Pi 2 with NRF24L01 as MySensor 2.0 Gateway with MyController as controller
    Christian SimonsenC Christian Simonsen

    @alexsh1

    Thanks for all the tips.

    I've now installed a new 100 uF (16V) Capacitor in parallell with the current 4.7 uF (50V) capacitor on both the units, I also double checked the writing just to be sure. It all looks good. See images below.

    0_1477238490304_Screenshot 2016-10-23 18.01.02.png
    0_1477238495919_Screenshot 2016-10-23 18.01.11.png

    **After adding the capacitor, I uninstalled and cleaned the setting on the Raspberry Pi. **

    Sudo make uninstall

    pi@raspberrypi:~/MySensors $ sudo make uninstall
    Stopping daemon mysgateway (ignore errors)
    removing files
    rm /etc/systemd/system/mysgateway.service /usr/local/bin/mysGateway
    

    Sudo make clean

    pi@raspberrypi:~/MySensors $ sudo make clean
    [Cleaning]
    rm -rf build drivers/Linux/log.o drivers/Linux/noniso.o drivers/Linux/SoftEeprom.o drivers/Linux/EthernetClient.o drivers/Linux/SerialPort.o drivers/Linux/Stream.o drivers/Linux/Print.o drivers/Linux/IPAddress.o drivers/Linux/compatibility.o drivers/Linux/EthernetServer.o examples_linux/mysGateway.o drivers/RPi/piHiPri.o drivers/RPi/bcm2835.o drivers/RPi/rpi_util.o drivers/RPi/Wire.o drivers/RPi/SPI.o examples_linux/mysGateway drivers/Linux/log.d drivers/Linux/noniso.d drivers/Linux/SoftEeprom.d drivers/Linux/EthernetClient.d drivers/Linux/SerialPort.d drivers/Linux/Stream.d drivers/Linux/Print.d drivers/Linux/IPAddress.d drivers/Linux/compatibility.d drivers/Linux/EthernetServer.d examples_linux/mysGateway.d drivers/RPi/piHiPri.d drivers/RPi/bcm2835.d drivers/RPi/rpi_util.d drivers/RPi/Wire.d drivers/RPi/SPI.d
    

    **After uninstalling, reset the configuration, and installed and started the gateway. **

    pi@raspberrypi:~/MySensors $ ./configure --my-debug=enable --my-gateway=serial --my-serial-is-pty --my-serial-pty=ttyMySensorsGateway --my-transport=nrf24 --my-rf24-channel=76
    [SECTION] Detecting target machine.
    [OK] machine detected: SoC=BCM2836, Type=Rpi2, CPU=armv7l, REV=a01041.
    [OK] init system detected: systemd
    [SECTION] Saving configuration.
    [SECTION] Cleaning previous builds.
    [OK] Finished.
    

    Make all

    pi@raspberrypi:~/MySensors $ sudo make all
    cc  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/log.o drivers/Linux/log.c
    g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_RF24_CHANNEL=76 -DMY_LINUX_SERIAL_PTY=\"ttyMySensorsGateway\" -DMY_IS_SERIAL_PTY  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/noniso.o drivers/Linux/noniso.cpp
    g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_RF24_CHANNEL=76 -DMY_LINUX_SERIAL_PTY=\"ttyMySensorsGateway\" -DMY_IS_SERIAL_PTY  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/Print.o drivers/Linux/Print.cpp
    g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_RF24_CHANNEL=76 -DMY_LINUX_SERIAL_PTY=\"ttyMySensorsGateway\" -DMY_IS_SERIAL_PTY  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/EthernetClient.o drivers/Linux/EthernetClient.cpp
    g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_RF24_CHANNEL=76 -DMY_LINUX_SERIAL_PTY=\"ttyMySensorsGateway\" -DMY_IS_SERIAL_PTY  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/SerialPort.o drivers/Linux/SerialPort.cpp
    g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_RF24_CHANNEL=76 -DMY_LINUX_SERIAL_PTY=\"ttyMySensorsGateway\" -DMY_IS_SERIAL_PTY  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/Stream.o drivers/Linux/Stream.cpp
    g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_RF24_CHANNEL=76 -DMY_LINUX_SERIAL_PTY=\"ttyMySensorsGateway\" -DMY_IS_SERIAL_PTY  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/IPAddress.o drivers/Linux/IPAddress.cpp
    g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_RF24_CHANNEL=76 -DMY_LINUX_SERIAL_PTY=\"ttyMySensorsGateway\" -DMY_IS_SERIAL_PTY  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/compatibility.o drivers/Linux/compatibility.cpp
    g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_RF24_CHANNEL=76 -DMY_LINUX_SERIAL_PTY=\"ttyMySensorsGateway\" -DMY_IS_SERIAL_PTY  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/SoftEeprom.o drivers/Linux/SoftEeprom.cpp
    g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_RF24_CHANNEL=76 -DMY_LINUX_SERIAL_PTY=\"ttyMySensorsGateway\" -DMY_IS_SERIAL_PTY  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/EthernetServer.o drivers/Linux/EthernetServer.cpp
    g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_RF24_CHANNEL=76 -DMY_LINUX_SERIAL_PTY=\"ttyMySensorsGateway\" -DMY_IS_SERIAL_PTY  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o examples_linux/mysGateway.o examples_linux/mysGateway.cpp
    cc  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/RPi/piHiPri.o drivers/RPi/piHiPri.c
    cc  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/RPi/bcm2835.o drivers/RPi/bcm2835.c
    g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_RF24_CHANNEL=76 -DMY_LINUX_SERIAL_PTY=\"ttyMySensorsGateway\" -DMY_IS_SERIAL_PTY  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/RPi/rpi_util.o drivers/RPi/rpi_util.cpp
    g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_RF24_CHANNEL=76 -DMY_LINUX_SERIAL_PTY=\"ttyMySensorsGateway\" -DMY_IS_SERIAL_PTY  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/RPi/Wire.o drivers/RPi/Wire.cpp
    g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_RF24_CHANNEL=76 -DMY_LINUX_SERIAL_PTY=\"ttyMySensorsGateway\" -DMY_IS_SERIAL_PTY  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/RPi/SPI.o drivers/RPi/SPI.cpp
    g++ -pthread  -o examples_linux/mysGateway drivers/Linux/log.o drivers/Linux/noniso.o drivers/Linux/Print.o drivers/Linux/EthernetClient.o drivers/Linux/SerialPort.o drivers/Linux/Stream.o drivers/Linux/IPAddress.o drivers/Linux/compatibility.o drivers/Linux/SoftEeprom.o drivers/Linux/EthernetServer.o examples_linux/mysGateway.o drivers/RPi/piHiPri.o drivers/RPi/bcm2835.o drivers/RPi/rpi_util.o drivers/RPi/Wire.o drivers/RPi/SPI.o
    

    Sudo make install

    pi@raspberrypi:~/MySensors $ sudo make install
    Installing examples_linux/mysGateway to /usr/local/bin
    install -m0644 initscripts/mysgateway.systemd /etc/systemd/system/mysgateway.service
    systemctl daemon-reload
    MySensors gateway has been installed, to add to the boot run:
      sudo systemctl enable mysgateway.service
    To start the gateway run:
      sudo systemctl start mysgateway.service
    

    start the gateway

    pi@raspberrypi:~/MySensors $ sudo systemctl start mysgateway.service
    

    Start the debug on the gateway:

    pi@raspberrypi:~/MySensors $ sudo ./examples_linux/mysGateway -d
    mysGateway: Starting gateway...
    mysGateway: Protocol version - 2.0.1-beta
    mysGateway: MCO:BGN:INIT GW,CP=RNNG---,VER=2.0.1-beta
    mysGateway: TSF:LRT:OK
    mysGateway: TSM:INIT
    mysGateway: TSM:INIT:TSP OK
    mysGateway: TSM:INIT:GW MODE
    mysGateway: TSM:READY
    mysGateway: MCO:REG:NOT NEEDED
    mysGateway: MCO:BGN:STP
    mysGateway: MCO:BGN:INIT OK,ID=0,PAR=0,DIS=0,REG=1
    mysGateway: TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0:
    mysGateway: !TSF:MSG:LEN,0!=7
    mysGateway: TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0:
    mysGateway: !TSF:MSG:LEN,0!=7
    mysGateway: TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0:
    mysGateway: !TSF:MSG:LEN,0!=7
    

    Now, the gateway on the Raspberry Pi 2 seem ok and up and running. Moving over to the sensor node, the Arduino Uno with NRF24L01+.

    Uploaded and ran the Clear_EPROM sketch

    /*
    *
    * This sketch clears radioId, relayId and routing info in EEPROM 
    *
    */
    
    #include <SPI.h>
    #include <EEPROM.h>  
    
    void setup()  
    { 
      for (int i=0;i<512;i++) {
        EEPROM.write(i, 0xff);
      }
      Serial.println("EEPROM cleared");
    }
    
    void loop()      
    { 
      // Nothing to do here...
    } 
    

    After this I uploaded your recommended default sketch. However I added "#define MY_RF24_CHANNEL 76"

    // Enable debug prints to serial monitor
    #define MY_DEBUG 
    
    // Enable and select radio type attached
    #define MY_NODE_ID 1
    #define MY_PARENT_NODE_ID 0
    #define MY_PARENT_NODE_IS_STATIC
    #define MY_RADIO_NRF24
    #define MY_RF24_CHANNEL 76
    
    #include <MySensors.h>  
    
    #define CHILD_ID_LIGHT 0
    #define LIGHT_SENSOR_ANALOG_PIN 0
    
    unsigned long SLEEP_TIME = 30000; // Sleep time between reads (in milliseconds)
    
    MyMessage msg(CHILD_ID_LIGHT, V_LIGHT_LEVEL);
    int lastLightLevel;
    
    
    void presentation()  {
      // Send the sketch version information to the gateway and Controller
      sendSketchInfo("Light Sensor", "1.0");
    
      // Register all sensors to gateway (they will be created as child devices)
      present(CHILD_ID_LIGHT, S_LIGHT_LEVEL);
    }
    
    void loop()      
    {     
      int16_t lightLevel = (1023-analogRead(LIGHT_SENSOR_ANALOG_PIN))/10.23; 
      Serial.println(lightLevel);
      if (lightLevel != lastLightLevel) {
          send(msg.set(lightLevel));
          lastLightLevel = lightLevel;
      }
      sleep(SLEEP_TIME);
    }
    

    The result, enoyingly is the same it seems based on the output from the Serial Monitor from the Arduino Uno.

    Starting sensor (RNNNA-, 2.0.0)
    TSM:INIT
    TSM:RADIO:OK
    TSP:ASSIGNID:OK (ID=1)
    TSM:FPAR
    TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSM:FPAR
    TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSM:FPAR
    TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSM:FPAR
    TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    !TSM:FPAR:FAIL
    !TSM:FAILURE
    TSM:PDT
    TSM:INIT
    TSM:RADIO:OK
    TSP:ASSIGNID:OK (ID=1)
    TSM:FPAR
    TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSM:FPAR
    TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSM:FPAR
    TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSM:FPAR
    TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    !TSM:FPAR:FAIL
    !TSM:FAILURE
    TSM:PDT
    

    Frustrating... Can it be other modules, libraries than what I've not installed on the Raspberry Pi that is the reason for the error?

    Hardware mycontroller.org gpio raspberry pi 2 rbp2 nrf24l01

  • How do I setup Raspberry Pi 2 with NRF24L01 as MySensor 2.0 Gateway with MyController as controller
    Christian SimonsenC Christian Simonsen

    @alexsh1 said:

    FPAR: FAIL = Find Parent Fail. The sensor is looking for a parent, but cannot find it. There can be several reasons for this:

    1. Try to add larger capacitors to both radios on GW and the sensor.
    2. Please use a default sketch on the sensor, no signing etc.
    3. Double check if the channel is the same. You are using channel 0 on RPi. What about the sensor? Did you change it from a default 76?
    4. Did you upload both sketches using MySensors 2.0?
    5. Please check the power feed on both GW and the sensor.

    Hi thanks for the support. Hope you are able to elaborate a bit on your points.

    1. Try to add larger capacitors to both radios on GW and the sensor.
      I'm using a 4.7 uF Capacitator on both the NRF24L01 on the Raspberry Pi, and on the NRF24L01 on the Arduino. Do you think I still need a bigger capacitor?

    2. ** Please use a default sketch on the sensor, no signing etc.**

    Can you share a default sketch to use?

    I have tried the below sketch from this page https://www.mysensors.org/download/sensor_api_20#sensor-nodes
    But the sketch do not compile due to non defined NODE_ID. I tried to updated the code by changing NODE_ID to MY_NODE_ID and added a line to #DEFINE MY_NODE_ID 1

    Is this correct? See the updated code that I've used below

    #define MY_RADIO_NRF24
    #define MY_DEBUG
    
    #include <MySensors.h>
    #include <SPI.h>
    
    #define MY_NODE_ID 1
    #define MY_PARENT_NODE_ID 0
    #define MY_PARENT_NODE_IS_STATIC
    
    MyMessage msg(MY_NODE_ID, V_TRIPPED);
    
    void presentation()
    {
        present(MY_NODE_ID, S_DOOR);
    }
    
    void loop()
    {
    
    }
    

    With this code I still get an error (this is the Arduino Uno sensor node)

    TSM:INIT
    TSM:RADIO:OK
    TSP:ASSIGNID:OK (ID=1)
    TSM:FPAR
    TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSM:FPAR
    TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSM:FPAR
    TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSM:FPAR
    TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    !TSM:FPAR:FAIL
    !TSM:FAILURE
    TSM:PDT
    
    1. Did you upload both sketches using MySensors 2.0?
      Not sure how you upload the sketch to the RPI 2 using MySenors 2.0. However I have atleast tried to follow this tutorial. https://www.mysensors.org/build/raspberry

    The actual steps I did are repeated below.

    git clone https://github.com/mysensors/MySensors.git
    cd MySensors
    
    ./configure --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyMySensorsGateway --my-radio=nrf24
    
    sudo make all 
    
    sudo make install
    
    sudo systemctl enable mysgateway.service
    
    sudo ./examples_linux/mysGateway -d
    
    1. Please check the power feed on both GW and the sensor.
      How do you do this?
    Hardware mycontroller.org gpio raspberry pi 2 rbp2 nrf24l01

  • How do I setup Raspberry Pi 2 with NRF24L01 as MySensor 2.0 Gateway with MyController as controller
    Christian SimonsenC Christian Simonsen

    Hi,

    I'm stuck trying to setup my Raspberry Pi 2 with NRF24L01 to the GPIO pins as a Gateway and as a controller (MyController.org). Im trying to use MySensors 2.0 library. I will gladly pay a bit if someone can help with 1-to-1 via Skype or similar to get this working. As Im close to giving up on my own...

    Any help is very much appreciated.

    Configuration of the gateway on the Raspberry Pi 2

    pi@raspberrypi:~/MySensors $ ./configure --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyMySensorsGateway --my-radio=nrf24 --my-rf24-channel=0
    [SECTION] Detecting target machine.
    [OK] machine detected: SoC=BCM2836, Type=Rpi2, CPU=armv7l, REV=a01041.
    [OK] init system detected: systemd
    [SECTION] Saving configuration.
    [SECTION] Cleaning previous builds.
    [OK] Finished.
    

    Make command on the Raspberry Pi 2 via Terminal on my Mac.

    pi@raspberrypi:~/MySensors $ make
    cc  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/log.o drivers/Linux/log.c
    g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_RF24_CHANNEL=0 -DMY_LINUX_SERIAL_PTY=\"/dev/ttyMySensorsGateway\" -DMY_IS_SERIAL_PTY  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/noniso.o drivers/Linux/noniso.cpp
    g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_RF24_CHANNEL=0 -DMY_LINUX_SERIAL_PTY=\"/dev/ttyMySensorsGateway\" -DMY_IS_SERIAL_PTY  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/Print.o drivers/Linux/Print.cpp
    g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_RF24_CHANNEL=0 -DMY_LINUX_SERIAL_PTY=\"/dev/ttyMySensorsGateway\" -DMY_IS_SERIAL_PTY  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/EthernetClient.o drivers/Linux/EthernetClient.cpp
    g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_RF24_CHANNEL=0 -DMY_LINUX_SERIAL_PTY=\"/dev/ttyMySensorsGateway\" -DMY_IS_SERIAL_PTY  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/SerialPort.o drivers/Linux/SerialPort.cpp
    g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_RF24_CHANNEL=0 -DMY_LINUX_SERIAL_PTY=\"/dev/ttyMySensorsGateway\" -DMY_IS_SERIAL_PTY  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/Stream.o drivers/Linux/Stream.cpp
    g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_RF24_CHANNEL=0 -DMY_LINUX_SERIAL_PTY=\"/dev/ttyMySensorsGateway\" -DMY_IS_SERIAL_PTY  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/IPAddress.o drivers/Linux/IPAddress.cpp
    g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_RF24_CHANNEL=0 -DMY_LINUX_SERIAL_PTY=\"/dev/ttyMySensorsGateway\" -DMY_IS_SERIAL_PTY  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/compatibility.o drivers/Linux/compatibility.cpp
    g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_RF24_CHANNEL=0 -DMY_LINUX_SERIAL_PTY=\"/dev/ttyMySensorsGateway\" -DMY_IS_SERIAL_PTY  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/SoftEeprom.o drivers/Linux/SoftEeprom.cpp
    g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_RF24_CHANNEL=0 -DMY_LINUX_SERIAL_PTY=\"/dev/ttyMySensorsGateway\" -DMY_IS_SERIAL_PTY  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/Linux/EthernetServer.o drivers/Linux/EthernetServer.cpp
    g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_RF24_CHANNEL=0 -DMY_LINUX_SERIAL_PTY=\"/dev/ttyMySensorsGateway\" -DMY_IS_SERIAL_PTY  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o examples_linux/mysGateway.o examples_linux/mysGateway.cpp
    cc  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/RPi/piHiPri.o drivers/RPi/piHiPri.c
    cc  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/RPi/bcm2835.o drivers/RPi/bcm2835.c
    g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_RF24_CHANNEL=0 -DMY_LINUX_SERIAL_PTY=\"/dev/ttyMySensorsGateway\" -DMY_IS_SERIAL_PTY  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/RPi/rpi_util.o drivers/RPi/rpi_util.cpp
    g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_RF24_CHANNEL=0 -DMY_LINUX_SERIAL_PTY=\"/dev/ttyMySensorsGateway\" -DMY_IS_SERIAL_PTY  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/RPi/Wire.o drivers/RPi/Wire.cpp
    g++ -DMY_RADIO_NRF24 -DMY_GATEWAY_SERIAL -DMY_DEBUG -march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -DLINUX_ARCH_RASPBERRYPI -Ofast -g -Wall -Wextra -DMY_RF24_CHANNEL=0 -DMY_LINUX_SERIAL_PTY=\"/dev/ttyMySensorsGateway\" -DMY_IS_SERIAL_PTY  -I. -I./core -I./drivers/Linux -I./drivers/RPi -MMD -c -o drivers/RPi/SPI.o drivers/RPi/SPI.cpp
    g++ -pthread  -o examples_linux/mysGateway drivers/Linux/log.o drivers/Linux/noniso.o drivers/Linux/Print.o drivers/Linux/EthernetClient.o drivers/Linux/SerialPort.o drivers/Linux/Stream.o drivers/Linux/IPAddress.o drivers/Linux/compatibility.o drivers/Linux/SoftEeprom.o drivers/Linux/EthernetServer.o examples_linux/mysGateway.o drivers/RPi/piHiPri.o drivers/RPi/bcm2835.o drivers/RPi/rpi_util.o drivers/RPi/Wire.o drivers/RPi/SPI.o
    

    I then ran the mysGateway

    pi@raspberrypi:~/MySensors $ sudo ./examples_linux/mysGateway -d
    mysGateway: Starting gateway...
    mysGateway: Protocol version - 2.0.1-beta
    mysGateway: MCO:BGN:INIT GW,CP=RNNG---,VER=2.0.1-beta
    mysGateway: TSF:LRT:OK
    mysGateway: TSM:INIT
    mysGateway: TSM:INIT:TSP OK
    mysGateway: TSM:INIT:GW MODE
    mysGateway: TSM:READY
    mysGateway: MCO:REG:NOT NEEDED
    mysGateway: MCO:BGN:STP
    mysGateway: MCO:BGN:INIT OK,ID=0,PAR=0,DIS=0,REG=1
    mysGateway: TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0:
    mysGateway: !TSF:MSG:LEN,0!=7
    mysGateway: TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0:
    mysGateway: !TSF:MSG:LEN,0!=7
    mysGateway: TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0:
    mysGateway: !TSF:MSG:LEN,0!=7
    --Continues with same code a lot longer - just cut it short here
    
    

    Then over to the Arduino Uno that is also connect with an NRF24L01

    The sketch I'm running on the Arduino

    /*
     * The MySensors Arduino library handles the wireless radio link and protocol
     * between your home built sensors/actuators and HA controller of choice.
     * The sensors forms a self healing radio network with optional repeaters. Each
     * repeater and gateway builds a routing tables in EEPROM which keeps track of the
     * network topology allowing messages to be routed to nodes.
     *
     * Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
     * Copyright (C) 2013-2015 Sensnology AB
     * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors
     *
     * Documentation: http://www.mysensors.org
     * Support Forum: http://forum.mysensors.org
     *
     * This program is free software; you can redistribute it and/or
     * modify it under the terms of the GNU General Public License
     * version 2 as published by the Free Software Foundation.
     *
     *******************************
     */
    #include <stdint.h>
    #include <pins_arduino.h>
    #define MY_DEBUG
    #define MY_DEBUG_VERBOSE_SIGNING
    #define MY_RF24_CHANNEL 0
    #define MY_RADIO_NRF24
    //#define MY_SIGNING_SOFT
    #define MY_SIGNING_ATSHA204
    #define MY_SIGNING_NODE_WHITELISTING {{.nodeId = GATEWAY_ADDRESS,.serial = {0x09,0x08,0x07,0x06,0x05,0x04,0x03,0x02,0x01}}}
    #define MY_SIGNING_REQUEST_SIGNATURES
    #ifndef MY_SIGNING_SOFT_RANDOMSEED_PIN
    #define MY_SIGNING_SOFT_RANDOMSEED_PIN 7
    #endif
    #ifndef MY_SIGNING_ATSHA204_PIN
    #define MY_SIGNING_ATSHA204_PIN 17
    #endif
    #define MY_RF24_ENABLE_ENCRYPTION
    
    #include <SPI.h>
    #include <MySensors.h>
    

    However with this sketch I'm recieving an error that I can read on the Serial Monitor on my Mac (output from the Arduino sensor node)

    Starting sensor (RNNNAA, 2.0.0)
    TSM:INIT
    TSM:RADIO:OK
    TSP:ASSIGNID:OK (ID=1)
    TSM:FPAR
    TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSM:FPAR
    TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSM:FPAR
    TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSM:FPAR
    TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    !TSM:FPAR:FAIL
    !TSM:FAILURE
    

    I don't understand what is wrong. I do believe all the wires are correct, so I believe it is related to the Arduino sketch, or more likely the gateway setup on the Raspberry Pi.

    I hope someone can help. I'll gladly pay someone to give me some 1-to-1 support over Skype or similar.

    Hardware mycontroller.org gpio raspberry pi 2 rbp2 nrf24l01

  • 💬 Building a Raspberry Pi Gateway
    Christian SimonsenC Christian Simonsen

    Hi,

    Is there anyone here that can give me some one-to-one support this evening to setup the Raspberry Pi + NRF24L01 as a gateway with MyController, and a Arduino Uno + NRF24L01 as Sensor node. I'm stuck after trying various things over the past week, so looks like I need some additional skills/knowledge to get the first setup working.

    Maybe we can use Skype or some other medium. I will gladly pay a bit for this support if anyone is interested. I have some free time from 18:00 CET - 23:30 CET today...

    Announcements

  • 💬 Building a Raspberry Pi Gateway
    Christian SimonsenC Christian Simonsen

    @marceloaqno said:

    cd MySensors
    ./configure --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyMySensorsGateway --my

    Thanks for letting me know, didn't know that not running it from the specific folder would have an impact.

    I reconfigured it as you recommended. and restarted the gateway, with the result below.

    pi@raspberrypi:~/MySensors $ sudo ./examples_linux/mysGateway -d
    mysGateway: Starting gateway...
    mysGateway: Protocol version - 2.0.1-beta
    mysGateway: MCO:BGN:INIT GW,CP=RNNG---,VER=2.0.1-beta
    mysGateway: TSF:LRT:OK
    mysGateway: TSM:INIT
    mysGateway: TSM:INIT:TSP OK
    mysGateway: TSM:INIT:GW MODE
    mysGateway: TSM:READY
    mysGateway: MCO:REG:NOT NEEDED
    mysGateway: MCO:BGN:STP
    mysGateway: MCO:BGN:INIT OK,ID=0,PAR=0,DIS=0,REG=1
    mysGateway: TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0:
    mysGateway: !TSF:MSG:LEN,0!=7
    mysGateway: TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0:
    mysGateway: !TSF:MSG:LEN,0!=7
    mysGateway: TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0:
    mysGateway: !TSF:MSG:LEN,0!=7
    mysGateway: TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0:
    mysGateway: !TSF:MSG:LEN,0!=7
    mysGateway: TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0:
    mysGateway: !TSF:MSG:LEN,0!=7
    mysGateway: TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0:
    mysGateway: !TSF:MSG:LEN,14!=7
    mysGateway: TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0:
    mysGateway: !TSF:MSG:LEN,0!=7
    mysGateway: TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0:
    mysGateway: !TSF:MSG:LEN,0!=7
    mysGateway: TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0:
    mysGateway: !TSF:MSG:LEN,14!=7
    mysGateway: TSF:MSG:READ,0-0-0,s=0,c=0,t=0,pt=0,l=0,sg=0:
    mysGateway: !TSF:MSG:LEN,0!=7
    

    What is the best way to test if the gateway work? What sketch should I use on the arduino? and how do I see in Terminal that the mysGateway receive the transfer successfully?

    Announcements

  • 💬 Building a Raspberry Pi Gateway
    Christian SimonsenC Christian Simonsen

    Seems I'm closing in to working solution. I didn't understand how to use the ./configure element before now. However I ended up with these configurations

    pi@raspberrypi:~ $ ./MySensors/configure --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyMySensorsGateway --my-radio=nrf24 --my-rf24-irq-pin=15
    [SECTION] Detecting target machine.
    [OK] machine detected: SoC=BCM2836, Type=Rpi2, CPU=armv7l, REV=a01041.
    [OK] init system detected: systemd
    [SECTION] Saving configuration.
    [SECTION] Cleaning previous builds.
    make: *** No rule to make target 'clean'.  Stop.
    [OK] Finished.
    pi@raspberrypi:~ $ sudo ./MySensors/examples_linux/mysGateway -d
    mysGateway: Starting gateway...
    mysGateway: Protocol version - 2.0.1-beta
    mysGateway: MCO:BGN:INIT GW,CP=RNNG--Q,VER=2.0.1-beta
    mysGateway: TSF:LRT:OK
    mysGateway: TSM:INIT
    mysGateway: TSM:INIT:TSP OK
    mysGateway: TSM:INIT:GW MODE
    mysGateway: TSM:READY
    mysGateway: MCO:REG:NOT NEEDED
    mysGateway: MCO:BGN:STP
    mysGateway: MCO:BGN:INIT OK,ID=0,PAR=0,DIS=0,REG=1
    mysGateway: TSM:READY:NWD REQ
    mysGateway: TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK:
    mysGateway: TSF:SRT:OK
    
    

    Based on this it seem to all be ok on the Raspberry Pi side.. So I uploaded the "MockMySensors" sketch to my Arduino Uno with NRF24 connected. Below is the code and failure message I get from the Arduino. Do I need to set a gateway address or something?

    Starting sensor (RNNNA-, 2.0.0)
    TSM:INIT
    TSM:RADIO:OK
    TSP:ASSIGNID:OK (ID=254)
    TSM:FPAR
    TSP:MSG:SEND 254-254-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSM:FPAR
    TSP:MSG:SEND 254-254-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSM:FPAR
    TSP:MSG:SEND 254-254-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSM:FPAR
    TSP:MSG:SEND 254-254-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    !TSM:FPAR:FAIL
    !TSM:FAILURE
    TSM:PDT```
    Announcements

  • 💬 Building a Raspberry Pi Gateway
    Christian SimonsenC Christian Simonsen

    @jerseyguy1996

    Thanks I'll test it. But it seems like I've jumped over a step or two. Or something isn't working. Nothing happened when I wrote "Make" in Terminal, so I jumped over this step. I guess that might be the problem.

    Do I have to configure (./configure -help) or can I use the default values when I connect the NRF24L01 to the GPIO pins?

    Announcements

  • 💬 Building a Raspberry Pi Gateway
    Christian SimonsenC Christian Simonsen

    Hi,

    Background: I have a raspberry Pi 2 that I've installed MyController on. This works fine, I can access it via the browser. I have also wired up an NRF24L01+ module to the GPIO pins on the Raspberry Pi. I have also set up the raspberry pi as a gateway in the MyController Gateway setup page in Safari. It found it and it seem to work.

    However to my question. How do I know if the Raspberry Pi gateway with NRF24L01 work? How can I monitor what the Raspberry Pi gateway receive? Is there a similar way as the "Serial Monitor" that I use in the Arduino application, when accessing Arduino Uno via USB?

    If there is I need to monitor this via OSX Terminal.

    Announcements

  • Gateway do not receive info from sensor node
    Christian SimonsenC Christian Simonsen

    Hi guys,

    I feel Im getting closer.

    I have a raspberry Pi 2 that I've installed MyController on. This works fine, I can access it via the browser. I have also wired up an NRF24L01+ module to the GPIO pins on the Raspberry Pi. I've managed to add the Raspberry Pi as a controller in MyController.

    Next step is to be able to send something from a Arduino based sensor node. I have an Arduino Uno, with an NRF24L01 module connected.

    I uploaded the
    "hard_signing_whitelisting_full_debug_nrf24_rsa" sketch and the result was this in the Serial Monitor.

    Starting sensor (RNNNAA, 2.0.0)
    TSM:INIT
    TSM:RADIO:OK
    TSM:FPAR
    TSP:MSG:SEND 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSM:FPAR
    TSP:MSG:SEND 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSM:FPAR
    TSP:MSG:SEND 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSM:FPAR
    TSP:MSG:SEND 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    !TSM:FPAR:FAIL
    !TSM:FAILURE
    TSM:PDT

    Seem to fail, but not sure why... any suggestions?

    Troubleshooting

  • 💬 Building a Raspberry Pi Gateway
    Christian SimonsenC Christian Simonsen

    @Christian-Simonsen said:

    I have a raspberry Pi 2 that I've installed MyController on. This works fine, I can access it via the browser. I have also wired up an NRF24L01+ module to the GPIO pins on the Raspberry Pi. And I have followed the steps under "install and build", which seem to have worked fine. I didn't make any changes to the conf file. However now Im stuck. How do I setup the Raspberry Pi with the NRF24L01+ as a gateway in the MyController Gateway setup page in Safari?

    Thanks that did the trick

    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