Re: EasyPCB and RFM69 Issues
Following on from the thread above I have done some further debugging to try narrow down the issue.
My setup currently is 3x EasyPCB nodes, non H version of the RFM69. Powered by debugger but also attached battery power.
They sync up very very sporadically. Most of the time they will not talk to the gateway.
My gateway is a D1 mini with the H version of the radio. I have tried 2 different radios and both perform the same.
Antenna type on everything is the coiled versions common on ebay but i have experimented with the SMA style antenna on a node and a 17cm dipole on the gateway
Everything is running on 433mhz.
Sensor Log -
__ __ ____
| \/ |_ _/ ___| ___ _ __ ___ ___ _ __ ___
| |\/| | | | \___ \ / _ \ `_ \/ __|/ _ \| `__/ __|
| | | | |_| |___| | __/ | | \__ \ _ | | \__ \
|_| |_|\__, |____/ \___|_| |_|___/\___/|_| |___/
|___/ 2.2.0
16 MCO:BGN:INIT NODE,CP=RRNNA---,VER=2.2.0
26 TSM:INIT
28 TSF:WUR:MS=0
30 TSM:INIT:TSP OK
32 TSM:INIT:STATID=49
34 TSF:SID:OK,ID=49
36 TSM:FPAR
38 TSM:FPAR:STATP=0
40 TSM:ID
43 TSM:ID:OK
43 TSM:UPL
1263 !TSF:MSG:SEND,49-49-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=NACK:1
3270 TSM:UPL
4489 !TSF:MSG:SEND,49-49-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=1,st=NACK:1
6496 TSM:UPL
7714 !TSF:MSG:SEND,49-49-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=2,st=NACK:1
9721 TSM:UPL
10940 !TSF:MSG:SEND,49-49-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=3,st=NACK:1
12947 !TSM:UPL:FAIL
12949 TSM:FPAR
12949 TSM:FPAR:STATP=0
12953 TSM:ID
12953 TSM:ID:OK
12955 TSM:UPL
14176 !TSF:MSG:SEND,49-49-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=4,st=NACK:1
16183 TSM:UPL
17401 !TSF:MSG:SEND,49-49-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=5,st=NACK:1
19410 TSM:UPL
20629 !TSF:MSG:SEND,49-49-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=6,st=NACK:1
22636 TSM:UPL
23855 !TSF:MSG:SEND,49-49-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=7,st=NACK:1
25862 !TSM:UPL:FAIL
25864 TSM:FPAR
25864 TSM:FPAR:STATP=0
25868 TSM:ID
25868 TSM:ID:OK
25870 TSM:UPL
27090 !TSF:MSG:SEND,49-49-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=8,st=NACK:1
29100 TSM:UPL
30318 !TSF:MSG:SEND,49-49-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=9,st=NACK:1
32325 TSM:UPL
33544 !TSF:MSG:SEND,49-49-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=10,st=NACK:1
35553 TSM:UPL
36771 !TSF:MSG:SEND,49-49-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=11,st=NACK:1
38782 !TSM:UPL:FAIL
38785 TSM:FPAR
38785 TSM:FPAR:STATP=0
38789 TSM:ID
38789 TSM:ID:OK
38791 TSM:UPL
Gateway Log
60 MCO:BGN:INIT GW,CP=RRNGE---,VER=2.2.0
103 TSF:LRT:OK
118 TSM:INIT
132 TSF:WUR:MS=0
152 TSM:INIT:TSP OK
173 TSM:INIT:GW MODE
scandone
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 8
cnt
connected with xxxxxxxxx, channel 9
dhcp client start...
339 TSM:READY:ID=0,PAR=0,DIS=0
371 MCO:REG:NOT NEEDED
scandone
897 GWT:TPC:CONNECTING...
1424 GWT:TPC:CONNECTING...
1952 GWT:TPC:CONNECTING...
2357 TSF:MSG:READ,49-49-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
2417 TSF:MSG:PINGED,ID=49,HP=1
3673 !TSF:MSG:SEND,0-0-49-49,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=NACK:1
ip:192.168.5.19,mask:255.255.255.0,gw:192.168.5.1
3801 GWT:TPC:CONNECTING...
3829 GWT:TPC:IP=192.168.5.19
3860 MCO:BGN:STP
3878 MCO:BGN:INIT OK,TSP=1
3906 GWT:TPC:IP=192.168.5.19
3937 GWT:RMQ:MQTT RECONNECT
3994 GWT:RMQ:MQTT CONNECTED
4023 GWT:TPS:TOPIC=mygateway1-out/0/255/0/0/18,MSG SENT
5584 TSF:MSG:READ,49-49-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
5643 TSF:MSG:PINGED,ID=49,HP=1
6900 !TSF:MSG:SEND,0-0-49-49,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=NACK:1
8810 TSF:MSG:READ,49-49-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
8869 TSF:MSG:PINGED,ID=49,HP=1
10126 !TSF:MSG:SEND,0-0-49-49,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=NACK:1
pm open,type:2 0
12047 TSF:MSG:READ,49-49-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
12108 TSF:MSG:PINGED,ID=49,HP=1
13365 !TSF:MSG:SEND,0-0-49-49,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=NACK:1
15273 TSF:MSG:READ,49-49-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
15333 TSF:MSG:PINGED,ID=49,HP=1
16591 !TSF:MSG:SEND,0-0-49-49,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=NACK:1
18501 TSF:MSG:READ,49-49-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
18562 TSF:MSG:PINGED,ID=49,HP=1
19820 !TSF:MSG:SEND,0-0-49-49,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=NACK:1
21728 TSF:MSG:READ,49-49-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
21788 TSF:MSG:PINGED,ID=49,HP=1
My sketches
(Default MockSensor sketch)
/*
* MockMySensors
*
* This skecth is intended to crate fake sensors which register and respond to the controller
* ***
* Barduino 2015, GizMoCuz 2015
*/
// Enable debug prints to serial monitor
#define MY_DEBUG
// Enable and select radio type attached
//#define MY_RADIO_NRF24
//#define MY_RADIO_NRF5_ESB
#define MY_RADIO_RFM69
#define MY_RF69_FREQUENCY RF69_433MHZ // Set your frequency here
#define MY_NODE_ID 49
#define MY_PARENT_NODE_ID 0
#define MY_PARENT_NODE_IS_STATIC
//#define MY_RFM69_NEW_DRIVER
//#define MY_RADIO_RFM95
#include <MySensors.h>
#define RADIO_ERROR_LED_PIN 4 // Error led pin
#define RADIO_RX_LED_PIN 6 // Receive led pin
#define RADIO_TX_LED_PIN 5 // the PCB, on board LED
// Wait times
#define LONG_WAIT 500
#define SHORT_WAIT 50
#define SKETCH_NAME "MockMyRyanmt"
#define SKETCH_VERSION "v0.5"
<< Removed default sketch code below >>
And the gateway is the default esp8266mqtt gateway sketch.
// Enable debug prints to serial monitor
#define MY_DEBUG
// Use a bit lower baudrate for serial prints on ESP8266 than default in MyConfig.h
#define MY_BAUD_RATE 9600
#define MY_RADIO_RFM69
#define MY_RF69_FREQUENCY RF69_433MHZ // Set your frequency here
//#define MY_RFM69_NEW_DRIVER
//#define MY_RADIO_RFM95
#define MY_IS_RFM69HW // Omit if your RFM is not "H"
#define MY_GATEWAY_ESP8266
#define MY_GATEWAY_MQTT_CLIENT
#define MY_GATEWAY_ESP8266
#define MY_NODE_ID 1
#define MY_RF69_IRQ_PIN D2
#define MY_RF69_IRQ_NUM MY_RF69_IRQ_PIN
#define MY_RF69_SPI_CS D8
// Set this node's subscribe and publish topic prefix
#define MY_MQTT_PUBLISH_TOPIC_PREFIX "mygateway1-out"
#define MY_MQTT_SUBSCRIBE_TOPIC_PREFIX "mygateway1-in"
// Set MQTT client id
#define MY_MQTT_CLIENT_ID "mysensors-1"
// Enable these if your MQTT broker requires usenrame/password
#define MY_MQTT_USER "xxxxxxx"
#define MY_MQTT_PASSWORD "xxxx"
// Set WIFI SSID and password
#define MY_ESP8266_SSID "xxxxxx"
#define MY_ESP8266_PASSWORD "xxxxxx"
// Set the hostname for the WiFi Client. This is the hostname
// it will pass to the DHCP server if not static.
// #define MY_ESP8266_HOSTNAME "mqtt-sensor-gateway"
// Enable MY_IP_ADDRESS here if you want a static ip address (no DHCP)
//#define MY_IP_ADDRESS 192,168,178,87
// If using static ip you can define Gateway and Subnet address as well
//#define MY_IP_GATEWAY_ADDRESS 192,168,178,1
//#define MY_IP_SUBNET_ADDRESS 255,255,255,0
// MQTT broker ip address.
#define MY_CONTROLLER_IP_ADDRESS 192,168,5,3
// The MQTT broker port to to open
#define MY_PORT 1883
// 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
I have tried the new driver option on both the sensor and gateway but same issue. Looks like I only have 1 way communications?
Things I have tried
- Double checking the soldering
- Building multiple gateways and using different radios on the gateway
- Moving the sensors very close or few meters apart
- Using a radio on the gateway with a 17cm wire as apposed to the coiled antena
So the current status is they gain 2 way comms occasionally and when they're within 5cm. The range is very very small!
Anybody got any ideas what I could try next? Is there a way to confirm the ebay seller has sold me the correct frequency radios? Should I look more into the antennas perhaps? I have tried a dipole and have a node with both the coiled ebay antennas and an SMA one but the results are always the same.
If the vendor had sold me the wrong frequency radios is there any way to check? Would it cause severe range issues like this?