This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| app-notes:cumulocity-agent [2017/02/10 12:46] – [Download the Cumulocity C/C++ SDK] krepel | app-notes:cumulocity-agent [2021/08/04 09:20] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 5: | Line 5: | ||
| <code bash> | <code bash> | ||
| #For PowerPC: | #For PowerPC: | ||
| - | wget ftp:// | + | wget https:// |
| mkdir / | mkdir / | ||
| tar -xvf toolchain-ppc-4.8-linaro-x86_64.tar.bz2 -C / | tar -xvf toolchain-ppc-4.8-linaro-x86_64.tar.bz2 -C / | ||
| Line 31: | Line 31: | ||
| ==== Download the Cumulocity C/C++ SDK ==== | ==== Download the Cumulocity C/C++ SDK ==== | ||
| Cumulocity C++ Library is an asynchronous, | Cumulocity C++ Library is an asynchronous, | ||
| - | https:// | + | |
| + | [[https:// | ||
| + | |||
| + | [[https:// | ||
| <code bash> | <code bash> | ||
| unzip d627781f3afa.zip | unzip d627781f3afa.zip | ||
| Line 48: | Line 51: | ||
| cp Makefile.template Makefile | cp Makefile.template Makefile | ||
| </ | </ | ||
| - | ==== Add the Cumulocity agent to the SDK ==== | + | ==== Add the NetModule |
| Download the NetModule Cumulocity agent: | Download the NetModule Cumulocity agent: | ||
| <code bash> | <code bash> | ||
| Line 56: | Line 59: | ||
| Move the content of **src** and **include** folders to the **src** and **include** folders of the SDK. | Move the content of **src** and **include** folders to the **src** and **include** folders of the SDK. | ||
| <code bash> | <code bash> | ||
| - | cp src/* sdk_folder/src/ | + | cp src/* m2m-cumulocity-sdk-c-d627781f3afa/src/ |
| - | cp include/ | + | cp include/ |
| </ | </ | ||
| - | Edit the configfile (c8yAgent.conf) and move it to the router. | + | Edit the configfile (c8yAgent.conf) and add your cumulocity domain and your credentials path. Move the file to the router. |
| <code bash> | <code bash> | ||
| - | scp c8yAgent.conf user@host: | + | scp c8yAgent.conf |
| </ | </ | ||
| - | ==== You have to take some changes to the SDK ==== | + | ==== You have to take some changes to the cumulocity |
| We have to do this, because the toolchain don't support the function **to_string()**. | We have to do this, because the toolchain don't support the function **to_string()**. | ||
| include myString.h in the follow files: | include myString.h in the follow files: | ||
| Line 83: | Line 86: | ||
| * src/ | * src/ | ||
| ==== Build the agent ==== | ==== Build the agent ==== | ||
| - | Now we can build the agent for the target device. | + | Now we can build the cumulocity SDK for NetModule Agent within |
| <code bash> | <code bash> | ||
| export STAGING_DIR=/ | export STAGING_DIR=/ | ||
| Line 92: | Line 95: | ||
| make | make | ||
| </ | </ | ||
| - | Now go to the **src** folder. | + | Now go to the **src** folder |
| <code bash> | <code bash> | ||
| make | make | ||
| </ | </ | ||
| - | If all this steps was successful, then we can move the files to the router. We need the **src/ | + | If all this steps was successful, then we can move the files to the router. We need the **src/ |
| <code bash> | <code bash> | ||
| - | scp main user@host: | + | scp main <user>@<host>:<directory>/main |
| </ | </ | ||
| No we can make a SSH connection to the router and start the agent. | No we can make a SSH connection to the router and start the agent. | ||