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
how to “tune the spreading factor” or “increase the tx power”?
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?
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.
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.
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.
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
Is there a setting to be modified to be able to send all frames, in sequence?
thanks
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.
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
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 ?