This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
esp32-espidf-lora-quickstart [2026/08/25 09:33] sausage |
esp32-espidf-lora-quickstart [2026/09/28 01:43] (current) sausage [Creating and configuring the project] |
||
|---|---|---|---|
| Line 24: | Line 24: | ||
| 1. Open ESP-IDF 5.3.2 PowerShell | 1. Open ESP-IDF 5.3.2 PowerShell | ||
| Create a blank project with: | Create a blank project with: | ||
| - | idf.py create-project lorawan-sensor | + | idf.py create-project lora-project |
| If you're using an esp32 set it here. Ensure you set the right esp32 hardware, eg: esp32, esp32s2, etc | If you're using an esp32 set it here. Ensure you set the right esp32 hardware, eg: esp32, esp32s2, etc | ||
| Line 221: | Line 221: | ||
| So what happens if you get nothing, no light, nothing in the logs. A few things to check, many are elemental but please recheck them. Basics first!: | So what happens if you get nothing, no light, nothing in the logs. A few things to check, many are elemental but please recheck them. Basics first!: | ||
| - | * Check the frequency. Close is not good enough. | + | * Check the frequency, this is the major cause. Close is not good enough. If you get nothing... ever... look to this first. Even if you set the input correctly, make sure your library set it right. Check your number format. If the library doesn't support something like ''lora_get_frequency'', check registers 0x06 = E4, 0x07 = C4 and 0x08 = CC which is 915.075. |
| - | * Check the SF, BW, CR and Preamble. Check the values are correct as per the libary enums: https://github.com/nopnop2002/esp-idf-sx127x#advanced-settings | + | * Check the SF, BW, CR and Preamble. Getting these four wrong is the next most likely. Preamble never gets much of a mention but for picking up Meshcore packets, it's important. Check the values are correct as per the library enums: https://github.com/nopnop2002/esp-idf-sx127x#advanced-settings |
| - | * You can use the init message to test if the LoRa module is wired up correctly. Please note that if MOSI, MISO, NSS or SCK are wrong, you will get a failure. But if power/ground are missing, the module will still initialize. | + | * You can use the init message to test if the LoRa module is wired up correctly. Please note that if MOSI, MISO, NSS or SCK are wrong, you will get a failure. But if power/ground are missing, the HopeRF module will still initialize over SPI. |
| - | * Try it outside, though unlikely. LoRa has great penetration through walls and over great distances. | + | * Try it outside, though unlikely to help. LoRa has great penetration through walls and over great distances. |
| - | * Is the little antenna connected? Check it on a VNA. As long as it's around the target frequency of 915 Mhz you're good. You can get something from antennas being reasonably off so this is less likely a cause. | + | * Is the little antenna connected? Also check it on a VNA. As long as it's around the target frequency of 915 Mhz you're good. You should still be able to pick up a lot even if your antenna is a bit out of tune. So this is less likely a cause. |
| * Leave it running for a good 24 hours. | * Leave it running for a good 24 hours. | ||