We have moved at community.getvera.com

Author Topic: EthernetGateway  (Read 28872 times)

Offline MDoc

  • Jr. Member
  • **
  • Posts: 76
  • Karma: +3/-3
Re: EthernetGateway
« Reply #15 on: February 11, 2014, 04:52:47 pm »
Yeah... I'm having problems with my cable modem and loosing the internet several time a day.  Since I've switched over to Ethernet, I've not gotten though a  day without loosing contact with the Gateway.  As @a-lurker said,  I just need to cycle power to the Gateway (because it's in an enclosed box) or hit the reset button to re-sync with the Vera.


Offline hek

  • Moderator
  • Hero Member
  • *****
  • Posts: 714
  • Karma: +60/-1
Re: EthernetGateway
« Reply #16 on: February 11, 2014, 05:17:18 pm »
Yeah... I'm having problems with my cable modem and loosing the internet several time a day.  Since I've switched over to Ethernet, I've not gotten though a  day without loosing contact with the Gateway.  As @a-lurker said,  I just need to cycle power to the Gateway (because it's in an enclosed box) or hit the reset button to re-sync with the Vera.

Weird that your local network is affected by fluctuating internet access.

Is it possible to detect loss of connectivity from the gateway itself somehow?

In that case we could probably just update booloader to one that support WDT (Watch Dog Timer).
I.e. http://code.google.com/p/optiboot/
With WDT we could to make the arduino automatically reset when it loses contact.

Offline a-lurker

  • Hero Member
  • *****
  • Posts: 872
  • Karma: +66/-8
Re: EthernetGateway
« Reply #17 on: February 11, 2014, 05:29:39 pm »
@MDoc  After restarting the gateway, do you also have to do a Luup restart or is the the gateway restart alone sufficient to get the comms going again?

Offline MDoc

  • Jr. Member
  • **
  • Posts: 76
  • Karma: +3/-3
Re: EthernetGateway
« Reply #18 on: February 11, 2014, 08:27:02 pm »
Nope... If I ping the gateway there's no response (obviously, also if I scan the network there the gateway IP is not present). Once I reset the Gateway (without restarting Luup) I'm reconnected and start getting sensor updates. 

@hek, I agree about the cable modem... Don't see why the modem should affect network devices.... But at this point it's the only thing I can hang my hat on. I replaced my modem tonight so I should know by tomorrow if it makes a difference.  I'll let you know. 

Offline MDoc

  • Jr. Member
  • **
  • Posts: 76
  • Karma: +3/-3
Re: EthernetGateway
« Reply #19 on: February 12, 2014, 10:25:47 am »
I lost connection with the gateway today.  When I pinged the Gateway there was no response until I cycled the power.

I believe the problem is that I'm using a 3.3V 328P Nano as my Gateway.  I've got the ENC28J60 connected to the 3.3V output.  The FDTI output (FT233RL) can only supply 50ma while the ENC28J60 pulls 160ma when transmitting and 125ma at idle.  I'll switch over to a separate 3.3V source and re-post. 

Hey... at least the new cable model fixed my resetting problems   ;)

Offline Salmoides

  • Newbie
  • *
  • Posts: 19
  • Karma: +2/-0
Re: EthernetGateway
« Reply #20 on: February 13, 2014, 11:33:15 pm »
I'm feeling stupid. I know it's probably right in front of my face, but I can't see it. The current Arduino-dev1.4 gives me this:

