How lora network scanner?

is there a way to do a scan of what network is up in the air at my location?

does anyone have a arduino ide sketch for this
that I can use with a TTGO ESP32 LORA OLED V1

i can’t figure it out with my ttgo to log in to ttn

greeting Dirk

You can certainly listen for LoRa and LoRaWAN packets and from some of the detail figure out what LoRaWAN networks may be operational. But that only tells you who may be transmitting.

For TTN, it’s probably easier to look at the map on the home page that will show you if there are any TTN gateways active in your area.

dear Nick McCloud

I am unable to connect the ttgo with ttn.
I’ve already tried a few things but I can’t.
I’ve read several tutorials and tried them out, but I can’t get it to work.

so I am unable to check the wish site if anyone comes in
that is why I wanted to see if I am receiving a signal at my location.

according to ttn’s website there must be a network in my location.

greeting Dirk

Gateways rarely send downlinks, mostly because they can’t hear anything when they are transmitting.

So if you find code to listen for LoRa/LoRaWAN packets, it may be some time before you hear a gateway transmitting.

Ideally, you need to tell us what your TTGO is doing and we can advise you on your next steps. If it’s not reporting any errors, then apart from checking the antenna, getting up high, the best thing is to get closer to a gateway.

Just becuase there is one shown close by and typically with a nice ideal ‘coverage’ circle (a default setting in the console/map) that doesnt mean it can see where you are (building clutter, geography/topology etc. If you know approx location of the GW then take your node close by and test there…

…better yet invest in a cheap GW and add to the community coverage (e.g. TTIG, Dragino LPS8, RAkKetc…) that way you have more contol on your development activity (can see traffic on the GW console page etc.) and you contribute to the community coverage expansion :slight_smile:

If you post your approx. location some nice forumite might have a pop at predicting potential coverage (or not)! for you…

@Jeff-UK, for a change, a new forum user that has put his town in his profile - just west of Rotterdam central!

But my MacBook Air next to the fire pit can’t cope with the TTN home page so I can’t look!


first i want to know if it works and if i can work with it.
if so then I put a gateway outside and maybe in 3 places that I have access to.
my location is capelle aan den ijssel the netherlands europe
about 300 meters from Peter Dorsman The Things Network User

Tell us what your TTGO does - can you compile, can you download, can you see anything in the console - in Rotterdam I’d expect you to have TTN coverage, but we need to know what your device is doing first - programming it to listen for LoRa packets isn’t a typical thing, it’s so much easier to get a device that’s known to mostly work OK to work.

Yeh, saw that and terain very flat in that area with several GW’s potentially within 0.5-6km deending on exact location…was thinking more like location to approx street/block level then can see if any building clutter or e.g a raised railway or roadway on embankment that would ‘shadow’ location from GW etc.

@dirkambu if that close to Peter then assuming his GW live at the time (if he has two - an RPi build and a TTIG the Pi is offline as of this post) then you ‘should’ be in range, unless e.g. you are the wrong side of the railway nearby and it is masking as above if on an embankment! or there isnt some other large masking structure) in which case you need to start the usual node debugging processes - checking Ant connection, s/w status, serial port logging etc. perhaps contact him and ask if he is seeing your nodes join requests etc…or a bit of socially distanced collaborative debugging?! :wink:


i got this board

TTGO board

i am using this code

#include <TheThingsNetwork.h>
#include <TheThingsMessage.h>

// Set your AppEUI and AppKey
const char *appEui = "70B3D57ED0034BD0";

#define loraSerial Serial1
#define debugSerial Serial

// Replace REPLACE_ME with TTN_FP_EU868 or TTN_FP_US915
#define freqPlan TTN_FP_EU868

TheThingsNetwork ttn(loraSerial, debugSerial, freqPlan);

devicedata_t data = api_DeviceData_init_default;

#include <SPI.h>

#include <Wire.h>
#include "SSD1306.h"
//#include "images.h"

// Pin definetion of WIFI LoRa 32
// HelTec AutoMation 2017
#define SCK     5    // GPIO5  -- SX127x's SCK
#define MISO    19   // GPIO19 -- SX127x's MISO
#define MOSI    27   // GPIO27 -- SX127x's MOSI
#define SS      18   // GPIO18 -- SX127x's CS
#define RST     14   // GPIO14 -- SX127x's RESET
#define DI00    26   // GPIO26 -- SX127x's IRQ(Interrupt Request)

