ttn-zh / ic880a-gateway

Reference setup for iC880a gateways running The Things Network
GNU General Public License v3.0
455 stars 210 forks source link

My gateway stop transmiting #51

Closed pierrot10 closed 5 years ago

pierrot10 commented 5 years ago

Hello I installed and configured two gateway following that procedure. Wedenesady, I stopped my gateway and when later I restated it, no way to be seen by TTN. I have a second and same gateway and this one can be seen by TTN but now message are transmitted to TTN throught the second gateway.

Regarding the first gateway, which stop working, I moved iit to my place and I switch it on. Once again, from my flat, the gateway can not be seen by TTN.

I am planning to reinstalled it, but first there is a way (a command from Raspberry) to check the gateway (concentrator, antenna, application, etc...)?

Note that my Raspberry connected to the concentrator, starts well. I can be remotely connected to it, and I have an internet access. In spite of this, the gate way is not seen by TTN. Can it be possible that Gateway remote configuration file is corrupt?

Thank Cheers

gonzalocasas commented 5 years ago

Please check the output of the logfiles (you can query it in different ways, one is sudo journalctl --unit=ttn-gateway). The most likely issue is that the concentrator board is somehow no longer able to start. It could be a hardware failure or a electric connectivity issue on the interface between the two boards (RPi and iC880a).

pierrot10 commented 5 years ago

Hello, thank for your reply. I planned to debug that issue, this evening. I will try and update the status

pierrot10 commented 5 years ago

Hello, I have some error. But first, there is way to no the EUI key. I have two gateway. If I look in /otp/ttn-gateway/gateway-remote-config/ there is so many different file between mine and I stupidely not recorded it

I just switch on my gateway, and I have soem error as the following

