Hello..im absolute begginer to this subject and i have some issues.Im trying to do a lorawan connection from one arduino to a raspberry pi.Arduino have a temperature sensor and send it to print the value to raspberry pi well i have do correclty this communication between them so my problem is that to send packets with lorawan protocoll the packet must be hex string for example "30322E321" and the value of the temp sensor is float for example 24.60 so i convert the float value to ascii string and then to a hex string correclty with this code:
dtostrf( temp, 1, 2, float_str);
// use snprintf() to include the float representation
snprintf( message, sizeof(message), "%s", float_str);
//Serial.println( message );
Utils.hex2str((uint8_t*)message, payload_hex, strlen(message));
So my problem is that i cant do the opposite i receive the hex string packet correclty but i cant to convert it to ascii string again to print it
can you help me?Im new to this and im a little confused
I use arduPiLoRaWAN.h to raspberry which is the receiver of the packet and Wire.h, arduinoUART.h,arduinoUtils.h,arduinoLoRaWAN.h to arduino which is the sender of the packet.And I do a connection P2P.
I have not used the RN2483 myself, but be aware that although the library may be called LoRaWAN, your not in fact using LoRaWAN itself, that has no concept of P2P connections.
It just hapepns that the RN2483 also supports P2P mode.
i have a variable for my situation LoRaWAN._buffer which saved the sending packet from arduino this variable has a hex string value and i want to print it as ascii string.I write in arduino ide so in c language why suppose module RN2483 or libraries for lorawan block my code?If i want to build a fuction which do that converter is possible right?but my problem is that i dont know to do that fuction im absolute begginer
@dimitris21, if you really want help then post the complete program you are using and describe in as much detail as possible what happens when you run it. Then tell us what you want it to do that is different.
A few examples of the data that is sent to the Arduino would be very useful and the corresponding data as received by the Arduino.