edgexfoundry / device-coap-c

EdgeX device service for CoAP-based REST protocol
Apache License 2.0
3 stars 18 forks source link

Use latest C SDK, v1.3.1 #5

Closed kb2ma closed 3 years ago

kb2ma commented 3 years ago

PR Checklist

Please check if your PR fulfills the following requirements:

If your build fails due to your commit message not passing the build checks, please review the guidelines here: https://github.com/edgexfoundry/edgex-examples/blob/master/.github/CONTRIBUTING.md.

What is the current behavior?

Presently device-coap uses C SDK v1.2.2.

Issue Number:

N/A

What is the new behavior?

As discussed in PR 3, must update to C SDK v1.3.1 to promote to main repository.

Does this PR introduce a breaking change?

New Imports

Are there any new imports or modules? If so, what are they used for and why?

No, just uses v1.3.1 callbacks and specifies default configuration values. We expect configuration values to be specified in configuration TOML files.

Specific Instructions

Are there any specific instructions or things that should be known prior to reviewing?

No.

Other information

I did have to update the native configuration resource for the ServerBindAddr parameter. Previously this value was blank, but now specifies 0.0.0.0. Otherwise, I found the native executable would attempt to use the default interface. See below. (Specific addresses elided.)

When ServerBindAddr = '' in configuration-native.toml:

level=INFO ts=2021-03-13T12:24:59Z app=device-coap msg="Starting HTTP server on interface system76, port 49988"
level=DEBUG ts=2021-03-13T12:24:59Z app=device-coap msg="Resolved interface is 2601:...::98e"
level=ERROR ts=2021-03-13T12:24:59Z app=device-coap msg="Unable to start HTTP server"
Error: 5: Failed to start HTTP server

FYI, from ip addr cmd:

    inet6 2601:...::98e/128 scope global dynamic noprefixroute 
       valid_lft 209683sec preferred_lft 209683sec