{"id":19277643,"url":"https://github.com/wolkabout/wolkconnect-c","last_synced_at":"2025-08-05T16:06:17.184Z","repository":{"id":26924234,"uuid":"103125522","full_name":"Wolkabout/WolkConnect-C","owner":"Wolkabout","description":"C99 Connector library which provides easy connectivity to WolkAbout IoT Platform.","archived":false,"fork":false,"pushed_at":"2022-08-18T06:20:41.000Z","size":1270,"stargazers_count":3,"open_issues_count":0,"forks_count":6,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-22T00:37:28.113Z","etag":null,"topics":["c99","client-library","connectivity","dfu","fota","iot","iot-platform","wolkabout","wolkconnect"],"latest_commit_sha":null,"homepage":"https://demo.wolkabout.com","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/Wolkabout.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-09-11T11:04:01.000Z","updated_at":"2022-05-23T11:20:48.000Z","dependencies_parsed_at":"2022-08-16T09:30:29.038Z","dependency_job_id":null,"html_url":"https://github.com/Wolkabout/WolkConnect-C","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/Wolkabout/WolkConnect-C","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wolkabout%2FWolkConnect-C","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wolkabout%2FWolkConnect-C/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wolkabout%2FWolkConnect-C/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wolkabout%2FWolkConnect-C/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Wolkabout","download_url":"https://codeload.github.com/Wolkabout/WolkConnect-C/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wolkabout%2FWolkConnect-C/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268927302,"owners_count":24330251,"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","status":"online","status_checked_at":"2025-08-05T02:00:12.334Z","response_time":2576,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["c99","client-library","connectivity","dfu","fota","iot","iot-platform","wolkabout","wolkconnect"],"created_at":"2024-11-09T21:06:32.992Z","updated_at":"2025-08-05T16:06:17.121Z","avatar_url":"https://github.com/Wolkabout.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"``` \n██╗    ██╗ ██████╗ ██╗     ██╗  ██╗ ██████╗ ██████╗ ███╗   ██╗███╗   ██╗███████╗ ██████╗████████╗  \n██║    ██║██╔═══██╗██║     ██║ ██╔╝██╔════╝██╔═══██╗████╗  ██║████╗  ██║██╔════╝██╔════╝╚══██╔══╝  \n██║ █╗ ██║██║   ██║██║     █████╔╝ ██║     ██║   ██║██╔██╗ ██║██╔██╗ ██║█████╗  ██║        ██║     \n██║███╗██║██║   ██║██║     ██╔═██╗ ██║     ██║   ██║██║╚██╗██║██║╚██╗██║██╔══╝  ██║        ██║     \n╚███╔███╔╝╚██████╔╝███████╗██║  ██╗╚██████╗╚██████╔╝██║ ╚████║██║ ╚████║███████╗╚██████╗   ██║     \n ╚══╝╚══╝  ╚═════╝ ╚══════╝╚═╝  ╚═╝ ╚═════╝ ╚═════╝ ╚═╝  ╚═══╝╚═╝  ╚═══╝╚══════╝ ╚═════╝   ╚═╝     \n                                                                                                   \n                                                                                            ██████╗\n                                                                                           ██╔════╝\n                                                                                     █████╗██║     \n                                                                                     ╚════╝██║     \n                                                                                           ╚██████╗\n                                                                                            ╚═════╝\n```\n[![CMake](https://github.com/Wolkabout/WolkConnect-C/actions/workflows/cmake.yml/badge.svg?branch=development)](https://github.com/Wolkabout/WolkConnect-C/actions/workflows/cmake.yml)\n-----\nWolkAbout C99 Connector library for connecting devices to WolkAbout IoT platform instance.\n\nWolkConnect-C is transportation layer agnostic which means it is up to the user of the library to open socket to WolkAbout IoT platform,\nconfigure SSL if desired, and forward read/write implementation to WolkConnect-C Connector.\nWolkConnect-C Connector is not thread safe, and is written with cooperative scheduling in mind.\nThis allows WolkConnect-C Connector to work on wide variety of systems, bare metal to OS based ones.\n\nGiven examples are intended to be run on Debian based system.\n\nPrerequisite\n------\nFollowing tools/libraries are required in order to build WolkConnect-C Connector\n\n* libz-dev \u0026 wget\n* gcc \u0026 g++\n* cmake - version 2.8 or later\n* libssl-dev\n* clang-format\n* ruby\n* ceedling\n* valgrind\n\nFormer can be installed on Debian based system from terminal by invoking\n\n`sudo apt-get install libz-dev wget gcc g++ cmake libssl-dev clang-format ruby valgrind`\n\n`gem install ceedling`\n\nWhen dependencies are installed, Unix Makefiles build system can be generated by invoking `./configure`\n\nGenerated build system is located inside `build` directory.\n\nWolkConnect-C Connector library, and example are built from `build` directory by invoking `make all` in terminal.\n\nLibrary application is built to `out/lib` directory, and example application is built to `out/bin` directory.\n\nExample Usage\n-------------\n**Initialize WolkConnect-C Connector**\n\nCreate a device on WolkAbout IoT platform using `Simple example` device type.\nThis device type fits [simple example](https://github.com/Wolkabout/WolkConnect-C/blob/master/examples/simple/main.c) and demonstrates the periodic sending of a temperature_value sensor reading.\n\n```c\n/* WolkAbout Platform device connection parameters */\nstatic const char* device_key       = \"device_key\";\nstatic const char* device_password  = \"some_password\";\nstatic const char* hostname         = \"insert_host\";\nstatic int portno                   = 80; // TODO: insert port\nstatic char certs[]                 = \"../ca.crt\";\n\n/* Sample in-memory persistence storage - size 1MB */\nstatic uint8_t persistence_storage[1024*1024];\n\n/* WolkConnect-C Connector context */\nstatic wolk_ctx_t wolk;\n\n//...\n//...\n//...\n\nwolk_init(\u0026wolk,                                             /* Context */\n          send_buffer,                                       /* See send_func_t */\n          receive_buffer,                                    /* See recv_func_t */\n          device_key, device_password,                       /* Device key and password provided by WolkAbout IoT Platform upon device creation */\n          PUSH,                                              /* Device outbound mode - see outbound_mode_t */\n          NULL,                                              /* Feeds handler        - see feed_handler_t */\n\t      NULL,                                              /* Parameters handler   - see parameter_handler_t */\n\t      NULL);                                             /* Details synchronization handler   - see details_synchronization_handler_t */\n\nwolk_init_in_memory_persistence(\u0026wolk,                       /* Context */\n                                persistence_storage,         /* Address to start of the memory which will be used by persistence mechanism */\n                                sizeof(persistence_storage), /* Size of memory in bytes */\n                                false);                      /* If storage is full overwrite the oldest item when pushing */\n\nwolk_connect(\u0026wolk);\n```\nConsidering that WolkConnect C Connector is transportation layer agnostic, it is up to the user of it to open connection to\nWolkAbout IoT Platform, optionally setup TLS, and forward read/write callbacks WolkConnect-C Connector in initialization\nstep.\n\nSee `send_func_t` and `send_func_t` in `sources/wolk_connector.h`\n\n**Establishing connection with WolkAbout IoT platform:**\n```c\nwolk_connect(\u0026wolk);\n```\n**Adding feed example:**\n```c\nwolk_numeric_feeds_t feed = {0};\nfeed.value = 23;\nwolk_add_numeric_feed(\u0026wolk, \"T\", \u0026feed, 1)\n```\n**Data publish strategy:**\n\nData is pushed to WolkAbout IoT platform on demand by calling\n```c\nwolk_publish(\u0026wolk);\n```\n\n**Cooperative scheduling:**\n\nFunction `wolk_process(wolk_ctx_t *ctx)` is non-blocking in order to comply with cooperative scheduling,\nand it must be called periodically.\n\n```c\nwolk_process(\u0026wolk, 1);\n```\n\n**Disconnecting from the platform:**\n```c\nwolk_disconnect(\u0026wolk);\n```\n\n**Data persistence:**\n\nWolkConnect-C provides mechanism for persisting data in situations where readings can not be sent to WolkAbout IoT platform.\nDefault implementation can work with in-memory or memory mapped storage.\n\nPersisted readings are sent to WolkAbout IoT platform, in batches, on publish function call.\n\nIn cases when provided persistence implementation is suboptimal, one can use custom persistence by providing custom implementation.\n\n```c\nwolk_init_custom_persistence(\u0026wolk,\n                             persistence_push_impl,\n                             persistence_peek_impl, persistence_pop_impl,\n                             persistence_is_empty_impl);\n```\n\nFor more info on persistence mechanism see `sources/persistence/persistence.h` and `sources/persistence/in_memory_persistence.h` files.\n\n**Additional functionality**\n\nWolkConnect-C library has integrated additional features which can perform full WolkAbout IoT platform potential. Read more about full feature set example [HERE](https://github.com/Wolkabout/WolkConnect-C/tree/master/examples/full_feature_set).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwolkabout%2Fwolkconnect-c","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwolkabout%2Fwolkconnect-c","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwolkabout%2Fwolkconnect-c/lists"}