Big ESP32 / SX127x topic part 1

Probably. When I last - successfully - tested one of those device I used LMIC and the arduino IDE.

We should make a version of that story specifically for the Wifi Lora Kit32 then, using the display instead of only the serial terminal.

When I try the LMiC with the Heltec 32 Lora, but I got stuck at EV_JOINING…
Am I doing anything wrong?
The nearest gateway is 300 meters away.
Is there a way to measure the strength of this signal?

ets Jun  8 2016 00:22:57

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:0x3fff0018,len:4
load:0x3fff001c,len:812
load:0x40078000,len:0
load:0x40078000,len:11392
entry 0x40078a9c
###########

Packet queued
104320: EV_JOINING

Nearest gateway from an agricultural school in the Netherlands

IMG_20171213_221813

I received the LoRa1276 modules from NiceRF.
Used on the esp32 core dev board, I’m getting 1.76 mA in deep sleep mode when I was getting 10 mA with vanilla Heltec board.

Still not in the uA range but it’s 5 times less power hungry.

My two cents.

2 Likes

“…We should make a version of that story specifically for the Wifi Lora Kit32 then, using the display instead of only the serial terminal…” - Take a look at post 75 in this thread :slight_smile:

1 Like

Hi @nicbkw
Thanks for the code on your previous post, i’m using this gateway as single channel gateway

but i’m getting stuck at EV_join_failed, i made all the changes on config.h to work on 915 Mhz
is there any chance you have the full code somewhere or any debug i might be missing?

Thanks in advance!

CurlyWurly THANKS SO MUCH POST 123 - I just spent my Friday night going through this thread and am now the happy owner of a Heltec TX LMIC sender :smiley:
Just one comment - as its a little confusing with other people talking MSB/LSB for the DevEUI’s - that all the KEYs in your code are in MSB!

For any newbees like me - you can get these all ready to paste from console.
DEVADDR/Device Address just copy the hex and add after the 0x in the code
NWKSKEY and APPSKEY click the eye (show code) then the <> (C-style), click the copy button and then use that to paste into the code (do not press the ⇆ button - check that your showing MSB before copying!)
image
Anyone know what we need to get this same code in OTAA?

1 Like

I’m new at TTN, only little experience.
@CurlyWurly: “Post 123” is working, thanks.

Does anybody could provide me full example code for the heltec-board with dht11-Sensor for TTN or a suitable link?

Had success with the Heltec (White, “Spring” WiFi Antenna). I had to add
#define CFG_eu868 1
#define CFG_sx1276_radio 1
to make OTAA work.

Regarding the LED hardware - what is the best way / simplest / reversible to basically “shut down” the charger circuit when it is not used (hopefully shutting down the agitated blinking LED)?

Regarding LiPo operations: has anybody tried this yet? How long does it run?

I assume when using deep sleep we would have to somehow save the OTAA state in the ESPs clock memory so it survives the sleep cycle?

Andreas

1 Like

Thanks for the cooking receipt. Works!

IMG_20171217_180225

Tried to activate the sensor node mode in the code by defining #define GATEWAYNODE 1 in ESP-sc-gway.h

This runs on an error when compiling _sensor.ino in this line:

int buff_index = buildPacket(tmst, buff_up, message, mlength, true);

could not convert ‘(uint8_t*)(& message)’ from ‘uint8_t* {aka unsigned char*}’ to ‘LoraUp’

1 Like

Exactly the same error here.

README.md file at https://github.com/kersing/ESP-1ch-Gateway-v5.0 says:

ESP32 Specifics / untested features:

  • GATEWAYNODE : use gateway as sensor node
  • REPEATER

Hi,

To add some infos about power consumption, here are my last tests:

  • First I validated my hibernation mode sketch with only esp32 (esp-wroom-32 module alone). I could achieve 4.5µA.

  • Then I added a LoRa1276 (from NiceRF) module, based on sx1276 with every passives needed. I could measure the different modes (continuous receive, idle, sleep). The lowest power consumption was 1.76mA in hibernation + LoRa sleep.

In the sx127x datasheet you can find the power consumption in sleep of about 1 µA. But this is not the consumption of the entire module. Somes guys found same trouble with RFM95: the TCXO crystal isn’t switched off so it drains energy even when the LoRa chip is off.

I am currently playing with RTC IOs. I think I’ll use a GPIO controlled mosfet to power on/off the LoRa module (including crystal). You can set a pin to hold the state even in hibernation (only RTC GPIOs…), thus powering the LoRa module though the mosfet even in hibernation, so you can use RTC timer or interrupt from LoRa to wake the esp32.

In conclusion, you won’t beat these 1.76mA on the Heltec LoRa dev board.

My two cents.

5 Likes

I’ve setup my first Lora system and i’m getting a maximum of 100m in a dense suburban environment with both antennas outdoors. Is this normal? how are people getting these huge ranges? I can get better range on a cheap walkie talkie

My equipment is based off two of these modules:

Aliexpress

I’m using the included antenna and setting my frequency to 915mhz in USA. I’m using a spreading factor of 12 of bandwidth of 7.8E3.

Any ideas?

I had trouble with range too. First problem was that the aerial cable was provided open-circuit (must have snapped inside), so tried another one. Next problem I think is the actual aerial that came with my aliexpress order. I’m going to try to find an alternative.

Anyone found a way to get these Heltec (or TTGO) boards to have a better, longer range signal? Maybe there are other faulty components, but I’ve got no idea how to test …

I assume it is the Aerial - as that is black magic for me. The software seems to work, the Laird gateway I’m connecting to has a very good long range signal with other boards (got a Microchip dev board with built in aerial that I can get several-km range from), so it comes down to the problem being between the ESP32 and gateway for me…

It is better/required to have the RF antenna connected when the board is powered on (and transmitting).
The RF transmitter needs a load to dissipate its power. Not sure if SX127x has any form of open antenna protection, or that open (unconnected) antenna may damage the (on-chip) RF circuitry.

Could somebody post example code for sensors like DH11, DHT22, DS18B20 or BME280 please? Still struggling with my spaghetticode.

Hi, I have followed your process and try to test it on my heltec esp32 OLED lora module, but I got an error on wpa.h, where should I locate this file?
following is the error message:

Arduino: 1.8.5 (Windows 8.1), Board: “Heltec_WIFI_LoRa_32, 80MHz, 921600”

In file included from C:\Users\Melody\Dropbox\Arduino_projects\libraries\ESP-sc-gway\ESP-sc-gway.ino:30:0:

sketch\ESP-sc-gway.h:250:28: fatal error: d:\arduino\wpa.h: No such file or directory

compilation terminated.

exit status 1
Error compiling for board Heltec_WIFI_LoRa_32.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

In post 123, please re-read the info. It tells you how to delete this part of the code, and replace it with a definition that contains your own SSID

Or you could create the file with contents. I used this construct to make sure I never accidentally put my WiFi keys on github.

Thanks you…I saw the password part, but missed to delete the “if” part…