TTGO T-Beam v1.1 & Arduino-LoRaWAN

Hi all, long time listener, first time caller… :wink:

I recently (well, roughly 2 months ago, but shipping times from China are currently horrible) bought a TTGO T-Beam listed as v1.0, but received a v1.1 - which i won’t complain about, but which may complicate things?

Anyways, so i cobbled together a sketch in PlatformIO using various examples, and so far it’s working as expected, except that it doesn’t join TTN. Power management is fine, i get a GPS fix and somewhat realistic data, but i’ve wrecked my brain (and fingers) the last two nights trying to get the node to join. All i get is this, over and over:

94383: EV_JOINING
94484: engineUpdate, opmode=0xc
197237: engineUpdate, opmode=0xc
197278: EV_TXSTART
197356: TXMODE, freq=868100000, len=23, SF=7, BW=125, CR=4/5, IH=0
512972: setupRx1 txrxFlags 00 --> 01
start single rx: now-rxtime: 3
513604: RXMODE_SINGLE, freq=868100000, SF=7, BW=125, CR=4/5, IH=0
rxtimeout: entry: 514131 rxtime: 513596 entry-rxtime: 535 now-entry: 5 rxtime-txend: 312375
575472: setupRx2 txrxFlags 0x1 --> 02
start single rx: now-rxtime: 4
576104: RXMODE_SINGLE, freq=869525000, SF=9, BW=125, CR=4/5, IH=0
rxtimeout: entry: 577911 rxtime: 576096 entry-rxtime: 1815 now-entry: 4 rxtime-txend: 374875
577932: processRx2Jacc txrxFlags 0x2 --> 00
577980: EV_JOIN_TXCOMPLETE: no JoinAccept

I’m pretty sure i have the DevEUI, AppEUI and AppKey set up properly (LSB, LSB, MSB), but i’m not sure if incorrect provisioning would even cause this error?

Either way, here’s the sketch and a (sample) config file that contains the provision data in the format matching my real data: https://git.faked.org/jan/bikebeam/-/tree/master/src

I’m rather confident that the pinMap is correct, according to the schematics: https://github.com/Xinyuan-LilyGO/LilyGO-T-Beam/blob/master/schematic/LilyGo_TBeam_V1.1.pdf

Oh, also notable: I don’t have a gateway. But i live in the middle of Berlin, Germany, and according to the map for the community here, my flat is covered by over a dozen of gateways, so i’m assuming i don’t need to set one up to get started, right? (I probably will, later on.)

So yeah, if anybody can give me a hint of what i might be doing wrong, it would be greatly appreciated! :slight_smile:

The frequencies look right, byte order looks right for MCCI-Catena, check your antenna of course. It’s really difficult to get something working for the first time in isolation (I’ve been where you are) where not much is known good, but at least you have the gateways surrounding you. If you have two of these then installing some LoRa sketches (for peer-to-peer comms) would help validate your hardware.

Can you try using ABP (instead of OTAA) as this takes one component (your device receiving a downlink) out of the equation?

Thanks, unfortunately i only have this single device, so no point-to-point testing for me. :slightly_frowning_face:

I went ahead an and tried the ttn-abp.io sketch from Arduino-LMIC, added the power management to bring up the transceiver, and this looks like it’s working, but i guess that’s because of the nature of the registration not requiring joining the network, as ABP is “pre-provisioning” the registration? (In my job the analogy would be DHCP vs. static IP, i guess?)

Here’s what the log looks like:

Starting   
AXP192 Begin PASS
RXMODE_RSSI
97063: engineUpdate, opmode=0x808
97138: EV_TXSTART
97216: TXMODE, freq=868100000, len=26, SF=7, BW=125, CR=4/5, IH=0
Packet queued
162831: setupRx1 txrxFlags 00 --> 01
start single rx: now-rxtime: 4
163462: RXMODE_SINGLE, freq=868100000, SF=7, BW=125, CR=4/5, IH=0
rxtimeout: entry: 163990 rxtime: 163455 entry-rxtime: 535 now-entry: 5 rxtime-txend: 62375
225330: setupRx2 txrxFlags 0x1 --> 02
start single rx: now-rxtime: 4
225962: RXMODE_SINGLE, freq=869525000, SF=9, BW=125, CR=4/5, IH=0
rxtimeout: entry: 227770 rxtime: 225955 entry-rxtime: 1815 now-entry: 4 rxtime-txend: 124875
227788: processRx2DnData txrxFlags 0x2 --> 00
227849: processDnData_norx txrxFlags 00 --> 20
228109: EV_TXCOMPLETE (includes waiting for RX windows)
228417: engineUpdate, opmode=0x900

But still the (newly created test) device says “Status: never seen” :slightly_frowning_face:

There is something similar going on with gateway status too - the real test is if any data is showing in the Data section - which automagically refreshes but it all disappears if you navigate away from the page. You can ameliorate this by using the Data Storage integration for the application - it will then save data for up to 7 days and there are simple tools you can use to retrieve this data.

Ideally you have a second device to test LoRa to LoRa to check the radios are functioning OK. Or use an SDR dongle to view the transmission to check radio waves are being generated. Or access to the gateway so you can see if it is hearing the transmission or just access to the gateways web console so you can see if the message is being accepted at the network level (but would then almost certainly show on the data page for the application).

As i mentioned before, i neither have a second device nor a gateway, or access to one… but i did have an SDR dongle laying around, and to me that looks like there are burst every ~10 seconds, walking across the frequencies/channels.
(These do not show up when i switch the T-Beam off.)

Oh, i flashed “ttgo-tbeam-ttn-tracker” for this, to be sure that it’s not my code that is at fault.

So i guess that means i just don’t have any coverage here, or could it be invalid credentials (which i’m pretty sure it’s not, by now)?

image

Either way, i’ve ordered a Dragino LPS8 now.

The home page for TTN has a map of gateways - there may be one close to hand you could get near to whilst waiting for your LPS8

Nick, you seem to be not reading my posts? As stated in the first one, according to the map my flat should be covered by at least a dozen gateways! :slight_smile:
So I was expecting that at least one of them would pick up my chirps…
But if I am lucky, my own gateway will show up tomorrow already. :wink:

Possibly, I don’t tend to re-read from the beginning each time and “I just don’t have any coverage here” sort of implies a lack of coverage but …

… what I meant was take your device to a gateways location - “you could get near to”. Preferably one with some details on it’s gateway and even better, antenna, as they indicate that the owner knows more than most.

Alright, i got my LPS8, setup was a breeze, and now my T-Beam is reporting fine with “ttgo-tbeam-ttn-tracker” - at least in the console.

So it was indeed only the lack of coverage - but that will change now. :wink:

1 Like