Dragino LG01-P as Gateway

I have the Dragino IoT kit V2 that comes with one LG01. Everything is working fine… Just create a gateway profile with only channel zero enabled. Then a service profile with all check-boxes checked and 0 and 5 as data rate. Finally, add the LG01 using its ID that you can find on Service->LoRaWAN Gateway page.

Notice that Dragino LG01 has only one channel… So you must find a way to configure your device to work only sending data to the channel you have configured on your LG01.

Sending data to your device may be simple as: mosquitto_pub -h localhost -t “application/1/device//tx” -h localhost -p 1883 -m “{“confirmed”:true,“fPort”:1,“data”:“base64”}”.

And yes, the Dragino IoT tool kit document helps a lot to understand the LG01 limitations.

Hi… I could use a little help here for using Loraserver on Dragino… Can I ask you your MQTT Configurations on the dragino? I connect it to the thing networks without any problem, But I’m trying to connect the LG01 as a Gateway in LoraServer, so far no luck,

I have the same problem trying connect dragino lg01-s as gateway to loraserver.io.
I have configured only one channel 0 in gateway-profile also in service profile i have check 0-5 data rates but no success. I am a lit bit comfused with a setting in dragino web-interface in radio settings which is encryption key. In this section we have to enter the secrey key which is provided when setup loraserver with 'openssl rand -base64 32 ?

Hi hasiflo,
I am trying to connect LG01 with lora-server from brocaar but no luck.
i have try with lorawan settings also mqtt but no connection. i have setup loraserver in my local lan and also the dragino gateway. i use internal ip so i am sure that firewall is allow access.
could you please help me with the connection. I have setup one channel 0 in gateways-profiles

hi john2k,

  1. I think you have the gateway-bridge on the server, not directly on the gateway, right?

  2. can you send a screenshot from your settings on the dragino lg01 and from your settings on the loraserver (gateway-settings)

  3. for debugging you should use a mqtt-clinet (e.g. mqtt.fx). Then you can see the communication on the lora-server.

  4. Is the problem that you get no sensor data or even that the gateway sends no gateway-statistics to the server?

Thank you hasiflo for your responce.
Sorry for the late answer but i was on a business trip. I have install gateway-bridge on the server.
mqtt-client is running on the server and communication port is open. The problem is that i do not have gateway-statistics on my loraserver as you will saw on photos i atteched

1 Like

I think your port is wrong.
As you connect your gateway to the GatewayBridge (UDP) you will need the port 1700 instead of 8000 (this is the port to the appserver).

Try that and also check if you can ping the loraserver from your gateway (or if you have internet connection on the gateway)

Hi hasiflo,
I hope you can help me too. I’m working with the LG01 gateway, no luck so far in connecting it to the lora-server. I looked for answers in the forum which did not work for me, checked the configuration files of lora bridge, loraserver and lora app, checked the session keys. I even changed the gateway with a new one but the problem remained the same. the LoraServer does not recognize my gateway and whatever is wong with my configuration, have no idea what it is.
these are the screenshots of the settings: 69416586_2837128242967446_8772536543928647680_n|663x500 !
69070585_364869391126909_6395260428921864192_n|668x500 !
68780883_369900153702850_8513032377931399168_n|690x311 !
69292820_1429114650576549_787098816221282304_n|690x334 !
68991269_2536391006423535_13807078611091456_n|690x362 !
69097256_482939968922133_6447667920515366912_n|690x356 !

thanks for everything!

Hi @fatma_ben_hlima,
which options can you choose at your Dragino in LoRaWAN Settings–>IoT Service?

mine is a little bit different as you see, I chose LoRaWan/RAW forwarder Screenshot%20(6)|603x500

Try the “forward to UDP” server and have a look if you get gateway-stats messages
Have you the latest firmware on your LG01?

Also today i installed the latest firmware on my dragino LG01 but still no connection with the server.

Dear hasiflo, I appreciate your help.
yes, I’m pretty sure the fimware is the latest (LG02_LG08-5.1.1546867198). I tried “forward to UDP” but no luck.
I’m not sure what do you mean with the gateway-stats

Hi @fatma_ben_hlima,

with gateway-stats I mean the statistic messages which sends the gateway periodically. That means, you have not to send a LoRaWAN-message from a node to see if the gateway is connected to the server.

Are the gateway and the loraserver in the same network (I have seen you use a private network). Are you able to ‘ping’ the server from the gateway?
Therefore you can login with SSH on the gateway and use the “ping server_ip” command.

Hello,
Update!

I should have mentioned that I’m using a single channel LG01-N gateway (from the LoRa IoT kit v2), which uses a different firmware and which is slightly different than the LG01-P but should work the same. a beginner can easily get confused.
The gateway and the loraserver are on the same private network, I connected the gateway to the same wifi just to make sure.
The gateway used to show messages of receiving data but no statistics of forwarding any (service -> Logread)
I tried thethingsnetwork to make sure there’s no problem with the device and the gateway and it worked fine. I changed the gateway and the LoRa server configuration back and forth, rebooted everything and after a few days the gateway is magically connected. no obvious reason why it didn’t work in the first place.
The right choice for the IoT Service (Service -> LoRaWan Gateway) is LoRaWan/RAW forwarder and not forward to TCP/UDP server.
The ABP device is connected to the loraserver, the join_request join _accept messages are shown on the gateway. The OTAA device, on the other hand, is not, an error message is displayed (object does not exist (code 5)) when accessing the device details. still figuring that one out.

your help is very appreciated dear, thank you.

Hi @fatma_ben_hlima,

good news!
Yeah, good to know, that it is a single-channel gateway(SCG).
At a SCG it depends on the firmware, if you are able to get a downlink (to your node). This could also explain why your node with OTAA is not working. Because node and server has to exchange some information (keys) and therefore it is a downlink necessary.

You should also remind, if you are using a comercial sensor, perhaps you will only receive every third message (in average). In the LoRaWAN spec is defined, that three frequencies has to be implemented on a node. And since you have at you SCG only ONE frequency, you will miss the other 2.

But if you are developing your own nodes with ABP it should not be a problem, if you are using the maching frequencies. :wink:
Of course you are limited with the traffic and if you add more nodes, the probability of message-loss gets higher.

Once I got the same problem. As LG01-N has only one channel, then you must set your device to upload using this only on this available channel. If using the Dragino development kit, you have to uncomment the “#define LG02_LG01 1” line at the config.h LMIC library file so the device will only use channel 1. But you must notice that it will define the uplink frequency as 868100000 and the download as 8695255000 so your LG01-N gateway must match this frequency (or any other channel frequency valid on your country you change it to). However, if you are using a non programmable device, then it will not work properly with LG01-N as a standard device will use all channels in a hopping fashion.

yes my friend, I forgot to mention the config.h file in the lmic library, what I did is: uncomment the #define LG02_LG01 1 line, set the uplink frequency to 868100000 and the downlink to 869525000, the RXSF to 5 and TXSF to 0

Hi!
I searched for this config.h file to change on the LG02 gateway. I couldn’t locate you can you tell me the way?

Hello Fatma,
I aslo have the same system ( LoRa IoT kit v2) may I ask you what is the tutorial you are following for implementing the server ?