This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

undefined reference to `otSrpClientSetHostName' - SRP Client Support

Hey all

I've been searching and trying all sorts of options for this but I'm stuck.

I'm currently working on a Thread sensor prototype on the 52840DK. I'm trying to register a host name and service with SRP via code.

If I use the CLI from the OpenThread repo I can do what I want, and I'm trying to translate that into code.

If I try to use any of the otSRP* functions defined in srp_client.h I get an undefined reference error on build.

I can see in the Openthread repository that OPENTHREAD_CONFIG_SRP_CLIENT_BUFFERS_ENABLE needs to be set for this to work, but can't find the appropriate way to pass this build config in my code (nrfsdk 1.5.1).

 

Does anybody have any hints on what I need to set to have this work?

Thanks!

Parents
  • Got this to work finally!

    The CLIENT_BUFFERS_ENABLE switch is newer code than the nrf SDK I think. I got the appropriate libraries to compile with this set of options in my .proj file.

    # Enable OpenThread CoAP support API
    CONFIG_OPENTHREAD_COAP=y
    CONFIG_OPENTHREAD_SOURCES=y
    CONFIG_OPENTHREAD_COAP_OBSERVE=y
    CONFIG_OPENTHREAD_ENABLE_SERVICE=y
    CONFIG_OPENTHREAD_SRP_CLIENT=y
    CONFIG_OPENTHREAD_ECDSA=y

Reply
  • Got this to work finally!

    The CLIENT_BUFFERS_ENABLE switch is newer code than the nrf SDK I think. I got the appropriate libraries to compile with this set of options in my .proj file.

    # Enable OpenThread CoAP support API
    CONFIG_OPENTHREAD_COAP=y
    CONFIG_OPENTHREAD_SOURCES=y
    CONFIG_OPENTHREAD_COAP_OBSERVE=y
    CONFIG_OPENTHREAD_ENABLE_SERVICE=y
    CONFIG_OPENTHREAD_SRP_CLIENT=y
    CONFIG_OPENTHREAD_ECDSA=y

Children
No Data
Related