• Support
  • Instructions for Making a new Application

So I’ve been able to get the examples in nfed/samples/* to compile and upload to the device. So I’m ready to try to create my own project.

I copied the content of the tree nfed/samples/gps to a subdirectory nfed/sample/gps_mqtt.

I have been able to compile and upload to the device just as a sanity check. So now I want to add access to mqtt broker. So I added “#include <net/mqtt.h>” and started to add some of the stuff to make it work from the mqtt_publisher example.

Well I started by adding the client_init routine which invoke mqtt_client_init. I try to compile and I get that mqtt_client_init is unresolved. I’m assuming it is in a library that I need to modify some part of the config so that “west build” will include it as part of the build. I know I’ve missed something but don’t really know where to start looking. Any help?

james

So what I figured out was that I needed to add the flags in the prj.conf for that part of the system library that I’m trying to use. At least for the moment I got rid of the unresolved external.

12 days later

Ok. a step forward and a couple back.
I’m trying to connect to an internet address and use MQTT to send the results of the data that is returned from the GPS.

If I attach_lte(AT+CFUN=21) and then attempt to startup the modem. The start of GPS(AT+CFUN=31) fails. If I reverse the order I seem to have problems with the creation of sockets (error 105 - ENOBUFS). I’m guessing at this point and I’ll keep trying to play with the order and the config flags to see if I can figure out what I’ve done wrong. I guess I need to get one example working and try to expand it to include the other. As I said one step forward and a couple back.

    jamlamb1959 you want to use the NRF_MODEM_LIB for controlling the board especially when using GPS. (If you’re running standalone that is) Again the original GPS example is a bad example (Nordic has removed it from newer versions of the SDK) for what you’d use in production.

    I recommend you take a look at the Golioth demo I sent earlier. It uses GPS+AGPS with the modem library.

    Terms and Conditions | Privacy Policy