MySensors SenseBender GW + W5100



  • I am a newbe on this forum so hopefully I won't stumble too many times!

    I have a MYSensors GW with a W5100 Ethernet module that I am trying to bring up.

    I started with operating the GW as a serial GW talking to either MyController.org or Homeassistant Controllers.

    This setup works fine with no issues between the controller and GW or any RF nodes.

    I then migrated the GW to Ethernet using the MYSensors Webserver sketch to checkout the W5100.

    Everything worked fine. No issues. I used nmap to query the W5100 @ 192.168.1.99 and I see that port 80 /tcp is open and the service is http. This is good.

    I then loaded the MYSensors GW sketch and tried running the Homeassistant Controller app.

    The Controller keeps trying to connect to the GW, but, fails. This scenario keeps repeating.

    I then tried the MYController.org app and I see a similar connection failure.

    So at this time both controller apps are unable to talk to the GW via Ethernet.

    I can ping the GW so I know it is there.

    I used nmap and it shows port 5003 is closed, service =filemaker.

    I was expecting port 5003 to be open, not closed!

    I suspect this is why the Controller apps are unable to communicate with the GW.

    I checked the sketch and I see where port 5003 is defined, but, I do not understand why the port is closed.

    I believe at this point the h/w is OK and the issue is with the s/w.

    I am not a s/w expert so I am in need of some help tracking down why the Ethernet is not working.

    I have uploaded the sketch I am using as well as the IDE compiler log.

    My IDE is version 1.8.2.

    0_1497553226117_sketch_jun05a_SenseBender_Gateway_Ethernet.ino

    0_1497553530246_Sketch_jun05a_SB_GW_Ethernet_Compile_Log.txt



  • @JWB said in MySensors SenseBender GW + W5100:

    I am a newbe on this forum so hopefully I won't stumble too many times!

    I have a MYSensors GW with a W5100 Ethernet module that I am trying to bring up.

    I started with operating the GW as a serial GW talking to either MyController.org or Homeassistant Controllers.

    This setup works fine with no issues between the controller and GW or any RF nodes.

    I then migrated the GW to Ethernet using the MYSensors Webserver sketch to checkout the W5100.

    Everything worked fine. No issues. I used nmap to query the W5100 @ 192.168.1.99 and I see that port 80 /tcp is open and the service is http. This is good.

    I then loaded the MYSensors GW sketch and tried running the Homeassistant Controller app.

    The Controller keeps trying to connect to the GW, but, fails. This scenario keeps repeating.

    I then tried the MYController.org app and I see a similar connection failure.

    So at this time both controller apps are unable to talk to the GW via Ethernet.

    I can ping the GW so I know it is there.

    I used nmap and it shows port 5003 is closed, service =filemaker.

    I was expecting port 5003 to be open, not closed!

    I suspect this is why the Controller apps are unable to communicate with the GW.

    I checked the sketch and I see where port 5003 is defined, but, I do not understand why the port is closed.

    I believe at this point the h/w is OK and the issue is with the s/w.

    I am not a s/w expert so I am in need of some help tracking down why the Ethernet is not working.

    I have uploaded the sketch I am using as well as the IDE compiler log.

    My IDE is version 1.8.2.

    0_1497553226117_sketch_jun05a_SenseBender_Gateway_Ethernet.ino

    0_1497553530246_Sketch_jun05a_SB_GW_Ethernet_Compile_Log.txt

    Here is the serial log from the GW.0_1497554846818_GW Ethernet Serial Log.txt



  • I did some further troubleshooting and I believe I figured out why the Ethernet is failing. I was using the following in the sketch and I think I misunderstood what it was used for:
    "// Controller ip address. Enables client mode (default is "server" mode).
    // Also enable this if MY_USE_UDP is used and you want sensor data sent somewhere.
    #define MY_CONTROLLER_IP_ADDRESS 192,168,1,68"
    I thought this was used to tell the GW where the Controller was located. However, with this enabled, the Controller cannot talk to the GW. I also see a minor error pop up when this feature is enabled.
    "C:\Users\JB's_Quad_PC\AppData\Local\Arduino15\packages\MySensors\hardware\samd\1.0.5\libraries\Ethernet\src\utility\socket.cpp:365:6: warning: unused parameter 's' [-Wunused-parameter]

    void flush(SOCKET s)
    " .
    I really don't know what this error is or if it is an indication of some other compiler error that is not clearly shown.
    After disabling "MY_CONTROLLER_IP_ADDRESS" I was able to finally make an Ethernet connection between Homeassistant and the GW. YES!
    I used nmap and it also showed port 5003 was open now. YES!
    Time to move on....


  • Admin

    @JWB

    That setting is turning the gateway into a "client" which needs to connect to a server (which is your controller). Without this set it is running as a "server" which accepts incoming connections from other devices on the network (like your controller)


Log in to reply
 

Suggested Topics

  • 3
  • 10
  • 2
  • 1
  • 3
  • 2

0
Online

11.2k
Users

11.1k
Topics

112.5k
Posts