error: object file .git/objects/62/002a0d748868181c53398b18c9af33c6dac128 is empty Apr 26 18:28:17 smartsensors ttn-gateway[328]: error: object file .git/objects/62/002a0d748868181c53398b18c9af33c6dac128 is empty Apr 26 18:28:17 smartsensors ttn-gateway[328]: fatal: loose object 62002a0d748868181c53398b18c9af33c6dac128 (stored in .git/objects/62/002a0d748868181c533 Apr 26 18:28:17 smartsensors ttn-gateway[328]: fatal: The remote end hung up unexpectedly Apr 26 18:28:17 smartsensors ttn-gateway[328]: error: object file .git/objects/4a/d054cb435c7091efed8e5d8ba20b3e3ab5231d is empty Apr 26 18:28:17 smartsensors ttn-gateway[328]: error: object file .git/objects/4a/d054cb435c7091efed8e5d8ba20b3e3ab5231d is empty Apr 26 18:28:17 smartsensors ttn-gateway[328]: fatal: loose object 4ad054cb435c7091efed8e5d8ba20b3e3ab5231d (stored in .git/objects/4a/d054cb435c7091efed8

However, at the next line I can see my EUI key.

In the log file is there a relevant message I can look for?

ln: impossible de créer le lien symbolique '/opt/ttn-gateway/bin/local_conf.json': Le fichier existe

[GPS]

Apr 26 18:35:50 smartsensors ttn-gateway[328]: # Invalid gps time reference (age: 1556296340 sec) Apr 26 18:35:50 smartsensors ttn-gateway[328]: # Manual GPS coordinates: latitude 10.00000, longitude 20.00000, altitude -1 m Apr 26 18:35:50 smartsensors ttn-gateway[328]: ##### END #####

I also have some lines as the following

[UPSTREAM]

Apr 26 18:39:20 smartsensors ttn-gateway[328]: # RF packets received by concentrator: 0 Apr 26 18:39:20 smartsensors ttn-gateway[328]: # CRC_OK: 0.00%, CRC_FAIL: 0.00%, NO_CRC: 0.00% Apr 26 18:39:20 smartsensors ttn-gateway[328]: # RF packets forwarded: 0 (0 bytes) Apr 26 18:39:20 smartsensors ttn-gateway[328]: # PUSH_DATA datagrams sent: 2 (444 bytes) Apr 26 18:39:20 smartsensors ttn-gateway[328]: # PUSH_DATA acknowledged: 0.00% Apr 26 18:39:20 smartsensors ttn-gateway[328]: ### [DOWNSTREAM] ### Apr 26 18:39:20 smartsensors ttn-gateway[328]: # PULL_DATA sent: 6 (0.00% acknowledged) Apr 26 18:39:20 smartsensors ttn-gateway[328]: # PULL_RESP(onse) datagrams received: 0 (0 bytes) Apr 26 18:39:20 smartsensors ttn-gateway[328]: # RF packets sent to concentrator: 0 (0 bytes) Apr 26 18:39:20 smartsensors ttn-gateway[328]: # TX errors: 0

gonzalocasas commented 5 years ago

ttn-gateway[328]: fatal: loose object -> that looks like the git repo is broken.... maybe due to SD card corruption? I would suggest a re-install. The EUI is basically the MAC address of your ethernet interface (with some FFFE padding in between)

pierrot10 commented 5 years ago

Thank a lot for your fast answer! What do you means by

that looks like the git repo is broken.... maybe due to SD card corruption?

The SD card of my RPY works. I will reinstall the gateway but here is not a way to fix it?

Let me ask you a last question. When you say reinstall, do you mean by lunching again: sudo /home/pierrot/ic880a-gateway/install.sh spi

Should I not uninstall first? Is there an option to uninstall it? Or should I simply lunch again install.sh?

OR should I reinstall the RPY and then install the ic880a-gateway soft?

PS: By the way, for that gateway, I renamed the hostname from ttn-gateway to smartsensors (I have not done it for my first gateway), I believe it's not a issue?

pierrot10 commented 5 years ago

And (sorry), I supposed

If you want to use the remote configuration option, please make sure you have created a JSON file named as your gateway EUI (e.g. B827EBFFFE7B80CD.json)

as I already created a json file in your repository, I beleive, I do no need to do it again. I install following this https://github.com/ttn-zh/ic880a-gateway, I restart and it's done. My EUI will not change, that correct?

Thank a lot

gonzalocasas commented 5 years ago

Or should I simply lunch again install.sh?

Yes, that's enough.

OR should I reinstall the RPY and then install the ic880a-gateway soft?

I meant a full install, strarting with a clean raspbian install, but you can try just the ic880a part first.

My EUI will not change, that correct?

Correct, the eui will not change.

pierrot10 commented 5 years ago

Grreat, thank a lot gonzalocasas. Iam trying it right now

pierrot10 commented 5 years ago

That was not good

error: object file .git/objects/62/002a0d748868181c53398b18c9af33c6dac128 is empty error: object file .git/objects/62/002a0d748868181c53398b18c9af33c6dac128 is empty fatal: loose object 62002a0d748868181c53398b18c9af33c6dac128 (stored in .git/objects/62/002a0d748868181c53398b18c9af33c6dac128) is corrupt fatal: The remote end hung up unexpectedly

I do not understand what is and where is

.git/objects

If I look in ls /home/pierrot/ic880a-gateway/.git/objects/

There is no 62 folder

gonzalocasas commented 5 years ago

please delete /home/pierrot/ic880a-gateway/ entirely and clone it again

pierrot10 commented 5 years ago

Great, that's work. Renaming /home/pierrot/ic880a-gateway/ was not enough, I also renamed /opt/ttn-gateway. I cloned it and reinstalled

The gateway, restarted and I can not see it in TTN. Perfect.

Let me ask you two questions more. I replaced the "defect" (now solved :)) gateways by a second I had at home. My home gateway is now on the filed at the same location, but it could not receive message from the nodes, even if I see it at TTN. Would it possible that one gateway is less powerfull that the second? Both gateway are the same. Same hardware, same install, same antenna.

I guess you already answer me, but I can rename ttn-gateway hostname to something else? I guess yes.

pierrot10 commented 5 years ago

Hello,

I confirmed that works. I just placed back the second gateway to the field and it receive the measures from the nodes demo. I just wonder why my first gateway could node receive the messages from the nodes while the second could, now. Apparently, during the re-installation of the second gateway, some update have been done

//less ic880a-gateway/install.sh
# Update the gateway installer to the correct branch
echo "Updating installer files..."
OLD_HEAD=$(git rev-parse HEAD)
git fetch
git checkout -q $VERSION
git pull
NEW_HEAD=$(git rev-parse HEAD)

if [[ $OLD_HEAD != $NEW_HEAD ]]; then
    echo "New installer found. Restarting process..."
    exec "./install.sh" "$VERSION"
fi

I will reinstall the first gateway, may be it will make a difference.

Enjoy your week-end!

Erik-Koning commented 5 years ago

Did you try again with the first gateway?