In file included from /Users/salmoides/Documents/Arduino/libraries/MySensors/Sensor.cpp:12:
/Users/salmoides/Documents/Arduino/libraries/MySensors/Sensor.h:22:25: warning: avr/progmem.h: No such file or directory
/Users/salmoides/Documents/Arduino/libraries/MySensors/Sensor.cpp: In member function 'boolean Sensor::sendData(uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, const char*, uint8_t, boolean)':
/Users/salmoides/Documents/Arduino/libraries/MySensors/Sensor.cpp:180: warning: unused variable 'ok'
/Users/salmoides/Documents/Arduino/libraries/MySensors/Sensor.cpp: In member function 'boolean Sensor::sendWrite(uint8_t, message_s, int)':
/Users/salmoides/Documents/Arduino/libraries/MySensors/Sensor.cpp:248: warning: statement has no effect
/Users/salmoides/Documents/Arduino/libraries/MySensors/Sensor.cpp:226: warning: unused variable 'retry'
/Users/salmoides/Documents/Arduino/libraries/MySensors/Sensor.cpp: In member function 'char* Sensor::get(uint8_t, uint8_t, uint8_t, uint8_t, uint8_t)':
/Users/salmoides/Documents/Arduino/libraries/MySensors/Sensor.cpp:365: error: expected `while' before '*' token
/Users/salmoides/Documents/Arduino/libraries/MySensors/Sensor.cpp:365: error: expected `(' before '*' token
/Users/salmoides/Documents/Arduino/libraries/MySensors/Sensor.cpp:365: error: expected primary-expression before 'childId'
/Users/salmoides/Documents/Arduino/libraries/MySensors/Sensor.cpp:365: error: expected primary-expression before 'variableType'
/Users/salmoides/Documents/Arduino/libraries/MySensors/Sensor.cpp:365: error: expected `)' before '{' token
/Users/salmoides/Documents/Arduino/libraries/MySensors/Sensor.cpp:365: error: expected `;' before '{' token
/Users/salmoides/Documents/Arduino/libraries/MySensors/Sensor.cpp:369: error: a function-definition is not allowed here before '{' token
/Users/salmoides/Documents/Arduino/libraries/MySensors/Sensor.cpp:375: error: a function-definition is not allowed here before '{' token
/Users/salmoides/Documents/Arduino/libraries/MySensors/Sensor.cpp:379: error: a function-definition is not allowed here before '{' token
/Users/salmoides/Documents/Arduino/libraries/MySensors/Sensor.cpp:383: error: a function-definition is not allowed here before '{' token
/Users/salmoides/Documents/Arduino/libraries/MySensors/Sensor.cpp:388: error: a function-definition is not allowed here before '{' token
/Users/salmoides/Documents/Arduino/libraries/MySensors/Sensor.cpp:392: error: a function-definition is not allowed here before '{' token
/Users/salmoides/Documents/Arduino/libraries/MySensors/Sensor.cpp:397: error: a function-definition is not allowed here before '{' token
/Users/salmoides/Documents/Arduino/libraries/MySensors/Sensor.cpp:514: error: expected `}' at end of input

Offline hek

  • Moderator
  • Hero Member
  • *****
  • Posts: 714
  • Karma: +60/-1
Re: EthernetGateway
« Reply #21 on: February 14, 2014, 02:18:03 am »
I'm feeling stupid. I know it's probably right in front of my face, but I can't see it. The current Arduino-dev1.4 gives me this:


I guess you mean that you've checked out 1.3dev (or master). 1.4dev is not in a working state right now.

A few people have reported problems on linux with progmem.h. After some googling I've found that I should include pgmspace.h instead. This has been updated and check in now.  Please try again and report back.

What compiler are you using? I see some warnings I'd  like to have a closer look on.

Offline Salmoides

  • Newbie
  • *
  • Posts: 19
  • Karma: +2/-0
Re: EthernetGateway
« Reply #22 on: February 14, 2014, 08:00:09 am »

What compiler are you using? I see some warnings I'd  like to have a closer look on.


I'm using the standard Arduino IDE on Mac OS X. I turned on verbose logging during compilation to get those results.

I'll recheck what I've downloaded. Thanks, Hek.

Offline MDoc

  • Jr. Member
  • **
  • Posts: 76
  • Karma: +3/-3
Re: EthernetGateway
« Reply #23 on: February 22, 2014, 03:03:51 pm »
I lost connection with the gateway today.  When I pinged the Gateway there was no response until I cycled the power.

I believe the problem is that I'm using a 3.3V 328P Nano as my Gateway.  I've got the ENC28J60 connected to the 3.3V output.  The FDTI output (FT233RL) can only supply 50ma while the ENC28J60 pulls 160ma when transmitting and 125ma at idle.  I'll switch over to a separate 3.3V source and re-post. 

Sorry for the delay in posting... In re-wiring I shorted my Uno and fried it and had to order another:(

Since supplying its own 3.3V, it has been two days without problems.  It appears the FTDI ship will supply 160ma for some period but will eventually go into thermal shutdown.  This will probably vary from chip to chip.
Make sure if you use a discrete 3.3V Regulator, you add a pretty large cap (100uf) to filter the spikes created by the  ENC28J60.

Hek... in your picture, it looks like you were powering the ENC28J60 off the FTDI 3.3V .  Did you see any problems in your testing?

Offline hek

  • Moderator
  • Hero Member
  • *****
  • Posts: 714
  • Karma: +60/-1
Re: EthernetGateway
« Reply #24 on: February 22, 2014, 03:23:37 pm »
Hopefully you'll learn something new every time you feel the smell of fried Arduino. :)
(two of them have left for aruduino-heaven over here)

On the picture you can see a Pro Mini with the microscopic SOT23 regulator soldered to the 3 wires sticking out. I have not made any long time testing but I saw no problems with my setup.
   

Offline MDoc

  • Jr. Member
  • **
  • Posts: 76
  • Karma: +3/-3
Re: EthernetGateway
« Reply #25 on: February 22, 2014, 04:42:22 pm »
(two of them have left for aruduino-heaven over here)

Yeah.. I'm sure it would be the last.
OK... Glad to hear you're not having problems with an External Reg, Thanks!

Mike


Offline veravance

  • Sr. Newbie
  • *
  • Posts: 26
  • Karma: +0/-0
Re: EthernetGateway
« Reply #26 on: February 23, 2014, 11:29:24 am »
Hi,
very good job :-)
Does the gateway could work with a wifi shield ?

Offline hek

  • Moderator
  • Hero Member
  • *****
  • Posts: 714
  • Karma: +60/-1
Re: EthernetGateway
« Reply #27 on: February 23, 2014, 04:01:56 pm »
Sorry, I don't own any wifi shield to test on.


Offline p3tter

  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-0
Re: EthernetGateway
« Reply #28 on: February 26, 2014, 01:28:16 pm »
compiler error

windows8/mac os x  arduino 1.3Beta 2

I have a problem when trying to compile the ethernet gateway.
it gives me this error:

no matching function for call to 'Gateway::begin(uint8_t, void (&)(char*))'

Code: [Select]
EthernetGateway.ino: In function 'void setup()':
EthernetGateway:96: error: no matching function for call to 'Gateway::begin(uint8_t, void (&)(char*))'
C:\Users\user\Documents\Arduino\libraries\Vera/Gateway.h:44: note: candidates are: void Gateway::begin(uint8_t)

could someone help me?
thanks

Offline hek

  • Moderator
  • Hero Member
  • *****
  • Posts: 714
  • Karma: +60/-1
Re: EthernetGateway
« Reply #29 on: February 26, 2014, 01:48:06 pm »
compiler error

windows8/mac os x  arduino 1.3Beta 2

I have a problem when trying to compile the ethernet gateway.
it gives me this error:

no matching function for call to 'Gateway::begin(uint8_t, void (&)(char*))'

Code: [Select]
EthernetGateway.ino: In function 'void setup()':
EthernetGateway:96: error: no matching function for call to 'Gateway::begin(uint8_t, void (&)(char*))'
C:\Users\user\Documents\Arduino\libraries\Vera/Gateway.h:44: note: candidates are: void Gateway::begin(uint8_t)

could someone help me?
thanks

I don't think you have installed the latest MySensors library in your Arduino IDE.