Dragino PG1301 & RPI 3B+: How to find gateway ID

Dear TTN-Fellows,

I have purchased a Dragino PG1301 along with a Raspberry Pi 3B+. I followed the installation guide, the status prompt gives me the following output:

pi@raspberrypi:/etc/lora $ sudo systemctl status lorapktfwd

pi@raspberrypi:/etc/lora $ sudo systemctl status lorapktfwd
● lorapktfwd.service - packet forwarder
Loaded: loaded (/lib/systemd/system/lorapktfwd.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2019-09-16 10:43:57 BST; 2min 29s ago
Process: 935 ExecStartPre=/usr/bin/reset_lgw.sh start (code=exited, status=0/SUCCESS)
Main PID: 950 (lora_pkt_fwd)
Tasks: 5 (limit: 2200)
Memory: 568.0K
CGroup: /system.slice/lorapktfwd.service
└─950 /usr/bin/lora_pkt_fwd

Sep 16 10:46:00 raspberrypi lora_pkt_fwd[950]: REPORT: # CRC_OK: 0.00%, CRC_FAIL: 100.00%, NO_CRC: 0.00%
Sep 16 10:46:00 raspberrypi lora_pkt_fwd[950]: REPORT: # RF packets forwarded: 0 (0 bytes)
Sep 16 10:46:00 raspberrypi lora_pkt_fwd[950]: REPORT: # PUSH_DATA datagrams sent: 1 (111 bytes)
Sep 16 10:46:00 raspberrypi lora_pkt_fwd[950]: REPORT: # PUSH_DATA acknowledged: 0.00%
Sep 16 10:46:00 raspberrypi lora_pkt_fwd[950]: REPORT: ### [DOWNSTREAM] ###
Sep 16 10:46:00 raspberrypi lora_pkt_fwd[950]: REPORT: # PULL_DATA sent: 6 (100.00% acknowledged)
Sep 16 10:46:00 raspberrypi lora_pkt_fwd[950]: REPORT: # PULL_RESP(onse) datagrams received: 0 (0 bytes)
Sep 16 10:46:20 raspberrypi lora_pkt_fwd[950]: REPORT: # RF packets sent to conclgw_receive:1155: FIFO content: 1 a 0 7
Sep 16 10:46:20 raspberrypi lora_pkt_fwd[950]: lgw_receive:1174: [4 17]
Sep 16 10:46:20 raspberrypi lora_pkt_fwd[950]: Note: LoRa packet

I would like to find out the ID of my gateway, this command gives me no feedback:
ifconfig eth0 | grep eth0 | awk ‘{gsub(/:/,"");print $5"ffff"}’

Best and thank you!
Marco

I forgot: using the gateway-id reported in /etc/lora/local_conf.json
doesn’t work (as described in the manual). Trying to register it at TTN reports the error gateway ID already registered.

You may be hitting a hard-coded default which would already have been used by someone else.

Try creating a new gateway id, putting that in the config file, rebooting the gateway, and registering that.

sudo ifconfig should give you some manual clues to the MAC address of at least some interface on your pi and then you can apply the appending rules; to an extent it doesn’t really matter what the id is, as long as it is a hex string of the appropriate length and globally unique

There’s probably some guidance around somewhere on the best way to “invent” one if there are no hardware details to start from.

You may use the Dragino Package as below:

wget http://www.dragino.com/downloads/downloads/LoRa_Gateway/PG1301/software/lorapktfwd.dep

Then, it runs

sudo dpkg -i lorapktfwd.dep

After that, you need to adust your locar frequency plan as the below directory

sudo cp ???-global_conf.json …/global_conf.json

Finally you must run the below commands:

sudo sytemctl start lorapktfwd

sudo journalctl -u lorapktfwd -f

Good Luck!

You can use below command to generate an unique ID from the raspberry MAX address of eth0

ifconfig eth0 | grep ether | awk ‘{gsub(/:/,"");print $2"ffff"}’