LoRa Controllers Added #134
Replies: 6 comments 38 replies
-
@aviateur17 besides disabling ACK for broadcasts, do you see any issues with my LoRa changes? I pretty much just copy/pasted the gateway version of getLoRa() over the node version, then made some tweaks to make it work. |
Beta Was this translation helpful? Give feedback.
-
@timmbogner, I have some additional LoRa functionality that I'd like to add to the project.
If that works for you I'll submit the PRs within the next few days. Jeff |
Beta Was this translation helpful? Give feedback.
-
Probably another off topic comment but since the code was split into different modules it would be nice to get all those ifdefs out of the functions and at a higher level like at the #include level. I was trying a bit of that last night as I was writing the NTP code and it would involve a bit of work so that will probably also be some goal of mine. Having those inside functions are distracting. I know some of that is not avoidable but I'd like to get as much out of the code as possible. |
Beta Was this translation helpful? Give feedback.
-
@timmbogner, I have a question on LoRa addressing. It seems that the LoRa node addresses are randomly picked. I'm trying to understand the code below in fdrs_gateway_lora.h: That seems to be a fixed LoRa address used below in that file for sending asynchronous LoRa buffer data - Line 500: If LoRa addresses are random I'm not understanding how this was intended to work. I know the Reading IDs are fixed and manually added but transmitLoRa doesn't send data to the reading ID it sends to the LoRa node address. |
Beta Was this translation helpful? Give feedback.
-
I’m having issues with the LoRa communication. All compiles fine. MQTT gateway connects to MQTT server fine. When sending MQTT commands to 0_MQTT_Gateway, from MQTT server: What am I missing, to make MQTT Gateway send data to the LoRa controller ? Here are my config files. //Addresses #define ESPNOW_NEIGHBOR_1 0x00 // Address of ESP-NOW neighbor #1 // Interfaces // Routing // LoRa Configuration #define LORA_TXPWR 5 // LoRa TX power in dBm (: +2dBm - +17dBm (for SX1276-7) +20dBm (for SX1278)) //#define CUSTOM_SPI #define FDRS_DEBUG // Enable USB-Serial debugging LoRa_Controller : fdrs_node.h #include <fdrs_globals.h> #define READING_ID 2 //Unique ID for this sensor //#define USE_ESPNOW // LoRa Configuration #define LORA_TXPWR 5 // LoRa TX power in dBm (: +2dBm - +17dBm (for SX1276-7) +20dBm (for SX1278)) |
Beta Was this translation helpful? Give feedback.
-
I’m struggling a bit with the LoRa_Controller example. My goal is to let a MQTT message trigger a relay, using LoRa technology. I am starting from the 0_MQTT_Gateway and LoRa_Controller examples. Here is my setup: Message from MQTT server: [{"id": 2,"type": 0,"data": 1}] My Issue is that the LoRa_Controller callback function “fdrs_recv_cb“ doesn't get called when the 0_MQTT_Gateway broadcasts the message. What am I missing, to get the callback function “fdrs_recv_cb“ called ? fdrs_gateway_config.h: // Interfaces // Routing fdrs_node_config.h: |
Beta Was this translation helpful? Give feedback.
-
I have added the ability for a gateway to send a LoRa broadcast packet (addressed to 0xFFFF) via
broadcastLoRa()
. LoRa nodes are now able to listen for broadcast packets, and check them for any reading IDs they're subscribed to. There is no peer registration for LoRa as there is in ESP-NOW, but you do need to run addFDRS();One change to note is that addFDRS() now only needs to be given the function name, no timeout. So it'll be:
addFDRS(fdrs_recv_cb);
At this moment there are small things to polish up, like disabling ACK for broadcasts. I still want to encourage folks to try this and send me feedback if possible!
@lamasseriadipolverara
Beta Was this translation helpful? Give feedback.
All reactions