Heltec Lora32 V2 Gateway
-
With a very chatty node to talk to the output looks like this.
18:42:17.284 -> 1455 TSM:READY:NWD REQ 18:42:17.284 -> 1459 RFM95:SWR:SEND,TO=255,SEQ=0,RETRY=0 18:42:17.331 -> 1513 ?TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK: 18:42:17.518 -> 1686 RFM95:SAC:SEND ACK,TO=84,SEQ=313,RSSI=-39,SNR=9 18:42:17.564 -> 1734 TSF:MSG:READ,84-84-0,s=0,c=1,t=23,pt=2,l=2,sg=0:662 18:42:17.659 -> 1839 RFM95:SAC:SEND ACK,TO=84,SEQ=314,RSSI=-38,SNR=9 18:42:17.704 -> 1887 TSF:MSG:READ,84-84-0,s=0,c=1,t=23,pt=2,l=2,sg=0:-1 18:42:17.843 -> 1992 RFM95:SAC:SEND ACK,TO=84,SEQ=315,RSSI=-42,SNR=9 18:42:17.891 -> 2040 TSF:MSG:READ,84-84-0,s=0,c=1,t=23,pt=2,l=2,sg=0:-1 18:42:17.983 -> 2145 RFM95:SAC:SEND ACK,TO=84,SEQ=316,RSSI=-43,SNR=9 18:42:18.030 -> 2193 TSF:MSG:READ,84-84-0,s=0,c=1,t=23,pt=2,l=2,sg=0:16 18:42:18.404 -> 2578 GWT:TSA:C=0,CONNECTED 18:42:18.404 -> 2589 GWT:RFC:C=0,MSG=255;255;3;0;20; 18:42:18.450 -> 2592 RFM95:SWR:SEND,TO=255,SEQ=5,RETRY=0 18:42:18.498 -> 2646 ?TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=1,l=1,sg=0,ft=0,st=OK:0 18:42:18.592 -> 2749 RFM95:SAC:SEND ACK,TO=84,SEQ=317,RSSI=-43,SNR=9 18:42:18.638 -> 2797 TSF:MSG:READ,84-84-0,s=0,c=1,t=23,pt=2,l=2,sg=0:6 18:42:18.733 -> 2902 RFM95:SAC:SEND ACK,TO=84,SEQ=318,RSSI=-44,SNR=9 18:42:18.779 -> 2950 TSF:MSG:READ,84-84-0,s=0,c=1,t=23,pt=2,l=2,sg=0:13 18:42:18.873 -> 3055 RFM95:SAC:SEND ACK,TO=84,SEQ=319,RSSI=-44,SNR=10 18:42:18.920 -> 3103 TSF:MSG:READ,84-84-0,s=0,c=1,t=23,pt=2,l=2,sg=0:-1 18:42:19.062 -> 3208 RFM95:SAC:SEND ACK,TO=84,SEQ=320,RSSI=-43,SNR=9 18:42:19.109 -> 3256 TSF:MSG:READ,84-84-0,s=0,c=1,t=23,pt=2,l=2,sg=0:1 18:42:19.204 -> 3361 RFM95:SAC:SEND ACK,TO=84,SEQ=321,RSSI=-41,SNR=9 18:42:19.251 -> 3409 TSF:MSG:READ,84-84-0,s=0,c=1,t=23,pt=2,l=2,sg=0:3 18:42:19.345 -> 3514 RFM95:SAC:SEND ACK,TO=84,SEQ=322,RSSI=-39,SNR=9 18:42:19.393 -> 3562 TSF:MSG:READ,84-84-0,s=0,c=1,t=23,pt=2,l=2,sg=0:-1 18:42:19.485 -> 3667 RFM95:SAC:SEND ACK,TO=84,SEQ=323,RSSI=-40,SNR=9 18:42:19.531 -> 3715 TSF:MSG:READ,84-84-0,s=0,c=1,t=23,pt=2,l=2,sg=0:8 18:42:19.673 -> 3820 RFM95:SAC:SEND ACK,TO=84,SEQ=324,RSSI=-41,SNR=9 18:42:19.719 -> 3868 TSF:MSG:READ,84-84-0,s=0,c=1,t=23,pt=2,l=2,sg=0:8 18:42:19.813 -> 3973 RFM95:SAC:SEND ACK,TO=84,SEQ=325,RSSI=-41,SNR=9 18:42:19.861 -> 4021 TSF:MSG:READ,84-84-0,s=0,c=1,t=23,pt=2,l=2,sg=0:-1 18:42:19.955 -> 4126 RFM95:SAC:SEND ACK,TO=84,SEQ=326,RSSI=-42,SNR=9 18:42:20.001 -> 4174 TSF:MSG:READ,84-84-0,s=0,c=1,t=23,pt=2,l=2,sg=0:6 18:42:20.094 -> 4279 RFM95:SAC:SEND ACK,TO=84,SEQ=327,RSSI=-41,SNR=9 18:42:20.142 -> 4327 TSF:MSG:READ,84-84-0,s=0,c=1,t=23,pt=2,l=2,sg=0:8 18:42:20.281 -> 4432 RFM95:SAC:SEND ACK,TO=84,SEQ=328,RSSI=-39,SNR=9 18:42:20.327 -> 4480 TSF:MSG:READ,84-84-0,s=0,c=1,t=23,pt=2,l=2,sg=0:-1 18:42:20.419 -> 4585 RFM95:SAC:SEND ACK,TO=84,SEQ=329,RSSI=-40,SNR=9 18:42:20.467 -> 4633 TSF:MSG:READ,84-84-0,s=0,c=1,t=23,pt=2,l=2,sg=0:11 18:42:20.560 -> 4738 RFM95:SAC:SEND ACK,TO=84,SEQ=330,RSSI=-40,SNR=9 18:42:20.607 -> 4786 TSF:MSG:READ,84-84-0,s=0,c=1,t=23,pt=2,l=2,sg=0:6 18:42:20.747 -> 4891 RFM95:SAC:SEND ACK,TO=84,SEQ=331,RSSI=-39,SNR=9 18:42:20.794 -> 4939 TSF:MSG:READ,84-84-0,s=0,c=1,t=23,pt=2,l=2,sg=0:-1 18:42:20.887 -> 5044 RFM95:SAC:SEND ACK,TO=84,SEQ=332,RSSI=-40,SNR=9 18:42:20.935 -> 5092 TSF:MSG:READ,84-84-0,s=0,c=1,t=23,pt=2,l=2,sg=0:13 18:42:21.027 -> 5197 RFM95:SAC:SEND ACK,TO=84,SEQ=333,RSSI=-40,SNR=9 18:42:21.075 -> 5245 TSF:MSG:READ,84-84-0,s=0,c=1,t=23,pt=2,l=2,sg=0:6 18:42:21.167 -> 5350 RFM95:SAC:SEND ACK,TO=84,SEQ=334,RSSI=-41,SNR=9 18:42:21.215 -> 5398 TSF:MSG:READ,84-84-0,s=0,c=1,t=23,pt=2,l=2,sg=0:-1 18:42:21.353 -> 5503 RFM95:SAC:SEND ACK,TO=84,SEQ=335,RSSI=-42,SNR=9 18:42:21.401 -> 5551 TSF:MSG:READ,84-84-0,s=0,c=1,t=23,pt=2,l=2,sg=0:16 18:42:21.496 -> 5656 RFM95:SAC:SEND ACK,TO=84,SEQ=336,RSSI=-42,SNR=9 18:42:21.541 -> 5704 TSF:MSG:READ,84-84-0,s=0,c=1,t=23,pt=2,l=2,sg=0:-1 18:42:21.636 -> 5809 RFM95:SAC:SEND ACK,TO=84,SEQ=337,RSSI=-42,SNR=9 18:42:21.682 -> 5857 TSF:MSG:READ,84-84-0,s=0,c=1,t=23,pt=2,l=2,sg=0:-1 18:42:21.822 -> 5962 RFM95:SAC:SEND ACK,TO=84,SEQ=338,RSSI=-41,SNR=9 18:42:21.870 -> 6010 TSF:MSG:READ,84-84-0,s=0,c=1,t=23,pt=2,l=2,sg=0:11 18:42:21.964 -> 6115 RFM95:SAC:SEND ACK,TO=84,SEQ=339,RSSI=-38,SNR=10 18:42:22.010 -> 6163 TSF:MSG:READ,84-84-0,s=0,c=1,t=23,pt=2,l=2,sg=0:-1 18:42:22.102 -> 6268 RFM95:SAC:SEND ACK,TO=84,SEQ=340,RSSI=-43,SNR=9 18:42:22.149 -> 6316 TSF:MSG:READ,84-84-0,s=0,c=1,t=23,pt=2,l=2,sg=0:-1 18:42:22.243 -> 6421 RFM95:SAC:SEND ACK,TO=84,SEQ=341,RSSI=-36,SNR=9 18:42:22.289 -> 6469 TSF:MSG:READ,84-84-0,s=0,c=1,t=23,pt=2,l=2,sg=0:142 18:42:22.429 -> 6574 RFM95:SAC:SEND ACK,TO=84,SEQ=342,RSSI=-36,SNR=9 18:42:22.476 -> 6622 TSF:MSG:READ,84-84-0,s=0,c=1,t=23,pt=2,l=2,sg=0:804 18:42:22.570 -> 6727 RFM95:SAC:SEND ACK,TO=84,SEQ=343,RSSI=-36,SNR=9 18:42:22.615 -> 6775 TSF:MSG:READ,84-84-0,s=0,c=1,t=23,pt=2,l=2,sg=0:629 18:42:22.709 -> 6880 RFM95:SAC:SEND ACK,TO=84,SEQ=344,RSSI=-34,SNR=9 18:42:22.758 -> 6928 TSF:MSG:READ,84-84-0,s=0,c=1,t=23,pt=2,l=2,sg=0:745 18:42:22.850 -> 7033 RFM95:SAC:SEND ACK,TO=84,SEQ=345,RSSI=-36,SNR=9 18:42:22.897 -> 7081 TSF:MSG:READ,84-84-0,s=0,c=1,t=23,pt=2,l=2,sg=0:896 18:42:23.038 -> 7186 RFM95:SAC:SEND ACK,TO=84,SEQ=346,RSSI=-36,SNR=10 18:42:23.086 -> 7234 TSF:MSG:READ,84-84-0,s=0,c=1,t=23,pt=2,l=2,sg=0:1042 18:42:23.178 -> 7339 RFM95:SAC:SEND ACK,TO=84,SEQ=347,RSSI=-36,SNR=9 18:42:23.225 -> 7387 TSF:MSG:READ,84-84-0,s=0,c=1,t=23,pt=2,l=2,sg=0:1150 18:42:23.317 -> 7492 RFM95:SAC:SEND ACK,TO=84,SEQ=348,RSSI=-38,SNR=9 18:42:23.365 -> 7540 TSF:MSG:READ,84-84-0,s=0,c=1,t=23,pt=2,l=2,sg=0:1227 18:42:23.504 -> 7645 RFM95:SAC:SEND ACK,TO=84,SEQ=349,RSSI=-37,SNR=9 18:42:23.552 -> 7693 TSF:MSG:READ,84-84-0,s=0,c=1,t=23,pt=2,l=2,sg=0:1265 18:42:23.644 -> 7798 RFM95:SAC:SEND ACK,TO=84,SEQ=350,RSSI=-39,SNR=9 18:42:23.691 -> 7846 TSF:MSG:READ,84-84-0,s=0,c=1,t=23,pt=2,l=2,sg=0:1306 18:42:23.785 -> 7951 RFM95:SAC:SEND ACK,TO=84,SEQ=351,RSSI=-38,SNR=9 18:42:23.832 -> 7999 TSF:MSG:READ,84-84-0,s=0,c=1,t=23,pt=2,l=2,sg=0:1332 -
Have you setup a node to talk to the Gateway yet?
And if so is it the other Heltec device? I have a recollection of ESP32 devices not working with sketches with "Sleep" in them but sleep can be replaced with "wait" not great for battery nodes but will do for testing.
-
Have you setup a node to talk to the Gateway yet?
And if so is it the other Heltec device? I have a recollection of ESP32 devices not working with sketches with "Sleep" in them but sleep can be replaced with "wait" not great for battery nodes but will do for testing.
-
@FarmerEd Thanks for the information. Sorry I was traveling and just saw your posts. I did try a node but I think I was still in my setup confusion so it may not have been transmitting correctly. I will check and set one up. It is also a Heltec device but is not sleeping right now.
@toigo Thanks for the information on no sleep yet. I was going to use it with batteries so now I will need to rethink this. -
I have now tried a sensor node based on the same Heltec chip and it is stuck in a Find Parent loop. I have the gateway setup matching @FarmerEd post.
The serial output is below
67 TSM:INIT 68 TSF:WUR:MS=0 69 RFM95:INIT 76 RFM95:INIT:PIN,CS=18,IQP=26,IQN=26,RST=14 92 RFM95:PTX:LEVEL=13 94 TSM:INIT:TSP OK 96 TSM:FPAR 97 RFM95:SWR:SEND,TO=255,SEQ=0,RETRY=0 149 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK: 2157 !TSM:FPAR:NO REPLY 2159 TSM:FPAR 2160 RFM95:SWR:SEND,TO=255,SEQ=1,RETRY=0 2212 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK: 4220 !TSM:FPAR:NO REPLY 4222 TSM:FPAR 4223 RFM95:SWR:SEND,TO=255,SEQ=2,RETRY=0 4275 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK: 6283 !TSM:FPAR:NO REPLY 6285 TSM:FPAR 6286 RFM95:SWR:SEND,TO=255,SEQ=3,RETRY=0 6338 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK: 8346 !TSM:FPAR:FAIL 8347 TSM:FAIL:CNT=1 8349 TSM:FAIL:DIS 8351 TSF:TDI:TSL 8352 RFM95:RSL 18354 TSM:FAIL:RE-INIT 18356 TSM:INIT 18357 RFM95:INIT 18364 RFM95:INIT:PIN,CS=18,IQP=26,IQN=26,RST=14 18379 RFM95:PTX:LEVEL=13 18381 TSM:INIT:TSP OK 18383 TSM:FPAR 18384 RFM95:SWR:SEND,TO=255,SEQ=0,RETRY=0 18437 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK: 20444 !TSM:FPAR:NO REPLY 20446 TSM:FPAR 20447 RFM95:SWR:SEND,TO=255,SEQ=1,RETRY=0 20500 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK: 22507 !TSM:FPAR:NO REPLY 22509 TSM:FPAR 22510 RFM95:SWR:SEND,TO=255,SEQ=2,RETRY=0 22563 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK: 24570 !TSM:FPAR:NO REPLY 24572 TSM:FPAR 24573 RFM95:SWR:SEND,TO=255,SEQ=3,RETRY=0 24626 ?TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK: 26633 !TSM:FPAR:FAIL 26634 TSM:FAIL:CNT=2It seems that the chip is not transmitting. I have been using Home Assistant for 3 years but just now I am trying MySensors. I have added the integration in HA and connected it the gateway.
I did try to set a Parent but it just continues in another endless loop. I don't know where to go from here.
-
I am using the Heltec LoRa32 V2 of the board. IRQ number is set to 26 and IRQ pin is also 26. I don’t understand why the code is reporting no acknowledgement from the radio. I see ?TSF and ?TSM in the log. Is that normal for you?
-
Can you post your node and gateway sketch?
I think you should start with an example sketch, e.g. you don't need the heltec defines I recall.@electrik said in Heltec Lora32 V2 Gateway:
Can you post your node and gateway sketch?
I think you should start with an example sketch, e.g. you don't need the heltec defines I recall.Yes both sketches would help to see where any issue might lie.
The following is a sketch I have previously used with the Heltec device as a Node. It's for a distance sensor but it may give some guidance.
#define MY_DEBUG // Enable and select radio type attached #define MY_RADIO_RFM95 #define MY_DEBUG_VERBOSE_RFM95 #define MY_RFM95_RST_PIN 14 #define MY_RFM95_CS_PIN 18 #define MY_RFM95_IRQ_PIN 26 #define MY_RFM95_IRQ_NUM MY_RFM95_IRQ_PIN #define MY_SOFT_SPI_MOSI_PIN 27 #define MY_SOFT_SPI_SCK_PIN 5 #define MY_RFM95_FREQUENCY (RFM95_868MHZ) #define MY_RFM95_MODEM_CONFIGRUATION RFM95_BW125CR45SF128 #define MY_NODE_ID 44 #include <SPI.h> #include <MySensors.h> #include <NewPing.h> #define SENSOR_NAME "Distance Sensor" #define SENSOR_VERSION "1.1" #define CHILD_ID 1 // Each radio node can report data for up to 254 different child sensors. You are free to choose the child id yourself. // You should avoid using child-id 255 because it is used for things like sending in battery level and other (protocol internal) node specific information. #define TRIGGER_PIN 3 // Arduino pin tied to trigger pin on the ultrasonic sensor. #define ECHO_PIN 4 // Arduino pin tied to echo pin on the ultrasonic sensor. #define MAX_DISTANCE 300 // Maximum distance we want to ping for (in centimeters). Maximum sensor distance is rated at 400-500cm. unsigned long SLEEP_TIME = 21600000; // Sleep time between reads (in milliseconds) 900000 = 15min, 21600000 = 6h NewPing sonar(TRIGGER_PIN, ECHO_PIN, MAX_DISTANCE); // NewPing setup of pins and maximum distance. MyMessage msg(CHILD_ID, V_DISTANCE); int lastDist; bool metric = true; void setup() { metric = getControllerConfig().isMetric; } void presentation() { // Send the sketch version information to the gateway and Controller sendSketchInfo(SENSOR_NAME, SENSOR_VERSION); // Register all sensors to gw (they will be created as child devices) by their ID and S_TYPE present(CHILD_ID, S_DISTANCE); } void loop() { // use the build-in digital filter to discard out of range pings int echoTime = sonar.ping_median(10); int dist = metric?sonar.convert_cm(echoTime):sonar.convert_in(echoTime); Serial.print("Ping: "); Serial.print(dist); Serial.println(metric?" cm":" in"); if (dist != lastDist) { send(msg.set(dist)); lastDist = dist; } wait(SLEEP_TIME); } void setup() { } void presentation() { // Send the sketch version information to the gateway and Controller sendSketchInfo(SENSOR_NAME, SENSOR_VERSION); } void loop() { } -
Success! In all my testing and trying new settings, I missed that I had commented out on the gateway the frequency setting. It was noobie mistake and I want to thank all of you for your help. I ended up using @FarmerEd's sketches to get my gateway and sensor to work.
Thanks again.