The Things Node - Central

  • this is the central topic for all questions and answers regarding the The Things Node

getting started : https://www.thethingsnetwork.org/docs/devices/node/

Hey everyone! Just got my TTN Gateway. Wondering if someone could share some quick pointers in how to change the ThingsNode transmit power and spread factor settings. Iā€™m running the basic sketch right now but nowhere in the library files or the sketch does it look like the power and sf is getting set. Documentation regarding this topic seems to be sparse. Thanks for the help.

Hi,

I followed the instructions for setting up the Things Node following the Quick Start guide. Iā€™m now trying to use it on batteries to assess the range of my gateway. Unfortunately, I can only briefly see the Things Node connect to the gateway, and Iā€™m able to receive between three and seven packets (one per minute). After that, there seems to be no more communication between the device and the gateway. The last reported battery status is okay.

Has anyone else seen this problem? Needless to say, the issue also occurs when the Things Node sits close to the gateway, i.e., Iā€™m not having a range issue.

Ideas?

Itā€™s doing my head in.

  • Frame counter reset. No change.
  • Device deleted and recreated in application, new keys deployed to Things Node. No change.
  • Application deleted and recreated, new device created, new keys deployed. No change.

In comparison, on the same workbench just a few meters from the gateway, a Things Uno is giving me the following in the gateway event window, to give an idea of signal quality:

"lora": {
    "spreading_factor": 7,
    "bandwidth": 125,
    "air_time": 46336000
  },
  "coding_rate": "4/5",
  "timestamp": "2017-12-28T17:41:47.023Z",
  "rssi": -47,
  "snr": 6

Iā€™m wondering if something is ā€œnot quite rightā€ with my Things Node. Iā€™m going to wait till tomorrow to give it another tryā€¦

1 Like

is the node always connected to the ide / computer ?

All nodes should take care of airtime restrictions. Gateways do not implement airtime restrictions for nodes, would not make sense as the airtime has been consumed when the gateway received the data.
However gateways have to adhere to airtime restrictions as well, so a gateway can only transmit the join response when airtime is available.

Check the datarate of the node. DR0/SF12 joins can be a problem with the RN modules used in the TTN products.

I tested the Things Node originally while still connected to a computer, leaving the IDE open for serial monitoring. Itā€™s had its hiccups already then, with the same error message. However, a reprogram seemed to fix the issue. Only after running the device off batteries (once) I entered the complete world of pain, even with everything you suggested yesterday not helping much.

HOWEVERā€¦ I had my gateway offline overnight and also just put the batteries back into the Things Node. As of the time of writing this, Iā€™ve been able to connect to the gateway, currently sending a SF7/BW125 message of 51.5ms every minute. As this is the default firing rate of the Basic sketch made available for the device, Iā€™m tempted to see how far Iā€™m going to get before the issue returns. If it doesnā€™t, Iā€™m going to be entirely clueless as to the why but who caresā€¦

Thanks for your help!

Thanks for the clarification. Iā€™m apparently in SF7, with a functioning device (self-healing issue by removing both gateway and device from power over night). Itā€™s good to know about these weaknesses that are probably not widely ā€œadvertisedā€.

THE THINGS NODE INSTALL ERRORS ON SIM PC.pdf (466.4 KB)

SUBJECT: The Things Node & UNO installation problems
I have recently ordered ā€œTHE THINGS NETWORK KITā€ and have successfully installed the Gateway.
However, have serious difficulties to get the ā€˜Deviceinfoā€™ program up & running.
These are well known issues and a many people spending a lot of effort to get it fixed.
On one of my windows 8 Pro computers, the port was disabled, when trying the upload, the sketch. This computer works fine when making use of standard Arduino & Raspberry HW.
I have reinstalled all SW to another Windows 7 Pro computer, there the COM1 is active. However same kind of upload problems. Even after installing the FDTI AVR drivers.
Also, did make use of troubleshooting guidelines: ā€œBrickedā€™ procedure. Without success.
Looking forward for getting the golden tips & to make it a Plug & Play installation. So, it can be used in STEM school environment.

Have set preferences Verbose upload ON: Upload is starting to make use of COM1:
However get still an error: programmer not responding
Annex: screen shots

to be clearā€¦ we talk about the things node or the things uno ?

COM1 is never used, so you must attach the node, select the right board AND the right port.
if you only see port COM1 after connecting and selecting the right board try disconnect usb and try another usb port.
you must see and select another com port then COM 1

problem solvedā€¦ bad USB cable

About the things node ;
Itā€™s uses a 32U4 processor thatā€™s also used in the PRO micro boards and runs at 8 Mhzā€¦

Hey guys, is this the correct syntax for changing sf on the node?

