techstudio-design / SimpleNB

A simple Arduino library for communication with NB-IoT/Cat-M1 modules
GNU Lesser General Public License v3.0
32 stars 4 forks source link

Issue compiling example code #5

Closed sebastiansieber closed 2 years ago

sebastiansieber commented 2 years ago

[X] I have read the Troubleshooting section of the ReadMe

What type of issues is this?

[ ] Request to support a new module

[X] Bug or problem compiling the library [ ] Bug or issue with library functionality (ie, sending data over TCP/IP) [ ] Question or request for help

What are you working with?

Modem: AND Global SIM7080G breakout board Main processor board: Raspberry Pi Pico SimpleNB version: Latest Code: http_post.ino examples, only change is that I use Serial1

Scenario, steps to reproduce

Arduino IDE 2.0.0rc copy & paste http_post example verify code

Expected result

I would expect it to compile without issues

Actual result

In file included from c:\Users\xxxxx\Documents\Arduino\libraries\SimpleNB-master\src/SimpleNBClient.h:34:0,
                 from C:\Users\xxxxx\Documents\Arduino\Modem Test\ModemTest\ModemTest.ino:21:
c:\Users\xxxxx\Documents\Arduino\libraries\SimpleNB-master\src/SimpleNBClientSIM7080.h: In member function 'bool SimpleNBSim7080::getGPSImpl(GPS_t&, long unsigned int)':
c:\Users\xxxxx\Documents\Arduino\libraries\SimpleNB-master\src/SimpleNBClientSIM7080.h:412:26: error: cannot convert 'const long int*' to 'const time_t* {aka const long long int*}' for argument '1' to 'tm* gmtime(const time_t*)'
     tm *t = gmtime(&tstmp);
                          ^

exit status 1

Compilation error: exit status 1

Debug and AT command log

Thanks a lot for your help! Great library!

techstudio-design commented 2 years ago

Yes, that was a wrong type cast. Sorry about that. I have fixed it, do a git pull or download the library again.

Interestingly I don't get the error when compiling with ESP32, but it does shown up when compiling under stm32.

sebastiansieber commented 2 years ago

Thanks a lot! Also super fast response!

Will close the issue once I tried it out.