Sensebender Gateway 1.0 - Init weirdness...
-
My setup is :
- Raspberry Pi Zero2 running 'mysgw 2.3.2' connected via USB serial to
- Sensebender Gateway running 'MySensors core version : 2.3.2' and a default sketch customised for an RFM69HW.
When I view the Arduino Serial Monitor on init, with the Sensebender gateway hooked directly to laptop USB, everything looks OK :
09:27:09.544 -> 0;255;3;0;9;1150 MCO:BGN:INIT GW,CP=RRNGS---,FQ=48,REL=255,VER=2.3.2 09:27:09.578 -> 0;255;3;0;9;1179 TSF:LRT:OK 09:27:09.578 -> 0;255;3;0;9;1179 TSM:INIT 09:27:09.578 -> 0;255;3;0;9;1180 TSF:WUR:MS=0 09:27:09.578 -> 0;255;3;0;9;1182 TSM:INIT:TSP OK 09:27:09.578 -> 0;255;3;0;9;1182 TSM:INIT:GW MODE 09:27:09.578 -> 0;255;3;0;9;1182 TSM:READY:ID=0,PAR=0,DIS=0 09:27:09.578 -> 0;255;3;0;9;1182 MCO:REG:NOT NEEDED 09:27:09.578 -> 0;255;3;0;14;Gateway startup complete. 09:27:09.578 -> 0;255;0;0;18;2.3.2 09:27:09.578 -> 0;255;3;0;9;1183 MCO:BGN:STP 09:27:09.578 -> 0;255;3;0;9;1183 MCO:BGN:INIT OK,TSP=1 09:27:09.578 -> 0;255;3;0;9;1183 TSM:READY:NWD REQ 09:27:09.578 -> 0;255;3;0;9;1187 ?TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK:
But if I short SWC2, it appears there's an EEPROM problem?
09:28:00.951 -> Sensebender GateWay test routine 09:28:00.951 -> MySensors core version : 2.3.2 09:28:00.951 -> GateWay sketch version : 0.3trcm 09:28:00.951 -> ---------------------------------- 09:28:00.951 -> 09:28:00.951 -> - > SHA204 Ok (serial : 01234DAE97196D83EE) 09:28:01.021 -> - > SD CARD SD Card initialized correct! - type detected : SDHC 09:28:01.125 -> -> EEPROM ... hangs here indefinitely ...
And if I connect the Sensebender Gateway to the Pi Zero with
mysgw
, it looks like the radio then fails to init? :pi@raspberrypi:~/MySensors $ ./configure --my-gateway=serial --my-serial-port=/dev/ttyACM0 --my-transport=rfm69 --my-rfm69-frequency=433 --my-serial-is-pty --my-is-rfm69hw [SECTION] Detecting target machine. [OK] machine detected: SoC=BCM2837, Type=rpi3, CPU=armv7l. [SECTION] Detecting SPI driver. [OK] SPI driver detected:BCM. [SECTION] Gateway configuration. [OK] Type: serial. [OK] Transport: rfm69. [OK] Signing: Disabled. [OK] Encryption: Disabled. [OK] CPPFLAGS: -march=armv8-a+crc -mtune=cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard -DMY_RADIO_RFM69 -DMY_RFM69_NEW_DRIVER -DMY_GATEWAY_SERIAL -DMY_DEBUG -DLINUX_SPI_BCM -DLINUX_ARCH_RASPBERRYPI -DMY_IS_RFM69HW -DMY_LINUX_SERIAL_IS_PTY -DMY_RFM69_FREQUENCY=RFM69_433MHZ -DMY_LINUX_SERIAL_PORT="/dev/ttyACM0" [OK] CXXFLAGS: -std=c++11 [SECTION] Detecting init system. [OK] Init system detected: systemd. [SECTION] Saving configuration. [OK] Saved. [SECTION] Cleaning previous builds. [OK] Finished. pi@raspberrypi:~/MySensors $ make && sudo make install
And then...
pi@raspberrypi:~ $ sudo mysgw May 30 09:40:45 INFO Starting gateway... May 30 09:40:45 INFO Protocol version - 2.3.2 May 30 09:40:45 DEBUG Serial port /dev/ttyACM0 (115200 baud) created May 30 09:40:45 DEBUG MCO:BGN:INIT GW,CP=RPNGL---,FQ=NA,REL=255,VER=2.3.2 May 30 09:40:45 DEBUG TSF:LRT:OK May 30 09:40:45 DEBUG TSM:INIT May 30 09:40:45 DEBUG TSF:WUR:MS=0 May 30 09:40:45 DEBUG !TSM:INIT:TSP FAIL May 30 09:40:45 DEBUG TSM:FAIL:CNT=1 May 30 09:40:45 DEBUG TSM:FAIL:DIS May 30 09:40:45 DEBUG TSF:TDI:TSL May 30 09:40:55 DEBUG TSM:FAIL:RE-INIT May 30 09:40:55 DEBUG TSM:INIT May 30 09:40:55 DEBUG !TSM:INIT:TSP FAIL May 30 09:40:55 DEBUG TSM:FAIL:CNT=2 May 30 09:40:55 DEBUG TSM:FAIL:DIS May 30 09:40:55 DEBUG TSF:TDI:TSL ^CMay 30 09:40:58 NOTICE Received SIGINT
Though serial output seems to show TSM (this is the radio portion?) inits OK :
pi@raspberrypi:~/MySensors $ cat /dev/ttyACM0 0;255;3;0;9;7573 MCO:BGN:INIT GW,CP=RRNGS---,FQ=48,REL=255,VER=2.3.2 0;255;3;0;9;7602 TSF:LRT:OK 0;255;3;0;9;7602 TSM:INIT 0;255;3;0;9;7603 TSF:WUR:MS=0 0;255;3;0;9;7604 TSM:INIT:TSP OK 0;255;3;0;9;7605 TSM:INIT:GW MODE 0;255;3;0;9;7605 TSM:READY:ID=0,PAR=0,DIS=0 0;255;3;0;9;7605 MCO:REG:NOT NEEDED 0;255;3;0;14;Gateway startup complete. 0;255;0;0;18;2.3.2 0;255;3;0;9;7606 MCO:BGN:STP 0;255;3;0;9;7606 MCO:BGN:INIT OK,TSP=1 0;255;3;0;9;7606 TSM:READY:NWD REQ 0;255;3;0;9;7610 ?TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK:
What am I not understanding here, have I specified the options incorrectly in the ./configure step ?
Is something wrong with the EEPROM ?
-
Hmm, I wasn't clear on what the
mysgw
software did, I don't need to run that at all do I!It seems there's still an issue with the EEPROM test routine though?
-
@tomtastic
Hi, I had similar problems in the last year. There is definitely a issue with the clear eeprom sketch, I ended up having to make changes myself, in order to correctly wipe it. When I'm next on my pc I'll post the sketch.Regards Nigel
-
Hi all,
This is what I Simply ended up with to clear the eeprom,
// load core modules only #define MY_CORE_ONLY #include <MySensors.h> void before(){ Serial.begin(115200); Serial.println("Started clearing. Please wait..."); for (uint16_t i=0; i<EEPROM_LOCAL_CONFIG_ADDRESS; i++) { hwWriteConfig(i,0xFF); } Serial.println("Clearing done."); } void setup() { Serial.begin(115200); Serial.println("Started clearing. Please wait..."); for (uint16_t i=0; i<EEPROM_LOCAL_CONFIG_ADDRESS; i++) { hwWriteConfig(i,0xFF); Serial.println(i); } Serial.println("Clearing done."); } void loop() { // Nothing to do here... }