Help with Dragino Outdoor gateway


#23

if I understand it now you are trying a lora node to connect to the TTN LoRaWAN network and that won’t work.
not with the code you showed


(Sasch600xt) #24

no…i try to connect a lora node first of all only to the gateway to see data comming in at the gateway.

build a node to send encrypted data to the ttn server will be the far away next step.

if i understood you, i just have to match channel settings for the node to see raw data comming in at the gateway, right ?


#25

well no… you are trying to connect lora node to lora gateway… and that has nothing todo with TTN.

is that a commercial node or a diy one ?


(Sasch600xt) #26

a diy one…

so you mean i have to send correct formatted encrypted data with my node to see data comming in at the gateway ?


#27

(Sasch600xt) #28

ok…i see where my problem is…
You make it very clear for me, thank you so much.

do you have an idea, where i can find a simple sketch to test LoRaWAN for my node ?

Just sending a “hello world” or something like this…


(Sasch600xt) #29

ok…found something:

this i will spend time into it…

If it works i need your postaladress to send some german beer :slight_smile:


#30

I understand from the code you’ve posted that you use a 32U4 for you node (leonardo? / adafruit ?)

anyway… try search in the right top corner :wink:

search


(Sasch600xt) #31

ok…thank you very much !!! i will you keep informed when my node is working and all of that stuff :slight_smile:


(Tycho Schenkeveld) #32

Wow… The price on that gateway!! Finally something affordable! :smile: And I see they have even cheaper non-outdoor models.

Is this really a 8-channel full gateway, or just a 1-channel one? I looked at the datasheet but I couldn’t find it in there, there aren’t many details on it.


#33

cheap… but you can’t compare it to ‘real’ gateways


(Tycho Schenkeveld) #34

Ah so it’s just a one-channel? Bummer :frowning: I really want an 8-channel to put on our makerspace. They’re just so expensive :slight_smile:

You can make a 1-channel with a PyCom module for much less than this. It’s what i use for testing. Anyway, thanks!


(Sasch600xt) #35

Ok…so after another 15 hours day i getting closer to the problem…

does anyone get it to work with an Arduino Mega and a Dragino Shield ?

looks like i need pinsettings for the Mega (i am not a pro so i need a little help on this part)

// Pin mapping

const lmic_pinmap lmic_pins = {
.nss = 10,
.rxtx = LMIC_UNUSED_PIN,
.rst = 9,
.dio = {2, 6, 7},
};

anyone an idea ?
Thank you very much
Sascha


#37

(Sasch600xt) #38

Thank you so much…it is kinda working now…guys from dragino where with teamviewer connection at my pc and it too quiet a while untill they got it to work…

Now i have on tiny little problem.

There is still a few packet losts…i want to add an counter to the payload.
But all trys end up in a compiler error…
Can one of you please help me to add the counter i created already in the sketch to the outgoing message ?

That would be awesome !!!

here ist the part of the code where i want to transmit the counter:

int counter = 0;

void do_send(osjob_t* j){
static uint8_t mydata[] = "Counter = ";
counter++;
// Check if there is not a current TX/RX job running
if (LMIC.opmode & OP_TXRXPEND) {
Serial.println(“OP_TXRXPEND, not sending”);
} else {
// Prepare upstream data transmission at the next possible time.
LMIC_setTxData2(1, mydata, sizeof(mydata)-1, 0);
Serial.println(“Packet queued”);
Serial.println(LMIC.freq);
}
// Next TX is scheduled after TX_COMPLETE event.
}

Thank you so much !!!
Sascha


(Arjan) #39

Your compile errors aside: there is no need for that, as LoRaWAN already has its frame counter. And sending text "Counter = " (in which you don’t actually include the counter value?) is a waste of air time. Also, please see How do I format my forum post? and edit your posts. And above all: “a compiler error” is not specific enough to get any help.


(Sasch600xt) #40

ok…thank you for your reply.

one question about the frame counter:

how does i know if my sensor sent a packet but it never arrived at the gateway ?
Because right now i just try to doublecheck my gateway.

So all i try to do in my test enviroment is to send every minute a message (payload) with “Counter = (integer counter)”. and compare it with the counter at the TTN page.

Sure the code is not complete because i got it not to work.
But truly i forgot to give you the compiler error and i am sorry about that:
it was something like “cannot get the size of mydata”

Thank you for your help
Sascha


(Arjan) #41

Because the node should increase the LoRaWAN frame counter with every uplink. So, if packets 2, 5 and 6 are missing, you’ll NOT see those values for the frame counter, but you’ll only see, say, 1, 3, 4 and 7. If you’re adding your own counter, then you would also not see the messages that you did not receive.


(Sasch600xt) #42

ok…great…thank you…one step further :slight_smile:


(Melvinpmanuel) #43

Hello Sascha,
I have a similar problem you had with my dragino gate way LG01-P. Could you please help me to solve that?
Recently I purchased a Dragino gateway LG01-P for my project . I already have a TTGO ESP32 LoRa module. I am sending some data from (example a text “Hello”) the TTGO ESP32 board and I need to receive the same data on the Dragino Gateway.

After programming the dragino, I opened the serial monitor, to check whether the gateway is receiving that data or not. But unfortunately I am not receiving anything. Am I using the correct code at the receiver? Do I need to do any updates on the code. My application is just to receive the data on computer which the Dragino gateway is connected.

I verified the transmitter code by using another ESP 32 LoRa board which acts as a receiver and their I am able to receive the data. So the transmitter is sending the data properly but the problem is at the Dragino receiver.Please help me to come out of this issue. The code that I am using at the transmitter side is attached here.

When working with the Dragino gateway in the serial monitor window, I am getting a message like "Unable to connect: retrying (0)… "