{"id":20588723,"url":"https://github.com/ciscodevnet/csmp-agent-lib","last_synced_at":"2025-04-14T21:54:04.168Z","repository":{"id":43872281,"uuid":"431026294","full_name":"CiscoDevNet/csmp-agent-lib","owner":"CiscoDevNet","description":"OpenCSMP: CiscoDevNet Opensource CSMP-Agent Library (Formerly CSMP-Agent)","archived":false,"fork":false,"pushed_at":"2025-03-31T14:08:46.000Z","size":62111,"stargazers_count":9,"open_issues_count":10,"forks_count":5,"subscribers_count":17,"default_branch":"main","last_synced_at":"2025-04-14T21:53:46.266Z","etag":null,"topics":["cisco","coap","csmp","embedded","fnd","ieee-802154","iiot","iot","ipv6","mesh","mesh-networks","silabs","wireless"],"latest_commit_sha":null,"homepage":"https://github.com/CiscoDevNet/csmp-agent-lib","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CiscoDevNet.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-11-23T08:52:15.000Z","updated_at":"2025-04-04T03:03:26.000Z","dependencies_parsed_at":"2025-02-27T18:04:02.348Z","dependency_job_id":null,"html_url":"https://github.com/CiscoDevNet/csmp-agent-lib","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CiscoDevNet%2Fcsmp-agent-lib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CiscoDevNet%2Fcsmp-agent-lib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CiscoDevNet%2Fcsmp-agent-lib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CiscoDevNet%2Fcsmp-agent-lib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CiscoDevNet","download_url":"https://codeload.github.com/CiscoDevNet/csmp-agent-lib/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248968755,"owners_count":21191158,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cisco","coap","csmp","embedded","fnd","ieee-802154","iiot","iot","ipv6","mesh","mesh-networks","silabs","wireless"],"created_at":"2024-11-16T07:26:07.965Z","updated_at":"2025-04-14T21:54:04.151Z","avatar_url":"https://github.com/CiscoDevNet.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Overview\nCoAP Simple Management Protocol (CSMP) is a device lifecycle management protocol optimized for resource constrained devices deployed within large-scale, bandwidth constrained IoT networks.\nThese instructions describe the build/run process for a C implementation of a sample CSMP Agent which incorporates the Cisco CSMP library `csmp-agent-lib`.\n\n## Building The CSMP Agent Sample and CSMP Agent Library\n\nThese instructions have been verified to work on Ubuntu 20.10 Desktop 64bit (RPi4 build and target platform).\n\nIt is assumed a snapshot of the CSMP agent's source repository has been acquired and placed on the build platform via Github repository https://github.com/CiscoDevNet/csmp-agent-lib.\n\nChange your default directory to the root of the CSMP Agent directory structure.\n\n1. Install build tools.\nInstall build-essential package (gcc compiler, make, etc.) as described here ... https://help.ubuntu.com/community/InstallingCompilers\n\n2. Confirm build target platform\nIf you are going to build for a different target platform, please set the correct gcc compiler for your target platform by modifying the line \"CC=gcc\" in \"Makefile\".\n\n3. Build\n\u003e   chmod 777 build.sh\n\u003e  ./build.sh\n\nIf everything goes well, you should see \"CsmpAgentLib_sample\" executable in \"sample\" directory.\n\n4. clean\nIf you want to clean the build files prior to a subsequent build ...\n\u003e  ./build.sh clean\n\n5. Additional debug output is enabled by modifying Makefile to include the line 'CFLAGS += -DPRINTDEBUG'\n\n## Running CSMP Agent Sample\n1. Run \"CsmpAgentLib_sample\" to start CSMP agent either with:\n\u003e ./CsmpAgentLib_sample -d \u003cFND IPv6 address\u003e\n\nOr provide full comamnd line parameter set to configure FND server's IPv6 address, agent's registration interval (in seconds), EUI of the Agent (example) ...\n\u003e./CsmpAgentLib_sample -d 2020::2020 -min 10 -max 100 -eid 00173B1122334455\n\nNOTE: a valid FND IPv6 address must be supplied.\n\n2. Once \"csmpsagent\" is started, it will begin registration attempts with the FND server.\n\n## Decoding CSMP Agent Messaging with Wireshark\nWireshark network analyzer may be used to observe CSMP messaging exchanged between the CSMP Agent and the FND instance. Note that this is a partial decode of the CoAP messaging and does not yet include decode of the TLV message payloads.\n\n### Install Wireshark\nFollow the instructions here ... https://itsfoss.com/install-wireshark-ubuntu/.  As of this writting, version 3.2.7 is installed.\n\n### Configure Wireshark for CSMP decoding.\nWireshark `Menu` -\u003e `Analyze` -\u003e `Decode As...` `+` -\u003e `Field : UDP port` -\u003e `value : 61628` -\u003e `Current : CoAP` -\u003e `OK`\n\n### Sample CSMP PCAP files.\nTest your Wireshark install by opening and observing the contents of the sample PCAPs provided in the folder `test/*.pcap`.\n\n## TLV Support\nCSMP messaging implements RESTful idioms with payloads encoded as Type/Length/Value tuples  Value is encoded using Google Protocol Buffers.  \nThe Protocol Buffer definitions of CSMP TLVs are contained in the .proto file located in the src/csmpagent/tlvs folder.\nSee 'src/csmpagent/csmpagent.c' for TLVs supported by the agent GET and POST methods.\n\nAdditions to the TLV set require ...\n1. modification of the .proto file TLV definitions\n2. compilation of the .proto file into .c and .h TLV files\n3. rebuild of the agent (to use the new TLV files).  \n\nUse `protoc-c` (1.3.3 or later) to compile *.proto file into *.c and *.h files used during the agent build.\n\n### Install protoc-c\n\u003e sudo apt-install protobuf-c-compiler  \n\n\nGo to src/csmpagent/tlvs/ and `make` to verify protoc-c is operating successfully.\n\n### Add TLVs\n1. Assign new TLV ID XXX in 'src/csmpagent/csmp.h'\n2. Add new TLV definition in `src/csmpagent/tlvs/CsmpTlvs.proto` and make to generate new CsmpTlvs.pb-c.c/CsmpTlvs.pb-c.h\n\n### Modify sample agent\n1. Add desired GET or POST method dispatch for the new TLV XXX within 'src/csmpagent/csmpagent.c'.  \n2. Add required GET or POST implementations following the examples in folder 'src/csmpagent/'.\n\n## Further Information for Developers\nA CSMP Developer Guide can be found in the /docs folder.  This guide describes how to install, build, and run the CSMP agent which will register and report metrics to an instance of Cisco Field Network Director.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fciscodevnet%2Fcsmp-agent-lib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fciscodevnet%2Fcsmp-agent-lib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fciscodevnet%2Fcsmp-agent-lib/lists"}