#define BAND    868E6  //you can set band here directly,e.g. 868E6,915E6
#define PABOOST true

unsigned int counter = 0;

SSD1306 display(0x3c, 4, 15);
String rssi = "RSSI --";
String packSize = "--";
String packet ;

void logo()
 // display.drawXbm(0, 5, logo_width, logo_height, logo_bits);

void setup()
  pinMode(16, OUTPUT);
  pinMode(25, OUTPUT);

  digitalWrite(16, LOW);    // set GPIO16 low to reset OLED
  digitalWrite(16, HIGH); // while OLED is running, must set GPIO16 in high


  SPI.begin(SCK, MISO, MOSI, SS);


  // Wait a maximum of 10s for Serial Monitor
  while (!debugSerial && millis() < 10000)

  debugSerial.println("-- STATUS");

  debugSerial.println("-- JOIN");
  ttn.join(appEui, appKey);

  // Select what fields to include in the encoded message
  data.has_motion = true;
  data.has_water = false;
  data.has_temperature_celcius = true;
  data.has_temperature_fahrenheit = true;
  data.has_humidity = true;

  display.drawString(0, 0, "LoRa Initial success!");

void loop()

  display.drawString(0, 0, "Sending packet: ");
  display.drawString(90, 0, String(counter));

  debugSerial.println("-- LOOP");

  // Read the sensors
  data.motion = true;
  data.water = 682;
  data.temperature_celcius = 30;
  data.temperature_fahrenheit = 86;
  data.humidity = 97;

  // Encode the selected fields of the struct as bytes
  byte *buffer;
  size_t size;
  TheThingsMessage::encodeDeviceData(&data, &buffer, &size);

  ttn.sendBytes(buffer, size);

  digitalWrite(25, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);                       // wait for a second
  digitalWrite(25, LOW);    // turn the LED off by making the voltage LOW
delay(5000);                       // wait for a second

I only get an error
fatal error: images.h: No such file or directory

but i don’t use that and can get it out of the code

if I can’t figure it out, I want to ask Peter if he wants to help me. I don’t know him but who knows.
There is no railroad track between me and peter.
maybe a tall building.
but there seems to be quite a bit of overlap between networks
so I should be able to send something

Before you start bothering Peter, your other post just now implies that you haven’t even got a program compiling, therefore not downloading, therefore unable to be a TTN device - you are a long long way from considering there is a problem with your board.

The SSD1306 will normally startup with some sort of picture that is defined in image.h - can you please uncomment that line and try compiling again?

Also, please can you edit your post before a moderator comes along to format the code section with the Blockquote which is the " on the mini-toolbar.

I have adjusted the post.
i uploaded the code without the ssd1306 code
I can’t find the right “images.h” anywhere
tomorrow I will write a new code myself based on this code
I was hoping to see some data on the TTN with this code.

As Nick says no point worrying about GW coverage until you have a system that works/is known good :wink:

If you struggle with this specific TTGO implementation/application use Forum search there are several others apps called out used by others with basic code on e.g. Github that will at least get you operational with a basic TTN connection to begin process… I dont use the TTGO myself so cant help you on specific s.

So, as requested before, what does the serial debug tell you is going on?

How did you get the Device EUI to enter in to the TTN device setup?

Are those not for use with an RN radio module? You node probably requires something LMIC based.

Your code snippet suggests you are using code for one of these:

vs code for the LillyGo TTGO? Overlap I’m sure but same build/pinouts/external pin mapping/features?

Likely also worth your while to use Forum search and specifically go read the long history in this thread (and its two predecessors)

1 Like

thanks for the info. i just wanted to fast.
I’m a little further now


it’s working. I don’t have a good network nearby.
so i drove to roterdam by car and there i immediately had data traffic on ttn. so it works.

is there a forum where they develop LoRa sensors/sketch?
i want to build a battery power guard with lora.
but I’m not sure where to start

greeting Dirk

Can you expand on this, it’s not clear what this may be.