Big ESP32 + SX127x topic part 2

Ok, yesterday I decided to do a sort of wardriving after work on my way home to see if my Heltec is actually sending out a signal. Driving near one gateway location resulted in 14 Frame Ups… but no data in my console. So, it definitely has to do with signal coverage. I’m using a proper 868 MHz antenna. Does anyone know

  1. how to “tune the spreading factor” or “increase the tx power”?
  2. Why I don’t see any data in my ttn console while there are 14 Frame Ups? If it is due to missing or incomplete payload decoder/converter, can someone provide an example for both the ttn_abp.ino and the ttn_otaa.ino examples?

Thanks again.

Ok, kit is now outside on a table and… tadaaa… I’m receiving data on my TTN console.

But maybe one of you more experienced IoT gurus can create a full workshop around the ttn_abp/ttn_otaa examples including a Payload Converter/decoder or whatever to complete the example exercise.

Regs, Jean-Pierre

1 Like

Good to hear that you succeeded in getting it to work.

It would indeed be nice to have some complete walk-through’s. But at least the basic steps are already provided in this topic’s start (but without the payload stuff): which libraries, which settings and which sketch to use for getting a basic node up and running.

The TTGO boards use SX1276 chip, this has different RF output pins: RFO_HF/LF (depending on frequency band) and PA_Boost.

In the LMIC code power switching between this pin is done in radio.c, the part of code looks like this (note- i tweaked it a little):

static void configPower () {
#ifdef CFG_sx1276_radio
    // no boost used for now
    s1_t pw = (s1_t)LMIC.txpow;
    if(pw > 15) {
        pw = 15;
    } else if(pw < 2) {
        pw = 2;
    }
    // check board type for BOOST pin
    writeReg(RegPaConfig, (u1_t)(0x80|(pw&0xf))); // sets PA_BOOST pin (original lmic)
    //writeReg(RegPaConfig, (u1_t)(pw&0xf)); // sets RFO pin (patched lmic)
    writeReg(RegPaDac, readReg(RegPaDac)|0x4); 

Original LMIC uses PA_BOOST pin. I tried to switch to RFO_HF pin. This caused on the TTGOv2 module that there was no RF power at all, or to be more precise, because i do not own a spectrum analyser: no packets at all seen on the gateway.

Unfortunately we don’t know the schematic of the TTGOv2 board here, but i assume RF power is taken from PA_BOOST pin only. So, this way it should be possible to reach the 20dB output power from the SX1276 when switching it in the PA_BOOST and maxium TX power mode. If the 20dB then do not show up at the antenna of the board, it means the board has bad RF output path.

I opened two antennas which came with the Heltec and TTGOv2 boards.

They are not identical, the length of the coils is slightly different.
One has a short cut caused by a loose piece of solder in the SMA plug (see picture).

So it maybe useful to examine those antennas before use. The plastic cap can easily be removed and reattached to the SMA plug, it’s not glued.

IMG_20180224_181000

IMG_20180224_180816

2 Likes

I found the coils to be (nearly) identical: The BIG and SMALL ANTENNA topic part 1
It is the antenna length below the coil that is different. I measured a difference of two millimeter. On the picture the difference between your antennas appears even more.

Goodmorning everyone
I successfully managed to run my ESP32 Heltec with the LMIC-Arduino library
can be found here: https://github.com/matthijskooijman/arduino-lmic .

After setting the keys for ABP in the sample file ttn-abp.ino ,
on the gateway I receive the messages, but they are not comtinues,
in TTN console application I receive data every 8 frames

Output example
image

Is there a setting to be modified to be able to send all frames, in sequence?
thanks

Hello All !
jpg_640x640

if you have 3d printer, you can print shell for TTGO ESP32 LORA.
liligo send me this (printed version can’t buy now :frowning: )
https://goo.gl/CyRpNz

are you sending to fast ?

Hi @BoRRoZ
every 30 seconds

how big is the payload then in total ?
I don’t get it why it skips exactly 8 frames everytime… must be something in your code

Single Channel Gateway maybe?

2 Likes

@BoRRoZ
I am at the first attempts of operation with Esp32 Heltec

I am only installed the library https://github.com/matthijskooijman/arduino-lmic
and I using the sample ttn-abp.ino sketch in the library

I have not modified anything in the code, except the fields NWKSKEY, APPSKEY , DEVADDR and correct the lmic_pinmap.

I’m using Single Channel Gateway Raspberry + LoraBee

I did a test (do not ask me why I did it … I do not know, just a test), but the result is strange
I commented on the following lines
image

I went from 8 frames to 3
image

1 Like

Not doing any configuration will make your node use the 3 default channels. The single-channel gateway will be listening to one of them, so on average you’ll get one-third of the messages.

(To make a test node only use one channel, see Can LMIC 1.6 be set up to use a single channel and SF?)

3 Likes

Problem of transmitted frames lost: SOLVED :+1:

Following the instructions suggested by @arjanvanb
image

Thank you all for your help

But remember: having a node sending on only 1 channel is outside of LoRaWAN standard and not good for the network / gateway capacity.

1 Like

You’re right … I’m making gateways and sensors as cheap as possible, for hobbies.
If the experimentation is successful I will switch to something standard Lorawan :sunglasses:

For the ESP32 versions of SCG which of the DIO pins of the LoRa device are needed, or does it just vary with the implementation ?

I have seen the ESP8266 SCG and that needs DIO0, DIO1 and DIO2 in a diode OR arrangement.

I also note that one Pi SCG uses only GPIO0 and another that appears to uses GPIO0, GPIO1 and GPIO5.

The use of DIO0 and DIO1 I can understand (also used for LMIC nodes) but DIO2 is FhssChangeChanel in LoRa and direct modulation in FSK so is that being implemented in the Gateways ?

Just joined the community. This is my 1st contribution.
I’ve designed a 3d Printed Case for TTGO LilyGO V2

Here’s the link:

Feel free to comment. I will try to fix eventual errors.

A suggestion: It would be great if there would be a 3D Printing thread/category.

9 Likes

welcome… and you can start a 3D printing thread if you feel like it.
printertypes , tips and tricks, models related to TTN ect. :wink:

1 Like