Rak 5010 Getting Sensor Data

@nero we actually have a script that helps us flash and burn the firmware. Also regarding the code that you sent I have already written that in the user_app.c file. I can probably try to fill some sample temp, humidity values to see if those are being sent or not.

Also I had a question:

This is what I see on tera-term when I flash my code when the code is flashed and ran on the board. So my question is below you can see that the log of sensor data can be observed via uart (I have cut out the IP and Port numbers). And we also see that commands sent to BG96 are echoed to same uart channel. How to use same uart channel to print any debug messages

========================


| ___ / _ \ | | / / | | | () | |
| |
/ / /\ | |/ / | | | | _ __ | | ___ ___ ___
| /| _ || \ | |/| | | '
/ _ \ |/ _ / __/ __|
| |\ | | | || |\ \ \ /\ / | | | __/ | /_ _
_| __| |
/_| _/ / /||| _|_|_||//



========================================================
AT+CSQAT+CSQ
+CSQ: 14,99

                       OKAT+QICSGP=1,1,"fast.tmobile.com"
                                                          AT+QICSGP=1,1,"fast.tmobile.com"
                                                                                            OKAT+QIACT=1
                                                                                                         AT+QIACT=1
                                                                                                                     OKAT+QIACT?
                                                                                                                                 AT+QIACT?
+QIACT: 1,1,1,"           "

                                OKAT+QIOPEN=1,0,"UDP"," ", ,1,1
                                                                              AT+QIOPEN=1,0,"UDP","    ", ,1,1
                                                                                                                           OKAT+QISTATE=0,1
AT
   +QIOPEN: 0,0
                +QISTATE=0,1
                              +QISTATE: 0,"UDP","   ",  ,1,2,1,0,1,"uart1"

                                                                                       OKAT+QISEND=0,95Tem:-0.00;Hum:0.00; Pre:-0.00; Lat(0-N,1-S):0,0.000000,Lon(0-E,1-W):1,0.000000; Battery:-0.00;
                                                           AT+QISEND=0,95
                                                                           >
                                                                             Tem:-0.00;Hum:0.00; Pre:-0.00; Lat(0-N,1-S):0,0.000000,Lon(0-E,1-W):1,0.000000; Battery:-0.00;
                                SEND OKAT+CLOSE=0

Hi,
Remember the at about how to get sensor data? In at.c, line 363. Can you add your UDP part after the end of this part?
memset(at_rsp,0,1536);
memcpy(at_rsp,cmd,strlen(cmd));
sprintf(at_rsp+strlen(at_rsp),"%s\r\n",send_data);
rui_at_response(true, at_rsp, RAK_OK);

First, it can show the sensor data correctly. And you can send this send_data to check.

For now, we just provide the log with RTT of Jlink. USB just out our AT information.

Use AT to send your data. And compare with your code. It must be some code error bug.

Hey @nero, I did that and I am getting the correct sensor data via UDP to my server when I type the AT command however when I just run the user_app.c file it still gives me the sensor data values as 0’s via UDP. So the sensor data values are correctly sent via UDP to the server when I type the AT command however through the sendOk function in the user_app.c file the sensor data values are still 0’s

Also I had a question how do I use an external library with the source code files. Like I tried to compile the zip code of my source files with my .a and .h library file and library header however that failed. So I wanted to know how do I use an external library.

Hi,
OK, it looks like the sendOK function has some bugs… Can you just copy the at part to the sendOK and then try?

As for your file, you can add them to the folder with other files and upload together. We have test this way.