Big ESP32 + SX127x topic part 2


(Sveinutne) #692

I hope to get my TTGO LoRa32 V2.1 T3_1.5 or _1.6 today. I have a lot of stipid questions that might answer themself when I start to play with the board. If the board is delivered with the Paxcounter program preinstaled, how do I get the EUI number so I can register the device to TTN?


(Ha Sch) #693

I contacted LilyGO and got the right link to the actual code: https://github.com/cyberman54/ESP32-Paxcounter
I played with the code and compiled it again and all is fine. The display isn’t flipped anymore. You have to set #define DISPLAY_FLIP 0 in ttgov21.h to got a non flipped display.


(Ha Sch) #694
  • In your TTN account, create an application and link to a device
  • Download and install Atom and PlatformIO
  • Download the source code from the link in my previous post
  • Open Project in PlatformIO
  • Create loraconf.h from loraconf.sample.h and copy / paste your DEVEUI, APPEUI and APPKEY from your device in your TTN account
  • Choose your board in platformio.ini
  • Compile
  • Upload to you board
  • Lean back and wait for your device to join

(Hope I didn’t forgot a step)


(Sveinutne) #695

I did not get my TTGO today :frowning: so I got one more day to think. It was the DEVEUI I wonder how to get. I see TTN got a sketch -> Deviceinfo that will give it.


(Verkehrsrot) #696

The paxcounter software (if installed on the module) shows the DEVEUI on the OLED-display while the module is starting. Take a picture with your smartphone, look at it, and enter the DEVEUI in TTN console.


(Amedee) #697

I usually generate the DevEUI in the TTN console and use that…


(Verkehrsrot) #698

You can do so, you need to copy/paste the generated DEVEUI in file /src/loraconf.h and then build the code.


#699

It is better to generate a DEVEUI from a MAC address (if the device has one) than let the console create a random DEVEUI (but both will work).


(Amedee) #700

Agree.
Most of the devices I have can’t generate an Id which is guaranteed to be unique. So between a non unique ´hardware´ Id and the TTN one, I take the easy route.

But you are right, when the device has a unique MAC it is better to use it —I am just lazy.


#701

The ESP32 has one. :wink:
But indeed, letting the Console generate one is easier (unless you want to be able to uniquely identify your nodes).


(Ha Sch) #702

I installed the paxcounter on two devices: ttgov21 and ttgov2. On ttgov21 all is well, on ttgov2 the node is joining and had success, “joined” is shown in the OLED and I see the joining in TTN console. The first package with zero payload seems to appear in TTN console but on OLED of the node the package is queued. After a while OLED displays the message “Lora busy” and nothing else happens. What’s going wrong? I tried on 2 different ttgov2 boards with the same result.


(Ineedtoknow) #703

Hello everyone,
I would like to get a T-Beam module but I’d like to know if low power works on it (gps as well).
Any hardware issues with the latest version?


(Verkehrsrot) #704

on ttgov2 you need to wire DIO1 pin of LoRa module by soldering a piece of wire on the board. Read the hal file ttgov2.h !


(Verkehrsrot) #705

T-Beam is not a real low power device, missing features to switch off peripherals.


(Ha Sch) #706

Just to be sure: [wrong wiring deleted]
Right?


(Verkehrsrot) #707

No. You must wire “Lora_IRQ” (26) with “GPIO33” (33).

See ttgov2.h:

{1} Must be manually wired!
DIO1 is wired to a separate pin but is not wired on-board to pin/GPIO33.
Explicitly wire board pin labeled DIO1 to pin 33 (see TTGO V2.0 pinout).


(Ha Sch) #708

Only this connection and not more?
[wrong wiring deleted]


(Verkehrsrot) #709

yes, for paxcounter app only this 1 wire is needed.


(Ha Sch) #710

I connected the two pins but the problem is still the same: Lora busy


(Verkehrsrot) #711

I can’t help you further then. If it works with your TTGOv2.1 on the same LoRa Gateway it probably somehow will be caused by your TTGOv2.
Double check the wiring.
LoRa Busy usually means that the LMIC stack does not see TX COMPLETE events, or the duty cycle is reached. If the problem occurs after startup, it can’t be a duty cycle limit, so i assume that your board does not feed LMIC with TX COMPLETE events. This is the function of the DIO1 pin, labelled “Lora IRQ” on the pcb.

I have a TTGOv2 board up and running with paxcounter, after i placed the wire it worked. But maybe this pcb is not identical with your’s, there are different chinese versions on the market it seems…