PelionIoT / distro-pelion-edge

Scripts for generating pelion-edge deb (Ubuntu) installer
Apache License 2.0
1 stars 2 forks source link

reenable mbed-fcc CBOR support #158

Closed costanic closed 3 years ago

costanic commented 3 years ago

This may fix the CBOR patch when mbed-fcc was updated from 4.6.0 to 4.8.0. This ports the patch to 4.8.0, plus addresses some code review comments in the upstreamed PR. This is untested.

kbgl commented 3 years ago

@costanic looks good. I added one change to prevent fcc from crashing if provided file is missing. Also updated launch-fcc.sh so it support CBOR and TCP modes. Changed default mode to CBOR (so we will not break backward compatibility); having TCP by default it has less sense for automated flow, as by default it uses random TCP port (so anyway we would need mbed-fcc configuration). Also reverted credentials path change (back to /var/lib/creds).

Tested both CBOR and TCP modes, CBOR feature behaves same as in old version - fcc ends successfully but I did not get edge-core correctly connected to the cloud (it is probably something wrong with my device.cbor file). TCP mode works correctly.

@kunal11191 is device.cbor feature tested in CI so we can be sure if this change did not break old behavior?

kunal11191 commented 3 years ago

@kunal11191 is device.cbor feature tested in CI so we can be sure if this change did not break old behavior? @kbgl device.cbor build is not being tested in ci right now

costanic commented 3 years ago

Thanks @kbgl for the crash fix. I'll incorporate that into my original patch and update this PR.

costanic commented 3 years ago

@kbgl I tested locally the CBOR functionality with docker-pelion-edge and it still seems to work as intended. This PR is probably ready to merge into the fix-fcc branch with the rest of the TCP work.