💬 Sensebender Gateway
-
@tbowmo I am using the static IP and I can ping it, but the "Gateway Ready" message never comes up. Also I can only see the neg24l01+ log (incoming messages only)
If you can ping it, then the W5100 is configured. Something else is wrong..
One thing that comes to mind, if you compile it as an ethernet GW, then it does not wait for serial console to be active, before initializing the radio. If you compile it as serial GW, then it waits with initialization, until serial is active.
This means that you probably is missing the GW ready message on the serial port, as it is "sent" before you have an active serial connection.
Look in MyHwSamd.cpp in the HwInit routine, remove the #ifdef around the while() loop, and try again.
-
If you can ping it, then the W5100 is configured. Something else is wrong..
One thing that comes to mind, if you compile it as an ethernet GW, then it does not wait for serial console to be active, before initializing the radio. If you compile it as serial GW, then it waits with initialization, until serial is active.
This means that you probably is missing the GW ready message on the serial port, as it is "sent" before you have an active serial connection.
Look in MyHwSamd.cpp in the HwInit routine, remove the #ifdef around the while() loop, and try again.
@tbowmo Well, if I try the MEGA 2560 with W5100, I get the following:
0;255;3;0;9;MCO:BGN:INIT GW,CP=RNNGAS-,VER=2.1.1 0;255;3;0;9;TSM:INIT 0;255;3;0;9;TSF:WUR:MS=0 0;255;3;0;9;TSM:INIT:TSP OK 0;255;3;0;9;TSM:INIT:GW MODE 0;255;3;0;9;TSM:READY:ID=0,PAR=0,DIS=0 0;255;3;0;9;MCO:REG:NOT NEEDED IP: 10.1.1.120 0;255;3;0;9;MCO:BGN:STP 0;255;3;0;9;MCO:BGN:INIT OK,TSP=1I never get this message with Sensebender GW. I only get
0;255;3;0;9;TSF:MSG:READ,11-11-0,s=2,c=1,t=37,pt=7,l=5,sg=0:2019.12 0;255;3;0;9;TSF:MSG:READ,11-11-0,s=0,c=1,t=37,pt=7,l=5,sg=0:6275.51 0;255;3;0;9;TSF:MSG:READ,11-11-0,s=3,c=1,t=37,pt=7,l=5,sg=0:18.77or similar messages from nodes.
-
on atmega2560 you are resetting the device, when you connect a serial terminal to the usb device, so you get all the debug messages on the serial port..
On SAMD it uses a native USB port, and the chip is not reset when connecting a serial terminal. When using serialGw it will wait until a serial terminal is connected. before initializing radio transport (this is because it does not make sense to have a serial gateway that spits out data to a none existing port).
When using it as a ethernet gateway, we skip this, as we do not want to wait for a serial terminal, in case you are just using the USB as a power source. So in this mode, it skips the waiting, and just initializes radio gateway etc.
as stated in my previous message you could look at the MyHwSAMD.cpp file line 73. Remove the #ifdef recompile, upload, and check your serial terminal again.
Also the log shows that you actually are receiving data from your nodes, so the radio transport is clearly active.. And you can ping your gateways static IP, which means that the W5100 is initialized with the correct IP address.
-
@tbowmo Well, if I try the MEGA 2560 with W5100, I get the following:
0;255;3;0;9;MCO:BGN:INIT GW,CP=RNNGAS-,VER=2.1.1 0;255;3;0;9;TSM:INIT 0;255;3;0;9;TSF:WUR:MS=0 0;255;3;0;9;TSM:INIT:TSP OK 0;255;3;0;9;TSM:INIT:GW MODE 0;255;3;0;9;TSM:READY:ID=0,PAR=0,DIS=0 0;255;3;0;9;MCO:REG:NOT NEEDED IP: 10.1.1.120 0;255;3;0;9;MCO:BGN:STP 0;255;3;0;9;MCO:BGN:INIT OK,TSP=1I never get this message with Sensebender GW. I only get
0;255;3;0;9;TSF:MSG:READ,11-11-0,s=2,c=1,t=37,pt=7,l=5,sg=0:2019.12 0;255;3;0;9;TSF:MSG:READ,11-11-0,s=0,c=1,t=37,pt=7,l=5,sg=0:6275.51 0;255;3;0;9;TSF:MSG:READ,11-11-0,s=3,c=1,t=37,pt=7,l=5,sg=0:18.77or similar messages from nodes.
-
Did you try my suggestion about hacking the core? Or did you give up on the beast? :)
I'm curious to hear if it is solved..
-
Hello everybody.
I got my Sensebender gateway yesterday. Have the W5100 Ethernet board mounted and loaded a sketch with the WizNET (W5100) Ethernet module and MQTT.
The gateway immediately ran as desired.
Unfortunately only for about 2 hours, then it freezes.
After a restart it runs again 3 hours and freezes again.
And so on.I wanted to replace an RPI Gatway, which has worked flawlessly for many weeks.
If the Sensebender gateway works only a few hours it is quite useless.
-
Hello everybody.
I got my Sensebender gateway yesterday. Have the W5100 Ethernet board mounted and loaded a sketch with the WizNET (W5100) Ethernet module and MQTT.
The gateway immediately ran as desired.
Unfortunately only for about 2 hours, then it freezes.
After a restart it runs again 3 hours and freezes again.
And so on.I wanted to replace an RPI Gatway, which has worked flawlessly for many weeks.
If the Sensebender gateway works only a few hours it is quite useless.
It must be a software issue. Are you using it with nrf24? Do you have a github account? If you have, would you mind filling an issue report on the mysensors library? As we need to dig further into this. Please also make a note of how many nodes you have running in your system.
-
I also think that it is a software problem.
I use only the RFM96HW.
My "real" network has 20 nodes.The Sensebender gateway has only one DS18b20 node on a seperate frequency.
(#define MY_RFM69_FREQUENCY (868200000ul))And yes, I have a github account and will make an issue report today.
-
Did you try my suggestion about hacking the core? Or did you give up on the beast? :)
I'm curious to hear if it is solved..
@tbowmo I think I am on the right track here. This is the log:
0;255;3;0;9;MCO:BGN:INIT GW,CP=RNNGS--,VER=2.1.1 0;255;3;0;9;TSF:LRT:OK 0;255;3;0;9;TSM:INIT 0;255;3;0;9;TSF:WUR:MS=0 0;255;3;0;9;TSM:INIT:TSP OK 0;255;3;0;9;TSM:INIT:GW MODE 0;255;3;0;9;TSM:READY:ID=0,PAR=0,DIS=0 0;255;3;0;9;MCO:REG:NOT NEEDED IP: 0.0.0.0 0;255;3;0;9;MCO:BGN:STP 0;255;3;0;9;MCO:BGN:INIT OK,TSP=1The GW Init is correct one, but IP is 0.0.0.0
This is the sketch:
// Enable debug prints to serial monitor #define MY_DEBUG // Enable and select radio type attached #define MY_RADIO_NRF24 //#define MY_DEBUG_VERBOSE_RF24 //#define MY_RADIO_RFM69 #define MY_RF24_CHANNEL 76 // Enable gateway ethernet module type #define MY_GATEWAY_W5100 // W5100 Ethernet module SPI enable (optional if using a shield/module that manages SPI_EN signal) //#define MY_W5100_SPI_EN 4 // Enable Soft SPI for NRF radio (note different radio wiring is required) // The W5100 ethernet module seems to have a hard time co-operate with // radio on the same spi bus. #if !defined(MY_W5100_SPI_EN) && !defined(ARDUINO_ARCH_SAMD) #define MY_SOFTSPI #define MY_SOFT_SPI_SCK_PIN 14 #define MY_SOFT_SPI_MISO_PIN 16 #define MY_SOFT_SPI_MOSI_PIN 15 #endif // When W5100 is connected we have to move CE/CSN pins for NRF radio #ifndef MY_RF24_CE_PIN #define MY_RF24_CE_PIN 5 #endif #ifndef MY_RF24_CS_PIN #define MY_RF24_CS_PIN 6 #endif // Enable to UDP //#define MY_USE_UDP #define MY_IP_ADDRESS 10,1,1,150 // If this is disabled, DHCP is used to retrieve address // Renewal period if using DHCP //#define MY_IP_RENEWAL_INTERVAL 60000 // The port to keep open on node server mode / or port to contact in client mode #define MY_PORT 5003 // Controller ip address. Enables client mode (default is "server" mode). // Also enable this if MY_USE_UDP is used and you want sensor data sent somewhere. //#define MY_CONTROLLER_IP_ADDRESS 192, 168, 178, 254 // The MAC address can be anything you want but should be unique on your network. // Newer boards have a MAC address printed on the underside of the PCB, which you can (optionally) use. // Note that most of the Ardunio examples use "DEAD BEEF FEED" for the MAC address. #define MY_MAC_ADDRESS 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED // Enable inclusion mode #define MY_INCLUSION_MODE_FEATURE // Enable Inclusion mode button on gateway //#define MY_INCLUSION_BUTTON_FEATURE // Set inclusion mode duration (in seconds) #define MY_INCLUSION_MODE_DURATION 60 // Digital pin used for inclusion mode button //#define MY_INCLUSION_MODE_BUTTON_PIN 3 // Set blinking period #define MY_DEFAULT_LED_BLINK_PERIOD 300 // Flash leds on rx/tx/err // Uncomment to override default HW configurations //#define MY_DEFAULT_ERR_LED_PIN 7 // Error led pin //#define MY_DEFAULT_RX_LED_PIN 8 // Receive led pin //#define MY_DEFAULT_TX_LED_PIN 9 // Transmit led pin #if defined(MY_USE_UDP) #include <EthernetUdp.h> #endif #include <Ethernet.h> #include <MySensors.h> void setup() { } void loop() { }I cannot connect to W5100. Tried a different shield with the same result.
-
I would really like to get it solved, so it can bring peace to my mind :) so please, if you can..
@tbowmo BTW, I cannot ping it (I suppose there was another network device with the same IP on a network).
If I try to switch to DHCP I get:0;255;3;0;9;MCO:BGN:INIT GW,CP=RNNGS--,VER=2.1.1 0;255;3;0;9;TSF:LRT:OK 0;255;3;0;9;TSM:INIT 0;255;3;0;9;TSF:WUR:MS=0 0;255;3;0;9;TSM:INIT:TSP OK 0;255;3;0;9;TSM:INIT:GW MODE 0;255;3;0;9;TSM:READY:ID=0,PAR=0,DIS=0 0;255;3;0;9;MCO:REG:NOT NEEDED DHCP FAILURE...0;255;3;0;9;!MCO:BGN:TSP FAIL -
@tbowmo I have received the second GW and I have exactly the same problem. As you suggested, I modified MyHwSAMD.cpp and can see now the start-up message, but there is a problem between the W5100 and GW:
0;255;3;0;9;660 MCO:BGN:INIT GW,CP=RNNGS---,VER=2.2.0-beta 0;255;3;0;9;707 TSF:LRT:OK 0;255;3;0;9;717 TSM:INIT 0;255;3;0;9;727 TSF:WUR:MS=0 0;255;3;0;9;742 TSM:INIT:TSP OK 0;255;3;0;9;752 TSM:INIT:GW MODE 0;255;3;0;9;762 TSM:READY:ID=0,PAR=0,DIS=0 0;255;3;0;9;772 MCO:REG:NOT NEEDED IP: 0.0.0.0 0;255;3;0;9;2082 MCO:BGN:STP 0;255;3;0;9;2092 MCO:BGN:INIT OK,TSP=1 0;255;3;0;9;17920 TSF:MSG:READ,11-11-0,s=2,c=1,t=37,pt=7,l=5,sg=0:1956.28 0;255;3;0;9;17931 TSF:MSG:READ,11-11-0,s=0,c=1,t=37,pt=7,l=5,sg=0:6080.20 0;255;3;0;9;17942 TSF:MSG:READ,11-11-0,s=3,c=1,t=37,pt=7,l=5,sg=0:20.71 0;255;3;0;9;17953 TSF:MSG:READ,11-11-0,s=1,c=1,t=37,pt=7,l=5,sg=0:13282.11I tried different MySensors (stable and dev) and checked solding.
Now sure what to do nowEDIT: This is my sketch:
/** * The MySensors Arduino library handles the wireless radio link and protocol * between your home built sensors/actuators and HA controller of choice. * The sensors forms a self healing radio network with optional repeaters. Each * repeater and gateway builds a routing tables in EEPROM which keeps track of the * network topology allowing messages to be routed to nodes. * * Created by Henrik Ekblad <henrik.ekblad@mysensors.org> * Copyright (C) 2013-2015 Sensnology AB * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors * * Documentation: http://www.mysensors.org * Support Forum: http://forum.mysensors.org * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * version 2 as published by the Free Software Foundation. * ******************************* * * REVISION HISTORY * Version 1.0 - Henrik EKblad * Contribution by a-lurker and Anticimex, * Contribution by Norbert Truchsess <norbert.truchsess@t-online.de> * Contribution by Tomas Hozza <thozza@gmail.com> * * * DESCRIPTION * The EthernetGateway sends data received from sensors to the ethernet link. * The gateway also accepts input on ethernet interface, which is then sent out to the radio network. * * The GW code is designed for Arduino 328p / 16MHz. ATmega168 does not have enough memory to run this program. * * LED purposes: * - To use the feature, uncomment MY_DEFAULT_xxx_LED_PIN in the sketch below * - RX (green) - blink fast on radio message recieved. In inclusion mode will blink fast only on presentation recieved * - TX (yellow) - blink fast on radio message transmitted. In inclusion mode will blink slowly * - ERR (red) - fast blink on error during transmission error or recieve crc error * * See http://www.mysensors.org/build/ethernet_gateway for wiring instructions. * */ // Enable debug prints to serial monitor #define MY_DEBUG //#define MY_DEBUG_VERBOSE_SIGNING //#define MY_SIGNING_ATSHA204 //#define MY_SIGNING_REQUEST_SIGNATURES // Enable and select radio type attached #define MY_RADIO_NRF24 //#define MY_RADIO_RFM69 // Enable gateway ethernet module type #define MY_GATEWAY_W5100 // W5100 Ethernet module SPI enable (optional if using a shield/module that manages SPI_EN signal) //#define MY_W5100_SPI_EN 4 // Enable Soft SPI for NRF radio (note different radio wiring is required) // The W5100 ethernet module seems to have a hard time co-operate with // radio on the same spi bus. #if !defined(MY_W5100_SPI_EN) && !defined(ARDUINO_ARCH_SAMD) #define MY_SOFTSPI #define MY_SOFT_SPI_SCK_PIN 14 #define MY_SOFT_SPI_MISO_PIN 16 #define MY_SOFT_SPI_MOSI_PIN 15 #endif // When W5100 is connected we have to move CE/CSN pins for NRF radio #ifndef MY_RF24_CE_PIN #define MY_RF24_CE_PIN 5 #endif #ifndef MY_RF24_CS_PIN #define MY_RF24_CS_PIN 6 #endif // Enable to UDP //#define MY_USE_UDP #define MY_IP_ADDRESS 10,1,1,150 // If this is disabled, DHCP is used to retrieve address // Renewal period if using DHCP //#define MY_IP_RENEWAL_INTERVAL 60000 // The port to keep open on node server mode / or port to contact in client mode #define MY_PORT 5003 // Controller ip address. Enables client mode (default is "server" mode). // Also enable this if MY_USE_UDP is used and you want sensor data sent somewhere. //#define MY_CONTROLLER_IP_ADDRESS 192, 168, 178, 254 // The MAC address can be anything you want but should be unique on your network. // Newer boards have a MAC address printed on the underside of the PCB, which you can (optionally) use. // Note that most of the Ardunio examples use "DEAD BEEF FEED" for the MAC address. #define MY_MAC_ADDRESS 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED // Enable inclusion mode #define MY_INCLUSION_MODE_FEATURE // Enable Inclusion mode button on gateway //#define MY_INCLUSION_BUTTON_FEATURE // Set inclusion mode duration (in seconds) #define MY_INCLUSION_MODE_DURATION 60 // Digital pin used for inclusion mode button //#define MY_INCLUSION_MODE_BUTTON_PIN 3 // Set blinking period #define MY_DEFAULT_LED_BLINK_PERIOD 300 // Flash leds on rx/tx/err // Uncomment to override default HW configurations //#define MY_DEFAULT_ERR_LED_PIN 7 // Error led pin //#define MY_DEFAULT_RX_LED_PIN 8 // Receive led pin //#define MY_DEFAULT_TX_LED_PIN 9 // Transmit led pin #if defined(MY_USE_UDP) #include <EthernetUdp.h> #endif #include <Ethernet.h> #include <MySensors.h> void setup() { } void loop() { } -
have you tried the ethernet webserver example sketch (default arduino sketch)?
Just to rule out mysensors..
Also, you are using static IP, right? What if you ping that IP address? Do you get a response? If yes, then the W5100 is configured by your sketch, and the connection should be ok between the samd and the ethernet module.
-
have you tried the ethernet webserver example sketch (default arduino sketch)?
Just to rule out mysensors..
Also, you are using static IP, right? What if you ping that IP address? Do you get a response? If yes, then the W5100 is configured by your sketch, and the connection should be ok between the samd and the ethernet module.
-
have you tried the ethernet webserver example sketch (default arduino sketch)?
Just to rule out mysensors..
Also, you are using static IP, right? What if you ping that IP address? Do you get a response? If yes, then the W5100 is configured by your sketch, and the connection should be ok between the samd and the ethernet module.
-
have you tried the ethernet webserver example sketch (default arduino sketch)?
Just to rule out mysensors..
Also, you are using static IP, right? What if you ping that IP address? Do you get a response? If yes, then the W5100 is configured by your sketch, and the connection should be ok between the samd and the ethernet module.
@tbowmo I have just discovered that the second Ethernet module I have is not W5100 but ENC28J60. Not sure if it is supported by sensebender GW (probably using native Arduino ethernet library?).
So this module is now being returned and just to figure out any hardware issue I need to order a new W5100 -
You should not use soft spi, as there is separate hardware spi ports for radio and W5100.
If you load the default GatewayW5100 example sketch, then it should work out if the box. Perhaps you need to enable rfm69 instead of nrf24 at the top of the file, but that should be all that is needed.. To get a gateway up and running with W5100
-
OK, just to recap here, you have a gateway, and a W5100. If you use that combo, and the http server example, you can ping the gateway, and Load the html files in a browser, right?
If you load stock GatewayW5100 mysensors example sketch, then does that work? (no need to redefine pins for hardware etc, that is handled by the target hardware profile, you choose in arduino)
-
You should not use soft spi, as there is separate hardware spi ports for radio and W5100.
If you load the default GatewayW5100 example sketch, then it should work out if the box. Perhaps you need to enable rfm69 instead of nrf24 at the top of the file, but that should be all that is needed.. To get a gateway up and running with W5100