[SOLVED] Problems with Ethernet Gateway (Arduino Ethernet Shield)
-
Is it possible to use soft SPI for ethernet module and keep the original wiring for radio module?
-
@korttoma Good overview. Actually, it is also possible to skip the IP address and use DHCP. Works just fine (though obviously you need a router that assignes a known IP to your chosen MAC, since the controller needs to know the IP of the GW.
@Anticimex said:
it is also possible to skip the IP address and use DHCP
So what do I need to change in the sketch to use DHCP?
-
@Anticimex said:
it is also possible to skip the IP address and use DHCP
So what do I need to change in the sketch to use DHCP?
-
@Anticimex Is there any advantage to using DHCP?
-
Wether you use DHCP reservation on your router, or set the IP in the sketch, you need a static IP. You are configuring that static IP in the MySensors configuration on your Vera (assuming you are using Vera).
-
There is an advantage in using DHCP.
- You do not have to recompile and reflash your GW if you for some reason need to change it.
- If you have an environment using DHCP, introducing a device that enforces a certain IP is very bad practice, and you should then make sure your DHCP server make sure to not assign any device the same IP. Consequently, since the controller needs to know the IP of the GW, when DHCP is used, the DHCP server needs to statically tie the IP in question to the MAC the GW uses. But I think that is a much more sane solution in a network.
-
OK. So if I use DHCP and tell my router to reserve a particular address for my Gateway, operationally I won't notice any difference from directly assigning it as it is currently set up. But if I use DHCP I will be able to see it listed under "attached devices" on my router which is an advantage. With the current assignment, the router doesn't "see" my gateway. So I think I will try the DHCP route as an experiment because I like the idea of the router centrally managing and recognizing all of the network clients.
-
Converted my Ethernet gateway to a DHCP connection. Went without a hitch and is now listed in my Netgear's list of attached devices and operating normally. So far, so good.
-
I have now updated the ethernet sketch and instructions on www.mysensors.org to give a bit clearer instructions on how to use W5100 module and SoftSPI.
@hek said:
I have now updated the ethernet sketch and instructions on www.mysensors.org to give a bit clearer instructions on how to use W5100 module and SoftSPI.
greate! But you forgot one thing ;)
RF24_config.h
const uint8_t SOFT_SPI_MISO_PIN = 15; const uint8_t SOFT_SPI_MOSI_PIN = 14; const uint8_t SOFT_SPI_SCK_PIN = 16; -
@hek said:
Not sure why you had to change
I changed because @niccodemi instructed us to. Maybe this only needs to be done with some other hardware then the one I'm using. Maybe he can explain. (I hope I will remeber that my setup differs from the official instructions when the time comes to update to the next version down the road.)
@hek said:
look at my table
I checked it again and your right it seems to be correct according to the config file, my bad.
-
Ahh.. then we should be fine with the defaults. @Anticimex did his own modification in config to fit his gateway.
@hek Yes, basically, when using SOFT_SPI, you need to decide what pins to use and set the config accordingly. I believe things has been standardized a bit since I meddled with that, because I abandoned the SOFT_SPI approach as soon as I managed to manipulate SPI_EN. Saves me both wires, program space and energy :)
-
I have problems with this setup. No matter what I try i get this printout from the Humidity sensor node:
req node id
send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,st=ok:
sensor started, id 255
req node id
send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,st=ok:
T: 20.70
req node id
send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,st=ok:
H: 31.70Appreciate any tips and help!
-
I just switched to the ethernet gateway to try out native Domoticz support and quickly experienced the SPI issue that everyone has been talking about. Can someone explain how the MQTT gateway was able to run for several months with no issues, but the moment I flash the ETHERNET gateway on the same hardware everything goes belly up after a few hours?
-
@hek said:
I have now updated the ethernet sketch and instructions on www.mysensors.org to give a bit clearer instructions on how to use W5100 module and SoftSPI.
greate! But you forgot one thing ;)
RF24_config.h
const uint8_t SOFT_SPI_MISO_PIN = 15; const uint8_t SOFT_SPI_MOSI_PIN = 14; const uint8_t SOFT_SPI_SCK_PIN = 16; -
@korttoma Can you post the link to the updated code and the instruction of using NRF with ethernet module.
@mainali said:
Can you post the link to the updated code and the instruction of using NRF with ethernet module.
I think everything you need to know is described here -> http://www.mysensors.org/build/ethernet_gateway