EthernetGateway

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

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.

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.

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. [/quote]

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?

Hopefully you’ll learn something new every time you feel the smell of fried Arduino. :slight_smile:
(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.

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

Mike

Hi,
very good job :slight_smile:
Does the gateway could work with a wifi shield ?

Sorry, I don’t own any wifi shield to test on.

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*))’

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

[quote=“p3tter, post:29, topic:179374”]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*))’

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[/quote]

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

I know I’m way late on this thread. Since you don’t need to use the Nano anymore, has anyone tried using one of the Arduino Uno variants that can supply higher currents on the 3.3 and 5V lines? Like the Arduino Buono?

[quote=“MDoc, post:24, topic:179374”]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?[/quote]

Most Arduino boards should work fine if they have the same amount of memory as atmega328 .

I don’t know about the Wiznet… But the ENC28J60 pulls 160ma when transmitting and 125ma at idle so any board you use would need to supply at least that…otherwise… You’d need an external regulator.

I recently built a serial gateway but didn’t have any luck getting it to recognize any of my sensors so I built an ethernet gateway to see if I would have any better luck. I was able to add the gateway to Vera and set the IP address, but when I press the start button to put it in inclusion mode nothing happens. At least before when I was using the serial gateway and started the inclusion mode it would say something like “0 devices added” while it was waiting for communication from the sensors. The ethernet gateway doesn’t give any indication it is actually waiting for sensors. Is this normal behavior or is there something that I might have not set up correctly?

I’ve build the ethernetgateway and it works fine for about a day(or 2?) and then stops responding and IP is gone.
I’ve used the ENC-module and used the sketch from mysensors uploaded it with Arduino-IDE 1.05-r2.
Version of library according to Vera: 1.3b3 (67f4ca1) and I was able to add 2 nodes.
Powersupply of the nano is a 5V/2A tablet-charger.
So besides stability, it seems to work.

Since it takes a while to happen troubleshooting is not easy and my guess is that some timer gets over run or something. However I don’t see a timer in the sketch itself, anyone have a clue where the error might be?

I've build the ethernetgateway and it works fine for about a day(or 2?) and then stops responding and IP is gone.

Has it gone or has your router issued it a different IP address? You can configure most routers to always issue the same IP address to a given MAC.

[quote=“RexBeckett, post:36, topic:179374”]

I’ve build the ethernetgateway and it works fine for about a day(or 2?) and then stops responding and IP is gone.

Has it gone or has your router issued it a different IP address? You can configure most routers to always issue the same IP address to a given MAC.[/quote]
It doesn’t respond to pings after that. I got the IP reserved for this device in my router and it’s ‘hardcoded’ in the sketch. Other devices setup same way don’t ‘loose’ IP.

Try switching power supply. Did you mount capacitor on radio?

Tried several: 850mA, 1.2A and 2A.
Capacitor I didn’t try just yet, will give that one a go :slight_smile:

This is my first foray into trying to work with arduino uno v3. I picked up the modules noted here: http://mysensors.org/build/ethernet_gateway

I hooked the radio up according to the pins shown and then moved onto the ethernet shield w5100 and here is where I become confused: the 3.3v and 10, 11, 12 and 13 pins already have been used by the radio.

I’m missing something very basic… :frowning:

Best Home Automation shopping experience. Shop at getvera!

© 2021 Ezlo Innovation, All Rights Reserved. Terms of Use | Privacy Policy | Forum Rules