Big ESP32 + SX127x topic part 3

Hi
I am sending my previously mentioned “sender” code (sender .txtSender.txt (2.7 KB)
)which successfully sends signals to my second board(receiver) . This code is working fine. Please let me know what pin configuration (code) should be followed in my board to run “ttn-abp.ino” according to this .
I mean how to correct the code
//For Heltec Wifi LoRa 32, TTGO LoRa and TTGO LoRa32 V1 use:
const lmic_pinmap lmic_pins = {
.nss = ??,
.rxtx = LMIC_UNUSED_PIN,
.rst = ??,
.dio = {/ dio0 / ??, / dio1 / ??, / dio2 / ??}
};

sorry to ask this type of silly things.
Thanks for your support.
jpy

This has already been answered/addressed.

READ the Topic Start (and my above responses).

Thanks for the support and prompt replays.

Hello,

Has anyone tried or found a library that works with MicroPython?
Do something similar to what Lopy teams do?

I’ll look forward for your answer.

Updated my TTGO v2.1 1.6 enclosure design. TTN logo is now up straight + all buttons and connectors exposed (including led lights).

1 Like

Hi, I recently bought a pair of TTGO32V20 and a TTGO-Beam. Am able to get direct-lora connections to work through the Arduino programming environment. Nice.
Am unable to get the TTGO32V20 working on TTN. Although I read all 3 topics (and a lot more) I guess I missed something.
My baseline is the coding by NicBKW (BIG ESP32 / SX127x topic part 1)
I wired D1 to pin 33
TTO32LORA
I made pin mapping as follows:
// Pin mapping
const lmic_pinmap lmic_pins = {
.nss = 18,
.rxtx = LMIC_UNUSED_PIN,
.rst = LMIC_UNUSED_PIN,
.dio = {26, 33, LMIC_UNUSED_PIN},
};
My TTN settings are as follow:
TTN_Stuff
Added DEVICE EUI and APPLICATION EUI as little endian (LSB first).
Coding:
static const u1_t PROGMEM APPEUI[8] = { 0xDE, … 0x70 };
static const u1_t PROGMEM DEVEUI[8] ={ 0xB6, … 0x00 };
static const u1_t PROGMEM APPKEY[16] = { 0x33, … 0x3A, 0x35 };

And it does not work. I believe error 17 “something else”.

I compiled PAXCounter from PlatformIO (unknown to PlatformIO, but I eventually managed to upload) and after some time I saw the green button “last seen …few minutes ago”. No payload though, but I am not interested in getting PAXcounter to work, just checking if there is a hardware failure. So there is not.

What am I missing?

[update]
Two screen shots, Unknown Event17 and Join Failed 17.
UnknownEvent17

JoinedFailed17

In your above screenshot, the AppKey is displayed in msb. Can you double check that?

The AppKey may probably be the issue here, but my advice is to always start with ABP (ttn-abp.ino) first as this will rule out any possible OTAA issues. If ABP works you know that at least the node (hardware and LMIC) is working.

2 Likes

In the picture you can see it reads LSB, so…

Where can I find the ttn-abp.ino?

Further more… thee are several LMIC libraries out there and I am confused which one to use.

No need to be confused, read the Topic Start.
(If you would need any other version then you will have a specific reason for that.)

Read the Topic Start.

1 Like

In the picture you can see it reads LSB, so…

I am confused, in your screenshot I am reading MSB, that’s why I said it was worth double checking

appkey

Using a Heltec LoRa32 V2 with PIN configuration as stated in

https://www.thethingsnetwork.org/forum/t/big-esp32-sx127x-topic-part-2/11973/843

the device appears to be sending properly, but TTN never receives anything. With a V1 Heltec device, everything is fine. Does someone have any working code for Heltec LoRa32 V2?

1 Like

Read the TOPIC START

The correct configuration parameters are specified in the Topic Start (and they normally work).

If you find any possible issues or missing information in the Topic Start then please share so I can fix it and update the topic start.

Update:
And for me: better read the new V2 pinout diagram. :blush:

Well, they don’t work for the V2 version of the Heltec device, at least not for mine. Do I have to assume that mine is broken?

@saglettn Is your V2 board some new version (see below)?


I have some questions about (new) Heltec Wifi LoRa 32 ‘V2’ boards:

  • Has a new Heltec Wifi LoRa 32 V2 been recently released that is different from the existing ‘V2’?
    (Heltec initially was not using V1 and V2 in the names or on the PCB, which is why I introduced version numbers V1 and V2 for existing Heltec boards earlier this year. Now in the V2 pinout diagram I do see V2 marked on top of the PCB.)

  • Is your V2 PCB explicitly marked with a version number?
    Is it like the version number shown in the V2 pinout diagram?

  • Are there any known differences?


In this post:

@saglettn mentions a ‘new’ pinout for the Heltec V2.
On the pinout I see “V2” marked on the PCB but I see no pinout differences when comparing it to the previous Heltec Wifi LoRa 32 pinout diagram (the one mentioned in the Topic Start). Only the board picture seems to have been updated. DIO0, DIO1 and DIO2 are still not listed in the new pinout so it’s impossible to see if their pinouts/connections have been changed (DIO0 is still called LoRa_IRQ in the V2 diagram). The V2 diagram also contains a sloppy error: the legenda has been moved to the right but ‘Button’ and ‘Touch1’ which belong to GPIO0 have also been moved - incorrectly. So how reliable is the V2 diagram?

