Node only connects to far away gateway, not to closer gateways

Hi Guys :smiley:
Build an arduino pro-mini node with the RF95 module. I want to send simple temperature data but it seems it’s diffucult to connect to a gateway.

I live in the middle of Delft and the only packages getting through are connecting to a gateway about 2km away…There are at least 7 other active gateways closer to my node.
Why does it connect to the that one? Can I improve anything in the code?

Details:
Arduino pro-mini 3.3v, 8mHz
hope RF95
Spiral antenna

Arduino-lmic 1.5 lib
RFM-basic example modified as sketch

example of recieved package:

{
“time”: “2018-07-05T11:30:04.298303203Z”,
“frequency”: 867.3,
“modulation”: “LORA”,
“data_rate”: “SF7BW125”,
“coding_rate”: “4/5”,
“gateways”: [
{
“gtw_id”: “eui-0000024b08030937”,
“timestamp”: 543048387,
“time”: “2018-07-05T11:30:04.075484Z”,
“channel”: 4,
“rssi”: -108, (these are always 100+)
“snr”: 8.5,
“latitude”: 51.99001,
“longitude”: 4.37525,
“altitude”: 56
}
],
“latitude”: 52.01335,
“longitude”: 4.352591,
“location_source”: “registry”
}

A few bits could be at play:

  1. Have you confirmed if its just this one node of yours to narrow it down to your node at fault?
  2. While there may be other gateways closer there’s a few factors, they could all be internal antenna which means the range won’t be as long. They might even be single channel gateways which could explain the issue.
  3. The range of the other gateways might not be anywhere near as good. I have two setup in the town I live in of which one only covers about 200M radius where as the other one can reach much further. While I can be closer to the one which only has a 200M Radius because it is a short radius I have a higher chance of picking it up on my further away gateway.

also a node never ‘connects’ to a specific gateway (like wifi) … all gateways that receives your node packets will transport them.
TTN decides which one to use to answer your node when you join the network.