Ethernet gateway troubleshooting advice
-
Just a quick update, I disconnected the NRF24L01 from the Nano so I only have the W5100 ethernet module connected. I downloaded a sample HTTP client sketch and uploaded it to the Nano. This works perfectly, I can ping the Nano and hit the HTTP server so this at least proves my W5100 module works fine and I have it connected correctly.
Also...
I disconnected the W5100 module, re-connected the NRF24L01, and re-uploaded the gateway sketch. I then started getting a "0;0;3;0;14;Gateway startup complete" message in the console. So it appears having the W5100 ethernet module connected is not allowing enough power to initialize the NRF24L01, at least on my particular Nano. Supposedly this combination works for others, even without the capacitor. Anyway, I've read that using a larger capacitor (47uf - 100uf) can help so that's my next step...
-
Yes that works for me as well. But it is not a power issue. I have wired independent power supplies for both RF and W5100 and I still cannot get them to coexist on the same SPI bus.
Others on the web have also confirmed that W5100 is a SPI bus hog, so if you use it, it has to be the sole SPI user on that particular SPI bus (the HW SPI bus if using the ethernet library from the Arduino IDE).
This is due to the fact that the W5100 always drivers MISO as described in this document under "Multiple SPI Slave Usage".
Unfortunately, I have not been able to solve this using the recommendation (de-asserting/asserting SCS). I am not sure if it is due to how the W5100 module is wired (I have not found a schematic to confirm the SPI_EN signal actually goes to SCS and I do not fully trust my eyesight). Or if it is I who made a mistake in my SW patch, but even if I just use the serial GW sketch and drive SPI_EN low, the W5100 kills the RF module by just being on the bus and powered. I confirmed the state of SPI_EN with a logic analyzer as well. But perhaps you could give that a shot as well just so that we can rule out that option as a SW workaround to the problem.
-
Hmm, well that's somewhat discouraging. Surely someone has a combination of the two that work together or there wouldn't be instructions on building an Ethernet Gateway using a W5100 on the MySensors site right? Or I would hope not anyway.
Are you using a genuine Arduino board or a clone? Maybe we should take a poll to see who has working configurations and exactly what they're using and where they got their components from. Just a thought...
-
I'm on a clone. I have not heard of anybody that have managed to run the W5100 module with RF reliably actually. And googling W5100 and SPI is...discouraging as well...there are all sorts of HW patches and workarounds circling. But I agree, we should try to boil down to the gritty details on this matter. My current status is that I can get the "Gateway startup complete." message with my W5100 and RF module connected (using soft SPI) but then the W5100 does not respond to ping. But running a webserver sketch on the same HW wireing works just fine, so is is a MySensor/Sketch issue, possibly relating to W5100 lib vs RF lib.
Also, running a serial gateway sketch on the same HW works (with issues on ACKs but that is believed to be caused by yet-to-be-identified changes in the RF lib).
I need to stabilize my hw a bit more, and then I will try to use my logic analyzer and try to get a grip on this.
-
Gotcha.. Thanks Anticimex, keep us posted on what you find out with the logic analyzer, that will be very interesting for sure.
-
Sure. I will try to get some time to look into it tomorrow evening. What I really would like though is a debugger. But I guess prints have to do.
-
@Anticimex said:
I'm on a clone. I have not heard of anybody that have managed to run the W5100 module with RF reliably actually.
Am using a Jaycar EtherTen (http://www.jaycar.com.au/productView.asp?ID=XC4216) with RF fine. Its based on the ATmega328P.
Couldnt get a mega working with the ethernet shield, couldnt get the mega working with ethernet module, nor a mini or micro clone.
Am wondering if there's more to it than the context of SPI hogger but will happily take any fix. I'd rather be using the mega as the extra memory will allow me to evolve my gateway somewhat.
-
Alright, my findings so far:
I have had some success in getting my ethernet GW to work. I had to make some minor changes to the sketch.
Most importantly, I had to bring in the SOFTSPI support in the RF24 lib (how to do this is described here.
I also had to disable the debug feature (in MyConfig.h).
And I had to move gw.begin in setup() to be done after the delay(1000).
Now I have a ethernet GW executing which is self-powered from my Vera (using USB) and running with a PA enhanced RF module on maximum PA level.I will now move on to picking up where I originally left off; checking if it is possible to manipulate SPI_EN signal in the sketch to allow RF module to share bus with W5100 which would be ideal. It should be easier to confirm this now, when I have a known good setup.
-
Brainstorming.
There would seem to be a number of solutions to the issue of the W5100 not releasing the MISO line when the slave is deselected and thus being incompatible with other SPI devices.
- Use SoftSPI for one (or more) of the devices
- Use the USART SPI master mode for one device
- Use a host with more than 1 SPI interface
- Modify a shield or module to allow SPI_EN to be controlled by another uC pin & change libs to use it
- Use a shield or module designed to drive SPI_EN as the inverse of NSS (slave select)
- Modify a shield or module to do so
The SoftSPI (for nRF) seems to work for some people. For the low-bandwidth usage of MySensors that may be adequate.
The Wiz811 and Wiz812 modules appear to be in category 5, as are a few shields. The Wiz810 breaks out SPI_EN so it could be controlled by another uC pin.
I haven't seen nRF or W5100 libs modified to use the USART in SPI mode but it should be possible (one would need to NOT use the hardware serial port for debugging or program loading while using it for SPI of course).
I do not know if the W5200 or W5500 chips have the same problem.
Note: since the W5100 does not tristate the MISO line when deselected but SPI_EN is still high, that means it's output will be fighting with whatever other slave is trying to drive MISO. Sometimes the other device may win, sufficiently. Thus the possibility of using both W5100 and nRF without any of the compensations -sometimes working for some people. Not good practice and not reliable!
-
I am going for option 4. I tried it once and failed, but I have since made a small change to the sketch which allowed me to use the W5100 using softSPI (changing order of some calls during setup()).
Once I have confirmed if this will be possible without totally tearing up the libs I'll post it here.
Someone else is of course welcome to investigate alternative options but my options are limited. I really would like to make it work with what I have, which rules out option 3 and 5-6. I prefer option 1 before option 2 as 1 is more flexible.Option 4 actually needs little to no hw modification. The MySensors building description does not mention it but W5100 does have SPI_EN on a pin, and this pin should also be connected to the host (I have connected it to D4).
So with that small adjustment to the build instructions, and some appropriate changes to the sketch and possible the libraries, <should> get the ethernet GW back on track.
-
@Zeph said:
I haven't seen nRF or W5100 libs modified to use the USART in SPI mode
@TMRh20Projects actually also incorporated the option to use USART as SPI in the latest commit (see defines in RF24_config). But you'll lose the debug-print possibility when using this option.
-
My "option 4" attempt is progressing well.
True-to-the-topic a good troubleshooting advice is to lower the speed of the SPI bus. When working on a breadboard, and having multiple devices on the SPI bus, the capacitive load starts to affect the clock and data lines.
PatchingSPI.setClockDivider(SPI_CLOCK_DIV2);
to
SPI.setClockDivider(SPI_CLOCK_DIV4);
lowers the clock speed and provides a more reliable signalling (confirmed with logic analyzer).
I do not think the change is needed on "sharp" boards, but it seem indeed to help when having a bread-board that resembles something from greek mythology
-
My fix for W5100 is now available on the development branch.
-
I do not know if the W5200 or W5500 chips have the same problem.
Checked the W5500 datasheet and read:
TCHZ - SCSn High to Output Hi-Z - 2.1 ns
So it looks like the W5500 does not have this problem.
since the W5100 does not tristate the MISO line when deselected but SPI_EN is still high
If this is true then even using SPI_EN instead or in combination with /SCS does not really enable using another SPI slave in combination with the W5100 ...
-
@daulagari said:
So it looks like the W5500 does not have this problem.
since the W5100 does not tristate the MISO line when deselected but SPI_EN is still high
If this is true then even using SPI_EN instead or in combination with /SCS does not really enable using another SPI slave in combination with the W5100 ...
Yes it does, since driving SPI_EN low makes W5100 release MISO.
SPI_EN is not a signal to be used "instead of" SCS. It is a completly independent signal that enables or disables the use of the SPI bus on the W5100. SCS is used "in" the SPI bus for selecting W5100 as sender/receiver.So a solution to the problem is to make sure SPI_EN is driven low, every time another SPI slave is being used.
-
Some designs fix this issue for the W5100 by driving SPI_EN from SCS via an inverter - I've seen circuits with a nand gate and with a FET and resistor. I believe the WizNet folks suggested that option. It could also be handled with a modified library by driving SPI_EN from another uC pin and disabling SPI_EN (low) whenever driving SCS high.(say if you were using a WIZ810 which has both W5100 pins exposed). Most shield tie SPI_EN to Vcc tho, so you'd have to cut a trace to fix them.
-
Anticimex, thanks, your fix works. I am using uno R3 with Wiznet5100 shield. I am able to control relays and receive sensors data. I can also ping ethernet gateway.
There seems to be just a minor glitch. though. When I connect uno via usb cable to computer to monitor serial messages I never get "0;0;4;11;Arduino startup complete" message.Has this been removed? It doesn't seem to affect functionality anyway.
-
@niccodemi nice to hear. DEBUG might be switched of in MyConfig.h
-
This post is deleted!
-
Howdy. Been trying to follow/implement the Soft SPI fix for this. I appreciate everything so far. I'm not a coder, so try to follow instructions closely, but seem to have messed this up. I'm using a R3 Uno with Ethernet Shield. There seems to be several parts to this fix, but I'm getting error messages now. Did get the original to work, but it would freeze up as described.
First what I did to fix, perhaps I missed something. This is all I did, so please don't assume I would know to do something:
- Installed Arduino 1.5.8 IDE
- Installed Anticimex's "fix for W5100" from the "development branch" into my Arduino folder on computer
- Opened RF24_config.h in a text editor. Uncommented the line #define SOFTSPI
- In Gateway sketch, added #include <DigitalIO.h>
- Disabled the debug feature in MyConfig.h
- Moved the gw.begin after the delay(1000) (not sure if I got this right since I don't code. Here is snippet of what I have now in sketch:
// give the Ethernet interface a second to initialize
delay(1000);// Initialize gateway at maximum PA level, channel 70 and callback for write operations
gw.begin(incomingMessage, 0, true, 0);
w5100_spi_en(true);However, I now get the following errors:
Arduino: 1.5.8 (Windows 7), Board: "Arduino Uno"
In file included from C:\Users\Robert\Documents\Arduino\libraries\MySensors\MyGateway.cpp:12:0:
C:\Users\Robert\Documents\Arduino\libraries\MySensors\MyGateway.h:39:28: error: 'DEFAULT_CE_PIN' was not declared in this scope
MyGateway(uint8_t _cepin=DEFAULT_CE_PIN, uint8_t _cspin=DEFAULT_CS_PIN, uint8_t _inclusion_time = 1, uint8_t _inclusion_pin = 3, uint8_t _rx=6, uint8_t _tx=5, uint8_t _er=4);
^
C:\Users\Robert\Documents\Arduino\libraries\MySensors\MyGateway.h:39:59: error: 'DEFAULT_CS_PIN' was not declared in this scope
MyGateway(uint8_t _cepin=DEFAULT_CE_PIN, uint8_t _cspin=DEFAULT_CS_PIN, uint8_t _inclusion_time = 1, uint8_t _inclusion_pin = 3, uint8_t _rx=6, uint8_t _tx=5, uint8_t _er=4);
^
In file included from C:\Users\Robert\Documents\Arduino\libraries\MySensors\MyGateway.cpp:12:0:
C:\Users\Robert\Documents\Arduino\libraries\MySensors\MyGateway.h:42:36: error: 'RF24_PA_LEVEL_GW' was not declared in this scope
void begin(rf24_pa_dbm_e paLevel=RF24_PA_LEVEL_GW, uint8_t channel=RF24_CHANNEL, rf24_datarate_e dataRate=RF24_DATARATE, void (dataCallback)(char )=NULL);
^
C:\Users\Robert\Documents\Arduino\libraries\MySensors\MyGateway.cpp: In constructor 'MyGateway::MyGateway(uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t)':
C:\Users\Robert\Documents\Arduino\libraries\MySensors\MyGateway.cpp:27:167: error: no matching function for call to 'MySensor::MySensor(uint8_t&, uint8_t&)'
MyGateway::MyGateway(uint8_t _cepin, uint8_t _cspin, uint8_t _inclusion_time, uint8_t _inclusion_pin, uint8_t _rx, uint8_t _tx, uint8_t _er) : MySensor(_cepin, _cspin) {
^
C:\Users\Robert\Documents\Arduino\libraries\MySensors\MyGateway.cpp:27:167: note: candidates are:
In file included from C:\Users\Robert\Documents\Arduino\libraries\MySensors\MyGateway.h:15:0,
from C:\Users\Robert\Documents\Arduino\libraries\MySensors\MyGateway.cpp:12:
C:\Users\Robert\Documents\Arduino\libraries\MySensors\MySensor.h:79:2: note: MySensor::MySensor()
MySensor();
^
C:\Users\Robert\Documents\Arduino\libraries\MySensors\MySensor.h:79:2: note: candidate expects 0 arguments, 2 provided
C:\Users\Robert\Documents\Arduino\libraries\MySensors\MySensor.h:70:7: note: MySensor::MySensor(const MySensor&)
class MySensor
^
C:\Users\Robert\Documents\Arduino\libraries\MySensors\MySensor.h:70:7: note: candidate expects 1 argument, 2 provided
C:\Users\Robert\Documents\Arduino\libraries\MySensors\MyGateway.cpp: In member function 'void MyGateway::begin(rf24_pa_dbm_e, uint8_t, rf24_datarate_e, void ()(char))':
C:\Users\Robert\Documents\Arduino\libraries\MySensors\MyGateway.cpp:76:39: error: no matching function for call to 'MyGateway::setupRadio(rf24_pa_dbm_e&, uint8_t&, rf24_datarate_e&)'
setupRadio(paLevel, channel, dataRate);
^
C:\Users\Robert\Documents\Arduino\libraries\MySensors\MyGateway.cpp:76:39: note: candidate is:
In file included from C:\Users\Robert\Documents\Arduino\libraries\MySensors\MyGateway.h:15:0,
from C:\Users\Robert\Documents\Arduino\libraries\MySensors\MyGateway.cpp:12:
C:\Users\Robert\Documents\Arduino\libraries\MySensors\MySensor.h:238:7: note: void MySensor::setupRadio()
void setupRadio();
^
C:\Users\Robert\Documents\Arduino\libraries\MySensors\MySensor.h:238:7: note: candidate expects 0 arguments, 3 provided
C:\Users\Robert\Documents\Arduino\libraries\MySensors\MyGateway.cpp:77:36: error: 'BASE_RADIO_ID' was not declared in this scope
RF24::openReadingPipe(WRITE_PIPE, BASE_RADIO_ID);
^
C:\Users\Robert\Documents\Arduino\libraries\MySensors\MyGateway.cpp:79:23: error: cannot call member function 'void RF24::startListening()' without object
RF24::startListening();
^
Error compiling.Welcome any help. Thanks much.
-
@karenbobiv When I redid my gateway, I just downloaded the latest version of the regular my sensors library which already includes all that is need for soft spi and used the ehternet gateway sketch from the library. Did not use the "fix for W5100." Did not move the gw.begin. Need to include Digital.IO in gateway sketch as you did. Also make sure you define the include statement for using the W5100 version of the ethernet (if I remember right the other one is the default). Also note that the some of the wiring of the radio to the UNO is different in soft spi--see anticmex's directions which include some numbers that need to be changed in the radio file plus defining soft spi as you did.
-
At any rate, those are library errors so that's why suggested you download and use the latest basic library.
-
Thanks for the help Dan. I've been at this for almost 12 solid hrs. I reloaded the IDE environment and the mysensors library, so all that is fresh. I've got the sketch loading without error, but don't think I'm getting the wiring of the radio and the radio file right at all. Can't get to ping either. I'm using the Uno R3 and the shield. Could you provide more detail please on how you did it? Thanks.
-
I used these instructions from anticimex:
Patch RF24_config.h to enable softspi, uncomment
//#define SOFTSPI
and select pins to use with
const uint8_t SOFT_SPI_MISO_PIN = 15;
const uint8_t SOFT_SPI_MOSI_PIN = 14;
const uint8_t SOFT_SPI_SCK_PIN = 16;
The setting above mean MOSI on A0, MISO on A1 and SCK on A2 on an Arduino Nano.So when you use soft spi and and change the statements in RF24_config.h as above, the wires for mosi, miso and sck as shown in the ethernet radio diagram are changed and go to A0, A1 and A2 respectively on the UNO (be careful not getting miso and mosi mixed). you need to get the gateway started message from the serial monitor rather than the check wires message to proceed. Recommend you take a break and hit it tomorrow--I know how I got when going though this. Mine is still working going on over 3 days now without a hitch. Also make sure you have the ip and port address entered in the advanced tab of the plugin on the vera when you are ready to finally hook it up, otherwise vera will give you a luup error.
-
Dan, which mysensors library did you use. Master or development?
-
The SOftSPI enable RF24 and DigitalIO library has been added to master a few days ago. You should probably not use "development" at the moment.
-
I noticed something was different. About 8 days ago I was able to get Uno r3 and w5100 shield work using development library, which has just been updated by anticimex. gateway ran for a week without issues except i was not able to control relay nodes. Yesterday I downloaded master and development libraries. With Master i can get gateway to communicate with vera but when I press include button radio comms stop. i also tried development library. modified as per dan and anticimex instructions and not modified. in both cases i can upload sketch but then i do not get any serial communication and also pinging gateway does not work.
-
@niccodemi I should mention that in the new master there is a comment in the gateway code that says:
"Remove UIPEthernet include below and include Ethernet.h." In other words the default is not Wiznet. If you don't change the default (which I didn't at first) then you will have a commo problem since it is for ENC28J60 shield.
-
@Dan-S. thanks but I have been aware of that. I will try to patch Master library as per your advice. Btw do you use any sensor node with your gateway? Do you use w5100 module or shield? Mine is same as
on this site
-
@niccodemi I am using a genuine arduino uno and arduino ethernet shield which is similar to the one you reference, but don't think that should make any difference if you are using soft spi. Currently I have a light sensor and a temp/humidity sensor reporting to the gateway and all are working fine. Plan to expand more now that it is working so dependably.
-
@Dan-S. Thanks much. After a good night sleep I gave it another try. Made changes, reloaded script, and got the Gateway started message in the serial monitor. I can also ping the GW. However, in the "nothing is ever easy" category, now it won't include my temperature sensors. I attached the temperature sensors to the serial monitor and get the following:
sensor started, id 1
send: 1-1-0-0 s=255,c=0,t=17,pt=0,l=3,st=fail:1.4
send: 1-1-0-0 s=255,c=3,t=6,pt=1,l=1,st=fail:0
send: 1-1-0-0 s=255,c=3,t=11,pt=0,l=18,st=fail:Temperature Sensor
send: 1-1-0-0 s=255,c=3,t=12,pt=0,l=3,st=fail:1.0
send: 1-1-0-0 s=0,c=0,t=6,pt=0,l=3,st=fail:1.4
send: 1-1-0-0 s=1,c=0,t=6,pt=0,l=3,st=fail:1.4
send: 1-1-0-0 s=2,c=0,t=6,pt=0,l=3,st=fail:1.4
send: 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,st=fail:
send: 1-1-0-0 s=0,c=1,t=0,pt=7,l=5,st=fail:74.3
send: 1-1-0-0 s=1,c=1,t=0,pt=7,l=5,st=fail:83.7
send: 1-1-0-0 s=2,c=1,t=0,pt=7,l=5,st=fail:73.0Tried inclusion lots of times. Unplugged and plugged in power for sensor network when I did that to try to get the "handshake." Likely a comedy of errors on my part, but I can't see what's wrong now. Thanks.
-
Unplugged the GW and plugged back in as part of effort to diagnose and now I can't ping it and it's not talking to plugin. I checked it with serial monitor and it still shows GW Startup. Not sure what to try now.
-
I always interpreted the GW startup message to mean that the radio part of the gateway is working. So you've made good progress. When you start it up and plug it into the network, what happens when you hit reload on Vera. If it reloads with no errors, I always took that to mean that the ethernet part is working and the gateway is talking to Vera. For push the include button on the vera plugin and for as long as the inclusion person lasts continue to start and restart the sensor until the plugin says it is detected. Sometimes takes a couple of tries. But your posting of the sensor messages says the gateway is not talking to the sensor. But first you need to get it included and it may take a few tries. Hope this helps.
-
@Dan-S. Not sure why, but can ping again and talking with plugin. Interesting development. I noted that the sensor appeared to talk to GW (st=ok?) and when I saw that I tried to include, but then it would switch back to st=fail and wouldn't include. Did this several times. Building another simple temp sensor to try that.
send: 1-1-0-0 s=2,c=1,t=0,pt=7,l=5,st=fail:73.6
send: 1-1-0-0 s=0,c=1,t=0,pt=7,l=5,st=ok:73.6
send: 1-1-0-0 s=1,c=1,t=0,pt=7,l=5,st=ok:73.9
send: 1-1-0-0 s=1,c=1,t=0,pt=7,l=5,st=ok:73.8
send: 1-1-0-0 s=2,c=1,t=0,pt=7,l=5,st=ok:73.5
send: 1-1-0-0 s=2,c=1,t=0,pt=7,l=5,st=ok:73.6
send: 1-1-0-0 s=2,c=1,t=0,pt=7,l=5,st=fail:73.5
send: 1-1-0-0 s=0,c=1,t=0,pt=7,l=5,st=ok:73.5
send: 1-1-0-0 s=1,c=1,t=0,pt=7,l=5,st=ok:73.7
send: 1-1-0-0 s=1,c=1,t=0,pt=7,l=5,st=fail:73.8
send: 1-1-0-0 s=2,c=1,t=0,pt=7,l=5,st=fail:73.3
send: 1-1-0-0 s=1,c=1,t=0,pt=7,l=5,st=ok:73.7
send: 1-1-0-0 s=1,c=1,t=0,pt=7,l=5,st=ok:73.8
send: 1-1-0-0 s=2,c=1,t=0,pt=7,l=5,st=ok:73.5
send: 1-1-0-0 s=1,c=1,t=0,pt=7,l=5,st=ok:73.7
-
I was able to add the Node, but no sensors show up. Do I need to reload the sketch for the temp sensor now that I switched to the soft SPI? Does that sketch change somehow? Tried to reload temp sketch on the node, but got this error. DigitalIO.h is in the library.
Arduino: 1.5.8 (Windows 7), Board: "Arduino Nano, ATmega328"
In file included from C:\Users\Robert\Documents\Arduino\libraries\MySensors/MySensor.h:28:0,
from DallasTemperatureSensor.ino:2:
C:\Users\Robert\Documents\Arduino\libraries\MySensors/utility/RF24.h:20:23: fatal error: DigitalIO.h: No such file or directory
#include <DigitalIO.h>
^
compilation terminated.
Error compiling.
-
You should only enable SoftSPI when compiling the ethernet gateway. Change it back when this has been done and you want to build your sensors.
-
I used latest Master library this time and patched RF24_config.h (enabled SoftSPI and changed pins), included DigitalIO. Sketch uploaded successfully, I get "gateway startup" message and I can ping it. Vera also communicates with gateway (lib version shows up, inclusion buttons work). Then I tried to include two independent nodes / sensors : distance and relay. I can only include relay node (no light button) and distance sensor (no node). I tried several times. Gateway always receives radio message but somehow doesn't relay all info to Vera? I rebuilt sensors with latest Master library (with softspi disabled). What else should I try?
-
Could you post serial monitor debug messages from gateway (maybe easiest when plugged into computer). Then restart a sensor to get some traffic.
-
@hek see below, I included relay node, tried several times, only 1 device added (node, no relay button)
0;0;3;0;14;Gateway startup complete.
0;0;3;0;9;read: 3-3-0 s=1,c=1,t=13,pt=2,l=2:5
3;1;1;0;13;5
0;0;3;0;2;Get Version
0;0;3;0;2;1.4
0;0;3;0;9;read: 3-3-0 s=1,c=1,t=13,pt=2,l=2:21
3;1;1;0;13;21
0;0;3;0;5;1
0;0;3;0;5;1
0;0;3;0;9;read: 4-4-0 s=255,c=0,t=18,pt=0,l=3:1.4
4;255;0;0;18;1.4
0;0;3;0;9;read: 4-4-0 s=255,c=3,t=6,pt=1,l=1:0
4;255;3;0;6;0
0;0;3;0;9;read: 4-1-0 s=255,c=3,t=6,pt=1,l=1:0
4;255;3;0;6;0
0;0;3;0;9;read: 4-4-0 s=255,c=0,t=18,pt=0,l=3:1.4
4;255;0;0;18;1.4
0;0;3;0;9;read: 4-1-0 s=255,c=0,t=18,pt=0,l=3:1.4
4;255;0;0;18;1.4
0;0;3;0;9;read: 4-4-0 s=255,c=3,t=6,pt=1,l=1:0
4;255;3;0;6;0
0;0;3;0;9;read: 4-1-0 s=255,c=3,t=6,pt=1,l=1:0
4;255;3;0;6;0
0;0;3;0;5;0
0;0;3;0;5;0
0;0;3;0;2;Get Version
0;0;3;0;2;1.4
0;0;3;0;9;read: 4-4-0 s=255,c=0,t=18,pt=0,l=3:1.4
4;255;0;0;18;1.4
0;0;3;0;9;read: 4-1-0 s=255,c=0,t=18,pt=0,l=3:1.4
4;255;0;0;18;1.4
0;0;3;0;9;read: 4-4-0 s=255,c=3,t=6,pt=1,l=1:0
4;255;3;0;6;0
0;0;3;0;9;read: 4-1-0 s=255,c=3,t=6,pt=1,l=1:0
4;255;3;0;6;0
4;255;3;0;6;M
0;0;3;0;9;send: 0-0-1-4 s=255,c=3,t=6,pt=0,l=1,st=fail:M
4;255;3;0;6;M
0;0;3;0;9;send: 0-0-1-4 s=255,c=3,t=6,pt=0,l=1,st=fail:M
0;0;3;0;9;read: 4-4-0 s=255,c=3,t=11,pt=0,l=5:Relay
4;255;3;0;11;Relay
0;0;3;0;9;read: 4-4-0 s=255,c=3,t=12,pt=0,l=3:1.0
4;255;3;0;12;1.0
0;0;3;0;9;read: 4-4-0 s=1,c=0,t=3,pt=0,l=3:1.4
4;1;0;0;3;1.4
-
Looks like the sends is failing.
@Anticimex told me he was investigating send-fails that evidently started when the updated RF24-with-SOFTSPI was introduced a couple of weeks ago.
Hmm... somehow this new version could be affecting this. If rolling back would mean you'd lose SOFT-SPI-option.
@Anticimex: Did you locate the problem?
-
Something fishy is definitely going on: This is the log from a relay actuator I just hooked up.
send: 5-5-0-0 s=1,c=0,t=3,pt=0,l=3,st=ok:1.4
read: 5-1-0 s=1,c=0,t=3,pt=0,l=3:1.4
read: 5-1-0 s=1,c=0,t=3,pt=0,l=3:1.4
read: 5-1-0 s=1,c=0,t=3,pt=0,l=3:1.4After the last send it finds messages (the last 3) which gateway not should have sent. Almost as the gateways hardware ack-messages is picked up by the sensor as regular messages.
You might wanna roll back until the root cause of the is found.
Pinging @TMRh20Projects here also.
This is the commit that is causing the problem: https://github.com/mysensors/Arduino/commit/2fd948fc6667460961194040bef635d25b4dfd8b
-
I think I've found the problem and a patch has been check in to master branch. So @niccodemi download the latest and try again please.
@marceltrapman this might be related to some the problems you experiences earlier as well.
-
@hek said:
@marceltrapman this might be related to some the problems you experiences earlier as well.
I would be really happy when my case is solved as well with this.
Do I have to reload gateway, repeater, sensor or all sketches?
-
Yes, as it is related to acks both gateway and sensors is affected, But it does not solve the fetch-id-through-repeater problem we also discussed.
I really encourage people to update if they are running code from 10:th of september and after.
-
I have not yet had opportunity to dig. Is the problem already identified and solved?
-
Yes, I think it is solved. The problem was there even before the RF24 update but it didn't manifest itself as much.
-
@hek great. I'll verify tonight. I have a setup that easily reproduces the problem.
-
I had to update master as it is a show-stopper-bug.
-
Since it is a change to Mysensor.cpp, then I assume all sketches are the same but every sketch that uses Mysensor.cpp (which is all sensors and the gateway) need to be compiled/uploaded again after downloading the new library?
-
Yes, if you're running code fetched after Sep 10 (https://github.com/mysensors/Arduino/commit/01a6adb1ccaee4f8546cab607f963dc1d6da4b43).
-
@hek Sorry to report that it does not resolve the ACK-issue. I still have the same phenomenon.
EDIT: Forgot to update GW as well. It works flawlessly
-
Gateway and sensors updated. Running fine.
-
@hek I tested with updated library and I can confirm that relay actuator and distance sensor work ok.
-
I was able to get the GW up and added the temp sensors finally. Thanks for the help.
-
@karenbobiv Congratulations!!!
-
so is there a 1.4.1 coming out?
-
@p0lar The 1.4 version at github contains the updates. I guess the version number was not incremented.
I would also like to see version number change if the code changed so it would be possible to know what version you are actually on. There might be a few different 1.4 versions in use at the moment and this is not good when it comes to supporting people when they have problems.
-
Ok you got a tag/version update now.
-
-
@hek , ethernet gateway with relay actuator worked fine until today when I updated gateways and nodes to 1.4.1. I know this latest update was supposed to be just name change but now I cannot control actuator anymore. Ethernet gateway has amplified radio which is powered separately (common ground). On the other hand, usb gateway works fine. Ethernet gateway seems to be receiving ok but sending fails. Below is serial print
4;255;3;0;6;0
4;255;3;0;6;M
0;0;3;0;9;send: 0-0-4-4 s=255,c=3,t=6,pt=0,l=1,st=fail:M
0;0;3;0;9;read: 4-4-0 s=255,c=3,t=11,pt=0,l=14:Relay & Button
4;255;3;0;11;Relay & Button
0;0;3;0;9;read: 4-4-0 s=255,c=3,t=12,pt=0,l=3:1.0
4;255;3;0;12;1.0
0;0;3;0;9;read: 4-4-0 s=1,c=0,t=3,pt=0,l=5:1.4.1
4;1;0;0;3;1.4.1
0;0;3;0;9;read: 1-1-0 s=0,c=1,t=1,pt=7,l=5:55.6
1;0;1;0;1;55.6
0;0;3;0;9;read: 3-3-0 s=1,c=1,t=13,pt=2,l=2:18
3;1;1;0;13;18
0;0;3;0;9;read: 3-3-0 s=1,c=1,t=13,pt=2,l=2:19
3;1;1;0;13;19
4;1;1;1;2;1
0;0;3;0;9;send: 0-0-4-4 s=1,c=1,t=2,pt=0,l=1,st=fail:1
4;1;1;1;2;0
0;0;3;0;9;send: 0-0-4-4 s=1,c=1,t=2,pt=0,l=1,st=fail:0
4;1;1;1;2;1
0;0;3;0;9;send: 0-0-4-4 s=1,c=1,t=2,pt=0,l=1,st=fail:1
4;1;1;1;2;0
0;0;3;0;9;send: 0-0-4-4 s=1,c=1,t=2,pt=0,l=1,st=fail:0
4;1;1;1;2;1
0;0;3;0;9;send: 0-0-4-4 s=1,c=1,t=2,pt=0,l=1,st=fail:1
4;1;1;1;2;0
0;0;3;0;9;send: 0-0-4-4 s=1,c=1,t=2,pt=0,l=1,st=fail:0
0;0;3;0;9;read: 1-1-0 s=0,c=1,t=1,pt=7,l=5:55.0
1;0;1;0;1;55.0
4;1;1;1;2;1
0;0;3;0;9;send: 0-0-4-4 s=1,c=1,t=2,pt=0,l=1,st=fail:1
0;0;3;0;9;read: 1-1-0 s=0,c=1,t=1,pt=7,l=5:14105.6
1;0;1;0;1;14105.6
0;0;3;0;9;read: 1-1-64 s=2,c=1,t=11,pt=2,l=2:2
0;0;3;0;9;send: 1-0-0-64 s=2,c=1,t=11,pt=2,l=2,st=fail:2
0;0;3;0;9;read: 1-1-0 s=1,c=1,t=0,pt=7,l=5:32.6
-
-
@niccodemi maybe you should take a look at this thread -> http://forum.mysensors.org/topic/565/solved-problems-with-ethernet-gateway-arduino-ethernet-shield/18
-
@korttoma thanks, I saw that thread (even replied there) and did everything that was suggested. My ethernet gateway is running fine with all sensors except relay actuators.
-
have noticed the same here. Upgrading the Gateway to 1.4.1 would receive from Relay-actuator 1.4 fine but The relay-actuator wouldn't receive messages sent by gw.
Upgrading the actor to 1.4.1 MySensors lib did solve the issue.
-
btw: I did improve reconnect of Ethernet-gw: http://forum.mysensors.org/topic/572/improved-ethernet-gateway
-
@ntruchsess are you using serial or ethernet gw? I still have issues with relays and ethernet gw (W5100). Have you tested ENC28J60 with new code and 1.4.1 library?
-
that test was using Ethernet-gw on wiz5100 shield. Enc28j60 not tested (yet)
-
Sorry for the huge kick.. But I seem to have the same ethernet gateway as TS. His his wire diagram valid?