DRAGINO problems and solutions topic part 1

Hey I just got the hat working and I can see the same data as you. I wanted to know how do you read the payload? Is it the actual data sent or do we have to convert it from ASCII to text? Also I have seen the data changes at the last byte/bytes, is there a reason for it? Because I thought the code sends the same data each time.

I did contact him, haven’t received a reply yet. Did you manage to get the downlink working on the lora gps hat? Also I might sound like a noob, but on the application console on TTN, I have noticed a couple of byte changes on the payload. Why does this happen? Shouldn’t the node send the same data at all times?

When you talk about read the payload, is about the Picture on Application Data? If yes, on the code of GitHub - ernstdevreede/lmic_pi: Raspberry Pi port LoRaMAC in C / LoRaWAN in C http://www.research.ibm.com/labs/zurich/ics/lrsc/lmic.html, is implemente to return on the App in format HEX. Or if you talking about the data in the output of the gateway (Base64) you can decoder with this: https://lorawan-packet-decoder-0ta6puiniaut.runkit.sh/.
From what I read, there is no data being sent in ASCII format because it requires a higher bandwidth.

I’m no sure, but I think is for that:

  • The data and a count sent:

  • On the function do_send():

The diference about the data sent is the conter, because Always the code repeat the “Hello world!” + cntr and after save the data in the buf variable, the cntr change.

Thank you so much. I was able to convert the app payload and gateway traffic.

1 Like

Now, I’ve got the code working. The point is that in global_conf.json you have to set pin_rst to 3 instead of 0 as in README.md. Pins for Dragino hat are:

"pin_nss": 6,
"pin_dio0": 7,
"pin_nss_2": 6,
"pin_dio0_2": 7,
"pin_rst": 3,

The other pins can remain untouched.

As Dragino hat has only one RFM95 module you will get a single channel gateway, not a dual channel gateway (with up- and downlink). Therefore you have to comment out line 552 in LoraModem.c:

// Die("Unrecognized transceiver");

After that the GW will work fine.

1 Like

Hey, I am using the lora hat as a gateway. I know there has been some issues with using the hat as a gateway and the single packet code doesn’t support downlink. But is there any way I can check if downlink packets reach my gateway or not? I tried sending a downlink data from the ttn console but it is just scheduled (as expected) but shouldn’t it atleast try to send the data to the gateway? Does this have anything to do with the Fair access policy.

A gateway needs to poll the back-end periodically for downlink packets (this ensures firewalls keep the connection active) Does the single channel gateway poll?

I am not sure, I am using the single_ch_pkt_fwd on the dragino gps hat.

1 Like

Then may-be you need to check/investigate. Or do you expect us to do the work for you?

I am able to receive packets from the ttn on my gateway. But it is the response packets sent after I send a packet received from the node. I am also able to ping my gateway pi, from a different device on a different network. How do I know if on sending a downlink packet the ttn sends a packet to my gateway pi?
There is no firewall setting in place, I have the DMZ setup to forward all packets to my gateway pi, so it shouldn’t block anything. I am sorry but I do not know how to check if the gateway polls ttn or not, as I can see any packets between the gateway and ttn except while sending packets received from the node.

You could check the code to see if it includes a downlink poll.

Hi! My friends! @telkamp @BoRRoZ @BjoernA @Harald_Naumann
I have added the line in the crontab however, if you know any other possible way to keep it running. Many thanks in advance.

Note : Raspbian plus LoraHAT (rpi3)

Method 1 : which stops working once press ctrl+C or reboot system
#sudo /home/pi/lorawan_gateway/single_chan_pkt_fwd/single_chan_pkt_fwd

Method 2: looking for a method to keep it running in the background…

I added below in # sudo crontab e (unsuccessful)

*/2 * * * * sudo /home/pi/lorawan_gateway/single_chan_pkt_fwd/single_chan_pkt_fwd

OR

*/2 * * * * /bin/sh -c sudo /home/pi/lorawan_gateway/single_chan_pkt_fwd/single_chan_pkt_fwdPreformatted text

Hi, if you are running Raspbian Jessie, a systemd script would help.

sudo vi /etc/systemd/system/pktfwd.service

[Unit]
Description=single_chan_pkt_fwd
After=syslog.target network-online.target
[Service]
Type=simple
ExecStart=/home/pi/lorawan_gateway/single_chan_pkt_fwd/single_chan_pkt_fwd
Restart=on-failure
RestartSec=10
KillMode=process
[Install]
WantedBy=multi-user.target

 systemctl daemon-reload  
 systemctl enable pktfwd  
 systemctl start pktfwd
2 Likes

It works! Please guide me to start the program 2 minutes after the reboot as connecting to the 4G ppp connection takes time. Many thanks! :slight_smile:

@kazi93 You can try with

ExecStartPre=/bin/sleep 120

in the [Service] section,
or if you know the interface name

ExecStartPre=/usr/lib/systemd/systemd-networkd-wait-online --interface=ppp

where ppp is the name of your LTE interface.

Fixed Dragino 915 Mhz.

For those who use the 915 Mhz frequency, they must select in their GW Dragino the frequency 902.3 Mhz and ready

2 Likes

Allthough gateway made by joining a Dragino shield and a Raspberry Pi is not considered acceptable for TTN, is it possible to join to the TTN net for testing purposes? Is there some mechanism that lock such a setup?..I succeeded yesterday to put this setup into service (since my other approach using a Lopy as nanogateway following Pycom indications did not work), and initially was accepted but it did not appear in my console as one of my gateways. In fact, sensor values reached the network and values were showned. The gateway was working correctly for hours…However, today I cannot let it work…some comment regarding this behaviour?

Hi.
Only I teach programming and Lora. I Have RPI3+Lora\GPS hat for my gateway, code https://github.com/tftelkamp/single_chan_pkt_fwd. Please tell me where in the code to output the information that I sent to the file, not uploading to the server.

@dragino @BoRRoZ @BjoernA @gonzalo @telkamp @Epyon @erwin

Hi ! My friends! Currently I am receiving " Hello World" message. However, I would like to connect the DS18B20 with the Lora shield v1.4, I tried and no success! I need to know which ports are available to connect the data pin of the sensor? Red >> 5V, Black >> Ground and I guess white is the data pin …

Many thanks in advance