In this post:

@Verkehrsrot states DIO1 = 34 and DIO2 = 35.
@saglettn confirms this works. The values for Heltec ‘V1’ and ‘V2’ have been DIO1 = 33 and DIO2 = 32.
Has Heltec changed this on a new version of their boards?
YES, see further below.

Thanks for getting into those details.

I have a V1 Heltec device, which works perfectly fine with the .dio = {/dio0/ 26, /dio1/ 33, /dio2/ 32} setting from topic start.

My V2 Heltec device has printed “V2” on the PCB, where “WiFi LoRa 32” was printed on the V1, i.e., on the top side where the OLED is. I think they’re manufacturing it since August 2018.

With this V2 Heltec device,

  • when I use my original working code from the V1 device, it just hangs on scheduling the packet and never sends it. Thus I assume that something must have changed on the hardware side.

  • when I use the .dio 34, 35 setting posted by @Verkehrsrot, it looks like the packet is sent, even a TX_COMPLETE event is triggered, but it doesn’t get trough to the gateway and TTN (I have my own multi-channel gateway 10m away and it works perfectly fine with my other devices, and use the external antenna that is shipped by Heltec, so I’m confident it’s not a range issue).

Am I maybe missing some wiring/soldering required that was not necessary with the V1 Heltec device?

I have a one year old Heltec Wifi LoRa 32 ‘V2’ as pictured in the topic start.
That one runs fine with the configuration parameter values described in the topic start.
So, apparently Heltec has made some changes (or there is an issue with your board).

Are you using OTAA?
Are you using one of the standard examples (ttn-otaa.ino, ttn-abp.ino) or a custom sketch?

when I use my original working code from the V1 device, it just hangs on scheduling the packet and never sends it.

That sounds like a DIO (mis)configuration issue.

when I use the .dio 34, 35 setting posted by @Verkehrsrot, it looks like the packet is sent, even a TX_COMPLETE event is triggered, but it doesn’t get trough to the gateway and TTN (I have my own multi-channel gateway 10m away and it works perfectly fine with my other devices,

When using the ttn-otaa.ino example the TX_COMPLETE normally only fires when the OTAA join was successful. OTAA join can only be successful if the connection to the gateway and the TTN backend work successfully.

Best to start with ABP / ttn-abp.ino to rule out possible OTAA issues.

Are you sure everything on the node and backend is configured correctly?

Am I maybe missing some wiring/soldering required that was not necessary with the V1 Heltec device?

Soldering was not required for V1 and the ‘old V2’ (without the V2 marking on the PCB).
Whether manually connecting/soldering DIO ports (board pins or solder pads) to GPIO ports (board pins) is required depends on possible changes. You would need to find out if and which LoRa DIO’s are actually connected to GPIO ports of the ESP32. This could be done with a multimeter with very fine measuring tips.
But if that would be necessary (like with TTGO V2+ boards) then the board would need to have board pins that are only used for DIO ports, or solder pads on the PCB (usually clearly marked). From the V2 diagram this appears not to be the case. But my experience with these diagrams is that they are often not reliable an not (frequently) updated.

FYI, LMIC use of DIO ports: ABP uses/requires DIO0, OTAA requires both DIO0 and DIO1. DIO2 is not used for LoRa.

The V2 I have is presented with a picture under http://www.heltec.cn/project/wifi-lora-32/?lang=en . You can see the “V2” printed on the PCB next to the antenna connector there.

I use ABP, and have 6 other nodes in the same TTN app, which all work fine. So I’m never sure that everything is configured properly, but I am pretty confident. :slight_smile: Seriously, this V2 Heltec is the only LoRa device I have that ever gave me serious trouble.

I’ll check the DIO / GPIO port connections.

According to Heltec’s pinout documentation:

DIO0: GPIO 34
DIO1: GPIO 35

Heltec’s pinout file is called WIFI LoRa 32(V2) .pdf. The documentation at the top of this topic links to a different pinout. In this topic it’s listed for a Heltec Wifi LoRa 32 V2 board. But it seems to be the same picture as the one that Heltec calls WIFI LoRa 32 .pdf (see here). Do more than two versions of this board exist? Or is the above link incorrect?

I totally overlooked the DIO0: GPIO 34 and DIO1: GPIO 35 in the new V2 pinout diagram. :blush:

The new V2 pinout diagram is still not correct however. DIO0 appears still listed as “LoRa_IRQ” and probably “DIO0” should be DIO1 and “DIO1” should be DIO2. Another possibility is that the labels “DIO0” and “DIO1” are correct and the “LoRa_IRQ” label is a leftover that was forgotten to be removed from the diagram. I don’t have the hardware to verify these assumptions however.

The new board which Heltec now calls V2 is actually V3.
The first ‘V1’ board is shown in the Topic Start and so is ‘V2’.
These version numbers were introduced by me, not by Heltec (as already mentioned in the Topic Start).
While Heltec had different board before, they were not using version numbers.

The impression I get is what I called V1 is only available for 433MHz and what I called V2 is only available for 868/915MHz and Heltec (now) calls both these boards ‘V1’: V1 433MHz and V1 868MHz. Even while they are different versions, not just their LoRa frequencies but also the implementation of the Wifi antenna and PCB.

To prevent future confusion the naming and version numbers used in the Topic Start need to be updated (soon) to reflect Heltec’s current names and version numbers.

I hope this clears things up.