Ethernet Gateway: No LAN traffic AFTER initial controller setup.



  • Aloha,

    I have got a problem with my setup, which I describe below..
    I have tested and re-tested the setup a few hundred times now, with no substantial success.

    Skipping ahead, the problem is that AFTER successfully initializing the gateway - controller communication, the gateway never sends any data to the controller.

    This is my setup in detail:

    • Gateway hardware is a 'standard' W5100 - NRF24L01 gateway, based upon an Arduino Nano with an inclusion button, but NO LED's. (serial debug is on).
    • Wire connections have been triple checked. Radio communication is working (see below)
    • Arduino IDE was originally 1.6.12, but I have also tested it on 1.8.1. Both versions have the same error.
    • The code is the W5100 Gateway sketch from the "MySensors - Example" menu option. I have also tried the sketch from the MySensors "Build a Ethernet Gateway" homepage. I can successfully ping the Gateway, I can even telnet to it. Version is 2.1.0
    • Soft-SPI, as in the example sketch.
    • Static IP address and MAC-Address. Ping is working reliably.
    • The controller is a current version of FHEM on a RasPi. (debug through logfile and 'tcpdump')
    • The test nodes are "MySlim 2AA" Binary Switch Nodes with a NRF24L01 (serial debug is on). I have tested several sketches - even the standard sketches from Examples. Version is 2.1.0. The nodes are able to communicate through the radio link (see below).

    This is what happens:

    • I'm starting FHEM on a RasPi. The gateway is defined in the FHEM config with the correct IP and Port.

    • Gateway boots up on power up (INIT):

    0;255;3;0;9;MCO:BGN:INIT GW,CP=RNNGA--,VER=2.1.0
    0;255;3;0;9;TSM:INIT
    0;255;3;0;9;TSF:WUR:MS=0
    0;255;3;0;9;TSM:INIT:TSP OK
    0;255;3;0;9;TSM:INIT:GW MODE
    0;255;3;0;9;TSM:READY:ID=0,PAR=0,DIS=0
    0;255;3;0;9;MCO:REG:NOT NEEDED
    IP: 192.168.67.199
    0;255;3;0;9;MCO:BGN:STP
    0;255;3;0;9;MCO:BGN:INIT OK,TSP=1
    
    • I connect the Controller to the gateway through the FHEM Webpage (manually). During the connect, I can see traffic on the LAN between the controller and the Gateway going forth and back (through 'tcpdump' on the controller).
    root@raspi-3:~# tcpdump -A port 5003
    tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
    listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
    
    17:01:29.827667 IP raspi-3.fritz.box.45024 > mysensors-gw1.fritz.box.5003: Flags [F.], seq 4046021717, ack 3087210981, win 29200, length 0
    E..(.v@.@.7...C#..C......)dU....P.r..V..
    17:01:29.827941 IP mysensors-gw1.fritz.box.5003 > raspi-3.fritz.box.45024: Flags [R], seq 3087210981, win 0, length 0
    E..(..@.......C...C#............P...@h........
    17:01:29.834576 IP raspi-3.fritz.box.45026 > mysensors-gw1.fritz.box.5003: Flags [S], seq 1260273500, win 29200, options [mss 1460,sackOK,TS val 43722608 ecr 0,nop,wscale 6], length 0
    E..<.,@.@..U..C#..C.....K.?\......r..j.........
    ..'p........
    17:01:29.834846 IP mysensors-gw1.fritz.box.5003 > raspi-3.fritz.box.45026: Flags [S.], seq 3700211226, ack 1260273501, win 2048, options [mss 1460], length 0
    E..,..@.......C...C#........K.?]`....J........
    17:01:29.835016 IP raspi-3.fritz.box.45026 > mysensors-gw1.fritz.box.5003: Flags [.], ack 1, win 29200, length 0
    E..(.-@.@..h..C#..C.....K.?]....P.r..V..
    17:01:29.856414 IP raspi-3.fritz.box.45026 > mysensors-gw1.fritz.box.5003: Flags [P.], seq 1:12, ack 1, win 29200, length 11
    E..3..@.@..\..C#..C.....K.?]....P.r..a..0;0;3;0;2;
    
    17:01:30.058900 IP mysensors-gw1.fritz.box.5003 > raspi-3.fritz.box.45026: Flags [.], ack 12, win 2037, length 0
    E..(..@.......C...C#........K.?hP.............
    
    ^C
    7 packets captured
    7 packets received by filter
    0 packets dropped by kernel
    

    (of course I restarted the tcpdump immediately after this.. :-) )

    • Serial debug on the gateway during the connect, shows Eth: connect, but then INIT is repeated:
    0;255;3;0;9;Eth: connect
    0;255;3;0;9;MCO:BGN:INIT GW,CP=RNNGA--,VER=2.1.0
    0;255;3;0;9;TSM:INIT
    0;255;3;0;9;TSF:WUR:MS=0
    0;255;3;0;9;TSM:INIT:TSP OK
    0;255;3;0;9;TSM:INIT:GW MODE
    0;255;3;0;9;TSM:READY:ID=0,PAR=0,DIS=0
    0;255;3;0;9;MCO:REG:NOT NEEDED
    IP: 192.168.67.199
    0;255;3;0;9;MCO:BGN:STP
    0;255;3;0;9;MCO:BGN:INIT OK,TSP=1
    
    • The controller log file and web page show the Gateway as opened or connected respectively.
    2017.01.14 17:01:29 3: Opening MySenGW1 device 192.168.67.199:5003
    2017.01.14 17:01:29 5: MYSENSORS send: Rx: fr=000 ci=000 c=003(C_INTERNAL    ) st=002(I_VERSION       ) ack=0 ''
    
    2017.01.14 17:01:29 5: SW: 303b303b333b303b323b0a
    2017.01.14 17:01:29 3: MySenGW1 device opened
    
    • "inclusion-mode" and "autocreate" on the FHEM controller both are set to "1" - each new sensor should be auto-added into the controller IF the controller would ever see the data...

    • Sensor nodes were able to receive an ID previously, from the gateway

    • Sensor node is able to communicate to the gateway AND the gateway can answer back to the node on the radio.

    When a sensor connects to the gateway in order to deliver its payload, this is the communication:

    Sensor debug:

    0 MCO:BGN:INIT NODE,CP=RNNNA--,VER=2.1.0
    32 TSM:INIT
    49 TSF:WUR:MS=0
    81 TSM:INIT:TSP OK
    98 TSF:SID:OK,ID=5
    114 TSM:FPAR
    180 TSF:MSG:SEND,5-5-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    2260 !TSM:FPAR:NO REPLY
    2277 TSM:FPAR
    2326 TSF:MSG:SEND,5-5-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    3162 TSF:MSG:READ,0-0-5,s=255,c=3,t=8,pt=1,l=1,sg=0:0
    3211 TSF:MSG:FPAR OK,ID=0,D=1
    4423 TSM:FPAR:OK
    4440 TSM:ID
    4456 TSM:ID:OK
    4472 TSM:UPL
    4489 TSF:MSG:SEND,5-5-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=OK:1
    4571 TSF:MSG:READ,0-0-5,s=255,c=3,t=25,pt=1,l=1,sg=0:1
    4636 TSF:MSG:PONG RECV,HP=1
    4669 TSM:UPL:OK
    4685 TSM:READY:ID=5,PAR=0,DIS=1
    4734 TSF:MSG:SEND,5-5-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100
    4816 TSF:MSG:READ,0-0-5,s=255,c=3,t=15,pt=6,l=2,sg=0:0100
    4882 TSF:MSG:SEND,5-5-0-0,s=255,c=0,t=17,pt=0,l=5,sg=0,ft=0,st=OK:2.1.0
    4964 TSF:MSG:SEND,5-5-0-0,s=255,c=3,t=6,pt=1,l=1,sg=0,ft=0,st=OK:0
    7061 TSF:MSG:SEND,5-5-0-0,s=3,c=0,t=0,pt=0,l=0,sg=0,ft=0,st=OK:
    7127 MCO:REG:REQ
    7159 TSF:MSG:SEND,5-5-0-0,s=255,c=3,t=26,pt=1,l=1,sg=0,ft=0,st=OK:2
    9256 TSF:MSG:SEND,5-5-0-0,s=255,c=3,t=26,pt=1,l=1,sg=0,ft=0,st=OK:2
    9338 TSF:MSG:READ,0-0-5,s=255,c=3,t=27,pt=1,l=1,sg=0:1
    9404 MCO:PIM:NODE REG=1
    9420 MCO:BGN:STP
    9453 MCO:BGN:INIT OK,TSP=1
    9502 TSF:MSG:SEND,5-5-0-0,s=3,c=1,t=16,pt=2,l=2,sg=0,ft=0,st=OK:1
    

    Gateway debug:

    0;255;3;0;9;TSF:MSG:READ,5-5-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
    0;255;3;0;9;TSF:MSG:BC
    0;255;3;0;9;TSF:MSG:FPAR REQ,ID=5
    0;255;3;0;9;TSF:PNG:SEND,TO=0
    0;255;3;0;9;TSF:CKU:OK
    0;255;3;0;9;TSF:MSG:GWL OK
    0;255;3;0;9;TSF:MSG:SEND,0-0-5-5,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0
    0;255;3;0;9;TSF:MSG:READ,5-5-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
    0;255;3;0;9;TSF:MSG:PINGED,ID=5,HP=1
    0;255;3;0;9;TSF:MSG:SEND,0-0-5-5,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=OK:1
    0;255;3;0;9;TSF:MSG:READ,5-5-0,s=255,c=3,t=15,pt=6,l=2,sg=0:0100
    0;255;3;0;9;TSF:MSG:SEND,0-0-5-5,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100
    0;255;3;0;9;TSF:MSG:READ,5-5-0,s=255,c=0,t=17,pt=0,l=5,sg=0:2.1.0
    0;255;3;0;9;MCO:BGN:INIT GW,CP=RNNGA--,VER=2.1.0
    0;255;3;0;9;TSM:INIT
    0;255;3;0;9;TSF:WUR:MS=0
    0;255;3;0;9;TSM:INIT:TSP OK
    0;255;3;0;9;TSM:INIT:GW MODE
    0;255;3;0;9;TSM:READY:ID=0,PAR=0,DIS=0
    0;255;3;0;9;MCO:REG:NOT NEEDED
    IP: 192.168.67.199
    0;255;3;0;9;MCO:BGN:STP
    0;255;3;0;9;MCO:BGN:INIT OK,TSP=1
    0;255;3;0;9;TSF:MSG:READ,5-5-0,s=255,c=3,t=6,pt=1,l=1,sg=0:0
    0;255;3;0;9;MCO:BGN:INIT GW,CP=RNNGA--,VER=2.1.0
    0;255;3;0;9;TSM:INIT
    0;255;3;0;9;TSF:WUR:MS=0
    0;255;3;0;9;TSM:INIT:TSP OK
    0;255;3;0;9;TSM:INIT:GW MODE
    0;255;3;0;9;TSM:READY:ID=0,PAR=0,DIS=0
    0;255;3;0;9;MCO:REG:NOT NEEDED
    IP: 192.168.67.199
    0;255;3;0;9;MCO:BGN:STP
    0;255;3;0;9;MCO:BGN:INIT OK,TSP=1
    0;255;3;0;9;TSF:MSG:READ,5-5-0,s=3,c=0,t=0,pt=0,l=0,sg=0:
    0;255;3;0;9;MCO:BGN:INIT GW,CP=RNNGA--,VER=2.1.0
    0;255;3;0;9;TSM:INIT
    0;255;3;0;9;TSF:WUR:MS=0
    0;255;3;0;9;TSM:INIT:TSP OK
    0;255;3;0;9;TSM:INIT:GW MODE
    0;255;3;0;9;TSM:READY:ID=0,PAR=0,DIS=0
    0;255;3;0;9;MCO:REG:NOT NEEDED
    IP: 192.168.67.199
    0;255;3;0;9;MCO:BGN:STP
    0;255;3;0;9;MCO:BGN:INIT OK,TSP=1
    0;255;3;0;9;TSF:MSG:READ,5-5-0,s=255,c=3,t=26,pt=1,l=1,sg=0:2
    0;255;3;0;9;TSF:MSG:SEND,0-0-5-5,s=255,c=3,t=27,pt=1,l=1,sg=0,ft=0,st=OK:1
    0;255;3;0;9;TSF:MSG:READ,5-5-0,s=3,c=1,t=16,pt=2,l=2,sg=0:1
    
    0;255;3;0;9;MCO:BGN:INIT GW,CP=RNNGA--,VER=2.1.0
    0;255;3;0;9;TSM:INIT
    0;255;3;0;9;TSF:WUR:MS=0
    0;255;3;0;9;TSM:INIT:TSP OK
    0;255;3;0;9;TSM:INIT:GW MODE
    0;255;3;0;9;TSM:READY:ID=0,PAR=0,DIS=0
    0;255;3;0;9;MCO:REG:NOT NEEDED
    IP: 192.168.67.199
    0;255;3;0;9;MCO:BGN:STP
    0;255;3;0;9;MCO:BGN:INIT OK,TSP=1
    

    (... this looks like a sensible node-gateway communication to me :-) )

    • BUT: tcpdump on the controller during that time shows: NO TRAFFIC AT ALL!
    root@raspi-3:~# tcpdump -A port 5003
    tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
    listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
    
    
    

    So the problem seems to be that the gateway sends no data to the controller AFTER the initial connect...

    I'm fiddling with that setup for days now (on and off), so ANY help will be appreciated!!
    Thanks in advance...

    ohuf.



  • @ohuf :
    Maybe it´s a simple thing. Please check your "boards.txt" file Version. Possibly in Version 1.8.1 the known failure of eternally rebooting W5100 (and probably ENC28J60 too) is propagated once more.

    Change "board.txt" to a known working Version (e.g. 1.6.11) as described in https://forum.mysensors.org/topic/5716/solved-w5100-ethernet-gateway-with-nrf24-stable-mysensors-2-1-0-problem/4.

    Good luck!



  • @tboha :

    Awesome! Thanks for that suggestion: it's working with the boards definition from 1.6.11 !!

    The point is, I actually saw that post (the one you referenced in your answer) while looking for a solution in here, sometimes in the last few days; but I thought it wouldn't apply to the latest version, I was using as well....
    bummer

    So what I did was going into the Boards Manager in the IDE and switching the AVR board definition back to 1.6.11 AND i addition to that I was getting the old boards.txt from the 1.6.11 Git repository.

    Is either of those two steps redundant/bad?

    Thanks again,

    ohuf.

    @tboha said:

    @ohuf :
    Maybe it´s a simple thing. Please check your "boards.txt" file Version. Possibly in Version 1.8.1 the known failure of eternally rebooting W5100 (and probably ENC28J60 too) is propagated once more.

    Change "board.txt" to a known working Version (e.g. 1.6.11) as described in https://forum.mysensors.org/topic/5716/solved-w5100-ethernet-gateway-with-nrf24-stable-mysensors-2-1-0-problem/4.

    Good luck!



  • @ohuf
    Learned something new. Until now I even didn't know that boards.txt was available at GITHUB.
    I think replacing boards.txt twice might be redundant, but this is a pure guess.

    Important for now is: have much fun with your new functional Gateway!


Log in to reply
 

Looks like your connection to MySensors Forum was lost, please wait while we try to reconnect.