Ethernet Gateway - 0;0;3;0;9;check wires
-
I dont think it supports DHCP - so assign a static IP in the sketch.
-
I assigned the static IP in the sketch. But in my router I need to set up a DHCP reservation to always provide that specific IP to my gateway right?
-
This is what my uipethernet-conf.h looks like. I commented the UDP section out. Is that correct?
#ifndef UIPETHERNET_CONF_H
#define UIPETHERNET_CONF_H/* for TCP */
#define UIP_SOCKET_NUMPACKETS 5
#define UIP_CONF_MAX_CONNECTIONS 4/* for UDP */
//#define UIP_CONF_UDP 1
//#define UIP_CONF_BROADCAST 1
//#define UIP_CONF_UDP_CONNS 4/* number of attempts on write before returning number of bytes sent so far
- set to -1 to block until connection is closed by timeout */
#define UIP_ATTEMPTS_ON_WRITE -1
/* timeout after which UIPClient::connect gives up. The timeout is specified in seconds.
- if set to a number <= 0 connect will timeout when uIP does (which might be longer than you expect...) */
#define UIP_CONNECT_TIMEOUT -1
#endif
- set to -1 to block until connection is closed by timeout */
-
Shouldn't need to do any reserving in your DHCP server if it's hardcoded into your sketch.
Leave the UDP defines in, just change the value, the 3 line section should look like:
#define UIP_CONF_UDP 0
#define UIP_CONF_BROADCAST 1
#define UIP_CONF_UDP_CONNS 4Note that UIP_CONF_UDP is now 0 not one.
-
Shouldn't need to do any reserving in your DHCP server if it's hardcoded into your sketch.
Leave the UDP defines in, just change the value, the 3 line section should look like:
#define UIP_CONF_UDP 0
#define UIP_CONF_BROADCAST 1
#define UIP_CONF_UDP_CONNS 4Note that UIP_CONF_UDP is now 0 not one.
So I changed my code as you recommended, and re-uploaded the sketch. Everything looks fine, I can even see my gateway communicating with one of my sensors in the debugger, but my gateway wont communicate with my Vera.
I set the IP Address in the settings for my device in Vera to be the same as in the sketch (192.168.178.66:5003), but when i hit Start it says:
"Cannot Send Command. Communication Error."
When I connect my gateway to my router nothing happens. No lights blinking or anything.
Anything else Im missing?Thanks!
-
If it doesn't get a link light on the device and on the switch/router you plug it into -- something must be wired wrong. Double check all the wires going to the ENC board, starting with the power and ground. If you get a link light, you can try to 'telnet 192.168.178.66 5003' from a Terminal/Shell/Command prompt (dunno if you are on Linux/MacOS/WinXX). If it's working, that should get you connected and you should see commands going to/from the gateway.
IIRC there is a power LED on the ENC board as well that should be on.
-
If it doesn't get a link light on the device and on the switch/router you plug it into -- something must be wired wrong. Double check all the wires going to the ENC board, starting with the power and ground. If you get a link light, you can try to 'telnet 192.168.178.66 5003' from a Terminal/Shell/Command prompt (dunno if you are on Linux/MacOS/WinXX). If it's working, that should get you connected and you should see commands going to/from the gateway.
IIRC there is a power LED on the ENC board as well that should be on.
@soward
I doubled checked all the wires and they look good. If I move them and connect in any other way I get a "Check Wires" error in the debugger when trying to initialize the Gateway.The way I have it wired right now It initializes fine and I can see the gateway talking with my sensors.
The only thing is, if I connect both the Radio and the Ethernet card to the 3.3V pin in the Arduino directly, I get the "Check Wires" error. It seems like the Arduino doesnt have enough power for both cards, so I have the VCC and Ground pins on my Ethernet card connected to a different 3.3V power source and I was wondering if that maybe could be the problem.
How is your Gateway wired? Do you have both the Radio and the Ethernet cards connected directly?
Thanks for the Help!
-
I have ENC28J60-I/SO connected by ethernetcable to my Asus RT-n66u in LAN 4. But It will not show up in my router... On my ENC28J60 there is a red light on D1 and the ethernet port has a green light and a yellow flashing light.
Serial monitor says 0;0;3;0;14;Gateway startup complete. But nothing more. I have followed the ethernet gateway guide and set an static ip in the sketch.. DHCP is on in my router.
The only thing I see in my router is : That the cable is connected to something and that its 10 Half duplex.
I have also tried to connect it to other LAN ports but no difference
What could be wrong?
-
@soward
I doubled checked all the wires and they look good. If I move them and connect in any other way I get a "Check Wires" error in the debugger when trying to initialize the Gateway.The way I have it wired right now It initializes fine and I can see the gateway talking with my sensors.
The only thing is, if I connect both the Radio and the Ethernet card to the 3.3V pin in the Arduino directly, I get the "Check Wires" error. It seems like the Arduino doesnt have enough power for both cards, so I have the VCC and Ground pins on my Ethernet card connected to a different 3.3V power source and I was wondering if that maybe could be the problem.
How is your Gateway wired? Do you have both the Radio and the Ethernet cards connected directly?
Thanks for the Help!
@rafael.brasilia Did you ever get this sorted? as i am having the same issue
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login