AT&T IoT Starter Kit (2 gen) how to send GPS signal to M2X

Solved
ckasky's picture
ckasky
Junior(0)

Hi Everyone,

I have a problem to collect GPS signals, to be specifically, I don't know which function in the M18QxIotMonitoer package could be used to collect GPS signal, or if no such function, could you give me some help to send GPS signals to M2X, Thank you so much.

jflynn129's picture
jflynn129
Moderator(4)

There are several example functions in mal.cpp (located at https://github.com/Avnet/M18QxIotMonitor) that can be referenced for GPS operation.  For example, the IoT Monitor SW implements: 

  • char *getGPSconfig(json_keyval *kv, int kvsize) 
  • int getGPSlocation(json_keyval *kv, int kvsize) 
  • int enableGPS(void) {
  • int disableGPS(void) 
  • int resetGPS(void) 
  • int setGPSmode(int m) 
  • int setGPS_NMEAFilter( int f ) 

There are a few examples of using it within the IoT monitor software. Does this help?

ckasky's picture
ckasky
Junior(0)

Hi jflynn129,

Thank you for helping, I found them, and I wrote my own "test.cpp" file by using them. But another problem occur. When I want to use g++ command to compile the "test.cpp" file to a "test.o" file, an error showed up, saying "fatal error: hwlib/hwlib.h: no such file or directory", I checked all the head file in the M18Q folder, it's really missing, and also other head files like "nettle/nettle-stdint.h". Missing these files, so my "test.cpp" file cannot be compiled. Could you help with that? I will appreciate it so much.

Kevin

jflynn129's picture
jflynn129
Moderator(4)

To compile, you need to install the SDK (https://github.com/Avnet/AvnetWNCSDK) also, did you do that?

ckasky's picture
ckasky
Junior(0)

Thanks jflynn129,

I solved the problem, it should be caused by some settings when I want to compile, and I also added my "test.cpp" into "Makefile.am", then it successed to generate a .o file. Thank you.

Kevin