Corrupted in loan pyTrack

Hi Graham,
I created a new folder and download ALL files.
Downloading project (main folder)…
Not safe booting, disabled in settings

Reading files from board
  Found 6 new files. Do you want to download these files into your project (C:\Users\neil\Pycom\Code\CE_pyTrack - main folder), overwriting existing files?
  (Use the confirmation box at the top of the screen)
  Downloading 6 files...
  [1/6] Reading
  [2/6] Reading
  [3/6] Reading
  [4/6] Reading lib/
  [5/6] Reading lib/
  [6/6] Reading lib/
  All items overritten
  Download done, resetting board...
  OKets Jun  8 2016 00:22:57

  rst:0x7 (TG0WDT_SYS_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
  configsip: 0, SPIWP:0xee
  mode:DIO, clock div:1
  entry 0x400a059c
  Traceback (most recent call last):
    File "", line 67
  SyntaxError: invalid syntax
  Pycom MicroPython 1.18.1.r1 [v1.8.6-849-b0520f1] on 2018-08-29; LoPy4 with ESP32
  Type "help()" for more information.

It is coming up with a syntax error in the
Using ATOM, when I look at lines 65 to 72, I see the following:



N��ee��	қ�[�[�ˋ���B�X��K��bled(RGB_OFF)

I have put the below code from GitHub back in and trial it on the way home.

authentication = (unhexlify(LORA_OTAA_EUI),

lora.join(activation=LoRa.OTAA, auth=authentication, timeout=0)

while not lora.has_joined():


1 Like

Hi NW,

Could you please use the preformatted text when posting code? It looks like this ‘</>’

Its a bit hard to tell what’s going on with what you shared.

Try replacing that line with something like this:

# set LED to red

Hi Stephen,
I have formatted the post.
There were quite a few lines (6) messed up and required replacing.
The black diamonds with questions marks “��” etc etc, is exactly how the code looked in VS Code Editor and ATOM.

If I had to hazard a guess, it’s because of the file that I setup for you, still has the ###### symbols for the app EUI and Key.

You’ll need to setup your own TTN Mapper app on your TTN console, along with the TTN Mapper integration. Finally, update settings so that the device has access to your app.

And if the file is somehow corrupted, then you can grab a fresh copy of the project here

Hi Graham,
I copied from Github and it works now.

I have driven around and added a few more points (from the Charlestown gateway) to the site.
Unfortunately, my Gateway is not displayed on this site. The ttn mapper app on my phone, also does not show my gateway. So I have no idea on the cover area of my gateway.
From my computer I can see the gateway via thethingsnetwork and see traffic.
In addition I can also see the application data for the pytrack mapper and my other Lopy4 as it talks to my gateway. So I know the gateway is operational.
It is a shame that these aren’t being included in the site data.


Hi Neil,

I beleive you are a collaborator already for that uGateway. If so, you can update the Lat/Long in the TTN Console.

If you are not a collaborator then let me know what the last 6 digits are of the uGateway EUI, and I’ll fix that.

Hi Graham,
I believe I am already a collaborator for the Gateway.
I changed the location a month ago.

It used to appear on
It like a few others (Alan’s as an example) have disappeared.


TTN Mapper will drop data for different reasons, one example is if the Gateway moved more than 30 meters (which I suspect would be the case when editing the gateway Lat/Long from 0,0 to whatever it really is).

The TTN Mapper clean-cycle is around 30 days from memory, though it’s entirely independent of TTN and the code-base can change at any time depending on how they want to run things. Perhaps try again in a couple of weeks, give the TTN Mapper data time to adjust to the setting changes on uGateway.

Even fresh results with a properly configured Gateway can take a couple of days for TTN Mapper to “show” the gateway location.