#define loraSerial Serial1
#define debugSerial Serial
#define sf 10

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

TheThingsNetwork ttn(loraSerial, debugSerial, freqPlan, sf);
TheThingsNode *node;

your gateway doesnā€™t connect to your node (or the other way around)
a gateway just receives a lorawan packet and transport that over the internet to the backend server.

you can see in your console / gateway if your node is transmitting at all
here is what a join request looks like in your console :

joinreq

1 Like

Ha! Iā€™m not even seeing that for the Things Node, but for my other devices. Sir, I think thatā€™s proof enough for a fault. :wink:

if

  • your battery is full
  • the basic ttn otaa software loaded
  • with the right credentials
  • and nothing visible in the console

yes ā€¦ then maybe the device is/became faulty :wink:

1 Like

While checking the PCB, the Things Node suddenly started working again. Turns out that exerting pressure on the radio itself fixes the problem. Now lodged a business card in between the radio and the case, and itā€™s had its longest stretch of successful transmissions so far. Amazing.

I have been trying in many ways to upload a sketch to TTN Node device. I started with the basic TTN sketch from https://www.thethingsnetwork.org/docs/devices/node/quick-start.html. Then I followed the video from TTN: https://www.youtube.com/watch?v=tapK6EINx1k&t=186s and set up Arduino to work with the Sparkfun Pro Micro 8MHz. I am running Linux Ubuntu 17.10 and Arduino 1.8.5. The upload seems to hang on avrdude trying to upload to the device. I also own an Uno device and that one works fine. I would like to use the Node to leave the device in a good enclosure.

I have followed the instruction for the Leonardo board (http://starter-kit.nettigo.eu/2015/serial-port-busy-for-avrdude-on-ubuntu-with-arduino-leonardo-eth/) and added the udev rule for the Sparkfun device. No result however. I do not know how to proceed from here. Thanks in advance for any help.

Output from consoole:

Sketch uses 12510 bytes (43%) of program storage space. Maximum is 28672 bytes. Global variables use 1026 bytes (40%) of dynamic memory, leaving 1534 bytes for local variables. Maximum is 2560 bytes.
Forcing reset using 1200bps
open/close on port /dev/ttyACM0 PORTS {/dev/ttyACM0, } / {} => {} PORTS {} / {/dev/ttyACM0, } => {/dev/ttyACM0, }
Found upload port: /dev/ttyACM0 /home/sven/Arduino/hardware/tools/avr/bin/avrdude -C/home/sven/Arduino/hardware/tools/avr/etc/avrdude.conf -v -patmega32u4 -cavr109 -P/dev/ttyACM0 -b57600 -D -Uflash:w:/tmp/arduino_build_495273/BasicTTN.ino.ino.hex:i avrdude:
Version 6.3, compiled on Jan 17 2017 at 11:00:16 Copyright Ā© 2000-2005 Brian Dean, http://www.bdmicro.com/ Copyright Ā© 2007-2014 Joerg Wunsch
System wide configuration file is "/home/sven/Arduino/hardware/tools/avr/etc/avrdude.conf"
User configuration file is "/home/sven/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : /dev/ttyACM0 Using Programmer : avr109
Overriding Baud Rate : 57600 AVR Part : ATmega32U4 Chip
Erase delay : 9000 us PAGEL : PD7 BS2 : PA0 RESET disposition : dedicated RETRY pulse : SCK serial program mode : yes parallel program mode : yes Timeout : 200 StabDelay : 100 CmdexeDelay : 25 SyncLoops : 32 ByteDelay : 0 PollIndex : 3 PollValue : 0x53
Memory Detail : Block Poll Page Polled Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBac


eeprom 65 20 4 0 no 1024 4 0 9000 9000 0x00 0x00 flash 65 6 128 0 yes 32768 128 256 4500 4500 0x00 0x00
lfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00 hfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
efuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00 lock 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00 signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00

Programmer Type : butterfly Description : Atmel AppNote AVR109 Boot Loader

Connecting to programmer: .

one quick questionā€¦ did you managed to program other arduinoā€™s with this ubuntu arduino IDE setup ?

Hi BoRRoZ, yes I am able to program a TTN Uno without any problem. I can also load Blink on a Sodaq Autonomo. It is most likely related to interop between Sparkfun Pro Micro and my environment, assuming the node does work properly. But the Node runs the default FW without any problem: I can attach the serial monitor and view the log lines. It is related to programming the device I assume.

x618

I had my fair share of problems with arduino and ubuntu on this old laptop.
I never tried to upload a sketch to the TTN nodeā€¦ will try to replicate your problem today.
first step = updating the board files/the TTN libs ect and I see that this is still ide 1.8.1 :sunglasses: