Big ESP32 / SX127x topic part 1

I am a complete newbie so be patience but what did you mean by setup a few other things like frequency and save? I did manage to get the sketch compiled without an error so just need a little help on this

What do i need to alter to get the gateway up ?
And with sketch do i need to build a (node)sender to this gateway ? so i can sent stuff

Thanks @mrme
I fixed the reversed keys for the first two (APPEUI and DEVEUI).
But I’m still getting the same result:

rst:0x1 (POWERON_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0010,len:4
load:0x3fff0014,len:732
load:0x40078000,len:0
load:0x40078000,len:11572
entry 0x40078a14
Starting
Packet queued
4358: EV_JOINING
3604582: EV_JOIN_FAILED
4496630: EV_JOIN_FAILED

Could be the problem is in the gateway?
Any other verification to discard possible causes?
Thanks in advance

Hi @Atilius - not sure how you reached the point you are at now. Are you using the Heltec board? If so, perhaps you could try the code I posted earlier in this thread (post 75) and make sure you link with the LMiC library from here: https://github.com/matthijskooijman/arduino-lmic

as mentioned in a previous post i also have a couple of esp32 433mhz oled… The only problem is the Gateway at 433mhz and not anything else. 433.hz has 6 db better (link budget) (talking about frequency and not actual power which might be less for 433 mhz) as compared to 866mhz…

I am really interested to learn how you setup this 433mhz gateway…!

Today i have tested the two nodes (433mhz) and even though there was no line of sight (among buildings in city centre) i managed to get a signal (while driving hanging the node on the rear view mirror + power from usb) almost 2 km! I will retest in the following days and tell you!

1 Like

It seems TTN is indeed processing whatever it gets forwarded. But as TTN has no frequency plan for EU433 you’re on your own here:

  • Other gateways and nodes will not know which frequencies to use.
  • TTN won’t know which frequency your node expects for downlinks in RX2.
  • TTN might not do any downlink at all (some plans have explicit channels for RX1 downlinks too, and are not using the same channel as the uplink).
2 Likes

Hi @nicbkw

Yes, I’m using the Heltec board 915mhz. I’m using the same library you mentioned. I also tried your sketch.
I’m still getting the same result: EV_JOIN_FAILED

In an earlier post you mentioned something about a “patch”. Is it really needed in this example. I didn’t get exactly what to change to apply it.
Could you please give more details.

Thanks again

…which recently got a new version number 1.5.0+arduino-2 to ensure the Arduino IDE etc can update now. For EU868 I did not need not patch it.

Hi @Atilius - It was necessary to apply a patch that polled events because originally Heltec docs mentioned only one DIO pin. The LMiC code requires at least two DIO pins. The patch became unnecessary when two more DIO pins were defined. So, don’t worry about the patch…
Sorry, but I have not needed to try working at 915MHz, perhaps you might find some help in this other thread? Arduino LMIC library updated

Just got missing SPIFFS.h file

C:\Users\XXXX\Documents\Arduino\libraries\ESP-sc-gway\ESP-sc-gway.ino:47:20: fatal error: SPIFFS.h: No such file or directory
Error compiling for board Heltec_WIFI_LoRa_32.
1 Like

I get that too, both with Arduino IDE and PlatformIO. Have not looked into it yet.
Maybe @kersing kan give a hint.

I’ve found that using a cloud storage location for “Sketch Location” doesn’t work - I have to use a folder on my PC harddrive.
Also, To make things work, I unzip’d Kersing’s file first, and manually imported the 2 folders to my PC as described in post 123.

Things I see in my PC

    • Execute Arduino IDE,
    • Make sure you are using the board “Heltec_WIFI_LoRa_32” (check via “Tools->Board:xx”
    • Press “Sketch->Include Library->Manage Libraries” and search for “SPIFFS” (to check if it is installed - as seen in pic).
      spiffs_library
  • Check you have the SPIFFS folder in your directory (should have been installed when you added ESP32 support?)
    “C:\Users\XXXX\Documents\arduino\hardware\espressif\esp32\libraries”

N.B. I didn’t find the SPIFFS folder anywhere else (e.g. in “C:\Program Files (x86)\Arduino\libraries” )

**(N.B. I’ve added this to Post 123)

I’ve updated post 123 to include both the gateway code and TX code for HelTec
Please feedback if it doesn’t work and needs altering.
It may be that things need to be re-installed ?

What source is the SPIFFS built-in library?
Can’t find it in mine…
I have downloaded the repo with Git GUI but I don’t see any SPIFFS inside the library folder of the esp32

Did you execute get.exe?
Open [ARDUINO_SKETCHBOOK_DIR]/hardware/espressif/esp32/tools and double-click get.exe ?

Yeah I did, but don’t see the SPIFFS. Also when I download the zip and extract the whole library and place it in the the esp32/library folder I get all kinds of errors. Missing files etc.

I think the problem must be when you are trying to install the ESP github stuff from

Try deleting the folder C:\Users\xxxx\Documents\arduino\hardware\espressif\esp32 and re-download the zip file again - but this time unzip the file using 7-zip (I find the standard windows “unzipper” fails sometimes :frowning: )
7-zip is here http://www.7-zip.org/

These are the folders I see on my PC
libs_in_ESP32

Thanks for the update I did get everything working complete with the node. single gateway is up and running on ttn and receiving node updates
Any idea how to improve signal strenght it is very weak could be the design of the board. I do get an rssi of -90 so that is not al to great even when the node and gateway are almost next to each other.
When i move the node a floor up it does not get received any more.
Used the aerial antenna that was bought with it
Any advice would be appreciated.

You should easily get good comms around a house.
Using 2 Heltec 866MHz modules (one a gateway and the other a TX), I get the following metrics.
N.B. I’m dangling the aerials over the table top so that both aerials are vertical). Be aware that for best transmission and reception, ensure that the each aerial is plugged correctly into its board and that they are always aligned (i.e.they are parallel to each other).

Dist       RSSI            COMMENTS
 4m        -72 to -78      No obstructions
25m        -100 to 107     5 thick stone walls

Thx for the update i will be doing more testing.
Any hints how to include sensor reading in the node.
I always used the loop to do things like that but i don’t know if that will work now

When using PlatformIO I can see that SPIFFS.h and SPIFFS.cpp exist in the standard packages/framework tree:

C:\Users\username\.platformio\packages\framework-arduinoespressif32\libraries\SPIFFS\src

But when compiling I get an error that the SPIFFS library is not found.