[SOLVED] TTN LoRaWAN uplink PORT - PAYLOAD problem

I’m using a Wireless Stick Lite with HT-M02 gateway at TTN.

When I go to the application data I cant see the payload and the port is 0.

I think that maybe the problem is in this port that are 0 instand of be 2 howrever in my LoRaMAC-definitions.h

/*!
 * LoRaWAN application port
 */
#define LORAWAN_APP_PORT                            2

I had tested at my side:

Set APP Port 2 in my ESP32 LoRaWAN code:
image

APP Port shown 2 in the TTN:

I had also tested with our HT-M02 internal server, it’s also 2:

So I’m not sure what can be the problem, for sure is not a hardware because when I am using the https://github.com/mcci-catena/arduino-lmic library works just fine.

When I’m trying to use ur library I cant see any payload at the application side.

I’m using the OTAA example, with heltec sitck lite.

I’m just adding this line at LoRaMac-definitions.h :

//#define USE_BAND_868
#define USE_BAND_915

And also I’m modifying in Comissing.h:

#define LORAWAN_APPLICATION_EUI
#define LORAWAN_DEVICE_EUI
#define LORAWAN_APPLICATION_KEY

Having this as result:

I cant find where is the problem when I’m using the Heltec Lib =/// . I have already waste to many time on it.

I got the OTAA, and OTAA_OLED working with Wireless Stick Lite. I’m not sure why but the OTAA just worked using PrepareMsgFrame instead off using PrepareTxFrame( AppPort ).

uint8_t msg[] = “Msg test 45”;
PrepareMsgFrame( AppPort, msg , sizeof(msg)-1);

1 Like

Rigth, i use a LoRa 32 V2, I can also send a string, but I need to send an analog data.

You can do it in several different ways, the “worst” one is just typecast your value, String(analog_data), however this way you are sending more bytes than u need. You can google it on internet and find several examples of serialization for LoRa.