Vraag

LoRa: No payload_hex in the test POST?

  • 14 december 2016
  • 3 reacties
  • 400 keer bekeken

Application server, result of a print_r of the received keys..
Array ( [0] => LrnDevEui [1] => LrnFPort [2] => LrnInfos [3] => AS_ID [4] => Time [5] => Token )

The LoRa developers documentation refers to a payload_hex field. I don't see it, even though it's possible to fill in a test value for your payload on the device edit page. What's going on?

3 reacties

Reputatie 7
Badge +11
Hello windchallenge, welcome to the KPN forum!

In the LoRa Developer portal you can indeed test your connection without a device. Have you tested to capture the payload with Hookbin?

I may not be able to give you relevant advice about the use of an array in the Application server. But I can try anyway, have you put the array within a lokal variable? With something like the use of:
for(int i=0; i < Array.length; i++) { Serial.print(Array[i]));
I am displaying all variable keys and their contents on my application page. Nothing that could be the test payload appears. I've tried countless formattings for the payload, but none of it appears in the POST data on my receiver. Below is a print of a dump of all received POST data, with a test payload of 1e240 (123456 in hex). I've turned all id's into X's.

code:
Array ( [0] => LrnDevEui [1] => LrnFPort [2] => LrnInfos [3] => AS_ID [4] => Time [5] => Token ) 

Array ( [0] => XXXXXXXXXXXXXXXX [1] => 1 [2] => null [3] => WindchallengeHollandBV.developer [4] => 2016-12-21T10:20:48.256 01:00 [5] => XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX )
Reputatie 7
Badge +11
Hi windchallenge, sorry for my late response.
Have you already tried to connect Hookbin to see more parameters from the header and body? The JSON created by the core server is put trough untouched to the developer portal and from there to the client side.

Reageer