text
stringlengths
9
39.2M
dir
stringlengths
25
226
lang
stringclasses
163 values
created_date
timestamp[s]
updated_date
timestamp[s]
repo_name
stringclasses
751 values
repo_full_name
stringclasses
752 values
star
int64
1.01k
183k
len_tokens
int64
1
18.5M
```restructuredtext .. zephyr:code-sample:: zbus-benchmark :name: Benchmarking :relevant-api: zbus_apis Measure the time for sending 256KB from a producer to N consumers. This sample implements an application to measure the time for sending 256KB from the producer to the consumers. Building and Running ****...
/content/code_sandbox/samples/subsys/zbus/benchmark/README.rst
restructuredtext
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
1,674
```c /* */ #include "messages.h" #include <zephyr/kernel.h> #include <zephyr/sys/util_macro.h> #include <zephyr/sys/atomic.h> #include <zephyr/zbus/zbus.h> #define CONSUMER_STACK_SIZE (CONFIG_IDLE_STACK_SIZE + CONFIG_BM_MESSAGE_SIZE) extern atomic_t count; ZBUS_CHAN_DECLARE(bm_channel); #define SFY(i, _) s##i #d...
/content/code_sandbox/samples/subsys/zbus/benchmark/src/msg_sub.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
385
```objective-c /* */ #ifndef _MESSAGES_H_ #define _MESSAGES_H_ #include <stddef.h> #include <stdint.h> struct bm_msg { uint8_t bytes[CONFIG_BM_MESSAGE_SIZE]; }; #endif /* _MESSAGES_H_ */ ```
/content/code_sandbox/samples/subsys/zbus/benchmark/src/messages.h
objective-c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
49
```robotframework *** Settings *** Library Process Library String Library SerialLibrary Library CSVLibrary Suite Teardown Terminate All Processes kill=True *** Variables *** ${csv_file} zbus_dyn_benchmark_256kb.csv ${board} hifive1@B ${serial...
/content/code_sandbox/samples/subsys/zbus/benchmark/benchmark_256KB.robot
robotframework
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
831
```c /* */ #include "messages.h" #include <zephyr/kernel.h> #include <zephyr/sys/util_macro.h> #include <zephyr/sys/atomic.h> #include <zephyr/zbus/zbus.h> #define CONSUMER_STACK_SIZE (CONFIG_IDLE_STACK_SIZE + CONFIG_BM_MESSAGE_SIZE) extern atomic_t count; ZBUS_CHAN_DECLARE(bm_channel); #define SFY(i, _) s##i #d...
/content/code_sandbox/samples/subsys/zbus/benchmark/src/sub.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
474
```c /* */ #include "messages.h" #include <zephyr/fatal.h> #include <zephyr/kernel.h> #include <zephyr/logging/log.h> #include <zephyr/sys/util_macro.h> #include <zephyr/sys/atomic.h> #include <zephyr/zbus/zbus.h> #if defined(CONFIG_BOARD_NATIVE_POSIX) #include "native_rtc.h" #define GET_ARCH_TIME_NS() (native_rtc_g...
/content/code_sandbox/samples/subsys/zbus/benchmark/src/benchmark.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
714
```c /* */ #include "messages.h" #include <zephyr/kernel.h> #include <zephyr/sys/util_macro.h> #include <zephyr/sys/atomic.h> #include <zephyr/zbus/zbus.h> #define CONSUMER_STACK_SIZE (CONFIG_IDLE_STACK_SIZE + CONFIG_BM_MESSAGE_SIZE) extern atomic_t count; static void s_cb(const struct zbus_channel *chan); ZBUS_C...
/content/code_sandbox/samples/subsys/zbus/benchmark/src/lis.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
305
```unknown config ZBUS_MSG_SUBSCRIBER_SAMPLE bool "Force selection of heap listener configurations" default y select SYS_HEAP_LISTENER select SYS_HEAP_RUNTIME_STATS config ZBUS_MSG_SUBSCRIBER_SAMPLE_ISOLATED_BUF_POOL_SIZE int "Set size of the isolated pool" default 32 depends on ZBUS_MSG_SUBSCRIBER_NET_BUF_POO...
/content/code_sandbox/samples/subsys/zbus/msg_subscriber/Kconfig
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
90
```unknown CONFIG_LOG=y CONFIG_LOG_MODE_MINIMAL=y CONFIG_ASSERT=y CONFIG_BOOT_BANNER=n CONFIG_MAIN_THREAD_PRIORITY=3 CONFIG_ZBUS=y CONFIG_ZBUS_LOG_LEVEL_INF=y CONFIG_ZBUS_CHANNEL_NAME=y CONFIG_ZBUS_OBSERVER_NAME=y CONFIG_ZBUS_MSG_SUBSCRIBER=y CONFIG_HEAP_MEM_POOL_SIZE=1024 CONFIG_ZBUS_MSG_SUBSCRIBER_NET_BUF_POOL_SIZE=3...
/content/code_sandbox/samples/subsys/zbus/msg_subscriber/prj.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
91
```restructuredtext .. zephyr:code-sample:: zbus-msg-subscriber :name: Message subscriber :relevant-api: zbus_apis Use zbus message subscribers to listen to messages published to channels. Overview ******** This sample illustrates how to use a message subscriber in different ways with other types of observer...
/content/code_sandbox/samples/subsys/zbus/msg_subscriber/README.rst
restructuredtext
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
1,256
```c /* */ #include <zephyr/kernel.h> #include <zephyr/logging/log.h> #include <zephyr/sys/heap_listener.h> #include <zephyr/zbus/zbus.h> LOG_MODULE_REGISTER(sample, CONFIG_LOG_MAX_LEVEL); extern struct sys_heap _system_heap; static size_t total_allocated; void on_heap_alloc(uintptr_t heap_id, void *mem, size_t byt...
/content/code_sandbox/samples/subsys/zbus/msg_subscriber/src/main.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
2,133
```restructuredtext .. zephyr:code-sample:: zbus-work-queue :name: Work queue :relevant-api: zbus_apis Use a work queue to process zbus messages in various ways. Overview ******** This sample implements an application using zbus to illustrate three different reaction options. First, the observer can react "i...
/content/code_sandbox/samples/subsys/zbus/work_queue/README.rst
restructuredtext
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
940
```unknown CONFIG_LOG=y CONFIG_THREAD_NAME=y CONFIG_ASSERT=y CONFIG_LOG_MODE_MINIMAL=y CONFIG_PRINTK_SYNC=y CONFIG_ZBUS=y CONFIG_ZBUS_LOG_LEVEL_INF=y ```
/content/code_sandbox/samples/subsys/zbus/work_queue/prj.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
40
```yaml sample: name: Work queue common: tags: zbus harness: console integration_platforms: - qemu_x86 harness_config: type: multi_line ordered: false regex: - "I: Sensor msg processed by CALLBACK fh1: temp = 10, press = 1, humidity = 100" - "I: Sensor msg processed by CALLBACK fh2...
/content/code_sandbox/samples/subsys/zbus/work_queue/sample.yaml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
588
```c /* */ #include "messages.h" #include <zephyr/logging/log.h> #include <zephyr/zbus/zbus.h> LOG_MODULE_DECLARE(zbus, CONFIG_ZBUS_LOG_LEVEL); ZBUS_CHAN_DECLARE(sensor_data_chan); void peripheral_thread(void) { struct sensor_msg sm = {0}; while (1) { LOG_DBG("Sending sensor data..."); sm.press += 1; sm.t...
/content/code_sandbox/samples/subsys/zbus/work_queue/src/sensors.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
156
```objective-c /* */ #ifndef _MESSAGES_H_ #define _MESSAGES_H_ #include <stdint.h> struct version_msg { uint8_t major; uint8_t minor; uint16_t build; }; struct sensor_msg { uint32_t temp; uint32_t press; uint32_t humidity; }; #endif /* _MESSAGES_H_ */ ```
/content/code_sandbox/samples/subsys/zbus/work_queue/src/messages.h
objective-c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
68
```c /* */ #include "messages.h" #include <stdint.h> #include <zephyr/kernel.h> #include <zephyr/logging/log.h> #include <zephyr/sys/util_macro.h> #include <zephyr/zbus/zbus.h> LOG_MODULE_DECLARE(zbus, CONFIG_ZBUS_LOG_LEVEL); ZBUS_CHAN_DEFINE(version_chan, /* Name */ struct version_msg, /* Message type */ ...
/content/code_sandbox/samples/subsys/zbus/work_queue/src/main.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
1,405
```yaml sample: name: Message subscriber tests: sample.zbus.msg_subscriber_dynamic: harness: console extra_configs: - CONFIG_ZBUS_LOG_LEVEL_DBG=y harness_config: type: multi_line ordered: false regex: - "^.*?I: ----> Publishing to acc_data_chan channel" - "^.*?I: ...
/content/code_sandbox/samples/subsys/zbus/msg_subscriber/sample.yaml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
8,531
```unknown CONFIG_LOG=y CONFIG_LOG_MODE_MINIMAL=y CONFIG_BOOT_BANNER=n CONFIG_MAIN_THREAD_PRIORITY=5 CONFIG_ZBUS=y CONFIG_ZBUS_LOG_LEVEL_INF=y ```
/content/code_sandbox/samples/subsys/zbus/confirmed_channel/prj.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
38
```yaml sample: name: Confirmed message tests: sample.zbus.confirmed_message: harness: console harness_config: type: multi_line ordered: false regex: - "I: From listener -> Confirmed message payload = 0" - "I: From bar_sub1 subscriber -> Confirmed message payload = 0" ...
/content/code_sandbox/samples/subsys/zbus/confirmed_channel/sample.yaml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
277
```restructuredtext .. zephyr:code-sample:: zbus-confirmed-channel :name: Confirmed channel :relevant-api: zbus_apis Use confirmed zbus channels to ensure all subscribers consume a message. Overview ******** This sample implements a simple way of using confirmed channels in zbus. The confirmed channel can on...
/content/code_sandbox/samples/subsys/zbus/confirmed_channel/README.rst
restructuredtext
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
444
```restructuredtext .. _networking-samples: Networking Samples ################## .. toctree:: :maxdepth: 1 :glob: **/* ```
/content/code_sandbox/samples/net/net.rst
restructuredtext
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
33
```restructuredtext .. zephyr:code-sample:: sockets-net-mgmt :name: Network management socket :relevant-api: bsd_sockets net_if Listen to network management events using a network management socket. Overview ******** The net-mgmt-socket sample application for Zephyr implements a listener for network managem...
/content/code_sandbox/samples/net/sockets/net_mgmt/README.rst
restructuredtext
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
286
```c /* */ #include <zephyr/kernel.h> #include <zephyr/logging/log.h> #include <zephyr/zbus/zbus.h> LOG_MODULE_DECLARE(zbus, CONFIG_ZBUS_LOG_LEVEL); static atomic_t sub_count = ATOMIC_INIT(0); struct confirmed_msg { uint32_t payload; }; ZBUS_CHAN_DEFINE(confirmed_chan, /* Name */ struct confirmed_msg, /*...
/content/code_sandbox/samples/subsys/zbus/confirmed_channel/src/main.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
862
```yaml common: harness: net depends_on: netif min_flash: 210 tags: - net - socket - mgmt platform_exclude: - native_posix - native_posix/native/64 sample: description: Test network management socket sample name: net_mgmt socket tests: sample.net.sockets.net_mgmt.kernelmode: extr...
/content/code_sandbox/samples/net/sockets/net_mgmt/sample.yaml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
145
```unknown # Generic networking options CONFIG_NETWORKING=y CONFIG_NET_UDP=y CONFIG_NET_TCP=y CONFIG_NET_IPV6=y CONFIG_NET_IPV4=y CONFIG_NET_SOCKETS=y CONFIG_POSIX_API=y CONFIG_ZVFS_OPEN_MAX=6 CONFIG_NET_SOCKETS_NET_MGMT=y CONFIG_NET_MGMT_EVENT=y # Kernel options CONFIG_ENTROPY_GENERATOR=y CONFIG_TEST_RANDOM_GENERATOR...
/content/code_sandbox/samples/net/sockets/net_mgmt/prj.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
271
```restructuredtext .. zephyr:code-sample:: sntp-client :name: SNTP client :relevant-api: bsd_sockets sntp Use SNTP to get the current time from the host. Overview ******** This sample is a simple SNTP client showing how to retrieve the current time in seconds since 1st January 1970. This demo assumes that...
/content/code_sandbox/samples/net/sockets/sntp_client/README.rst
restructuredtext
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
221
```unknown # General config CONFIG_REQUIRES_FULL_LIBC=y CONFIG_POSIX_API=y # Networking config CONFIG_NETWORKING=y CONFIG_NET_IPV4=y CONFIG_NET_IPV6=y CONFIG_NET_UDP=y CONFIG_NET_SHELL=y # Sockets CONFIG_NET_SOCKETS=y CONFIG_NET_SOCKETS_POLL_MAX=4 # Network driver config CONFIG_TEST_RANDOM_GENERATOR=y # Network add...
/content/code_sandbox/samples/net/sockets/sntp_client/prj.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
256
```yaml sample: description: SNTP client sample name: sntp_client common: harness: net tags: net tests: sample.net.sockets.sntp_client: platform_allow: - qemu_x86 - native_sim ```
/content/code_sandbox/samples/net/sockets/sntp_client/sample.yaml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
56
```objective-c /* * */ #ifndef __CONFIG_H__ #define __CONFIG_H__ #ifdef CONFIG_NET_CONFIG_SETTINGS #ifdef CONFIG_NET_IPV6 #define SERVER_ADDR6 CONFIG_NET_CONFIG_PEER_IPV6_ADDR #endif #define SERVER_ADDR CONFIG_NET_CONFIG_PEER_IPV4_ADDR #else #ifdef CONFIG_NET_IPV6 #define SERVER_ADDR6 "2001:db8::2" #endif #defin...
/content/code_sandbox/samples/net/sockets/sntp_client/src/config.h
objective-c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
98
```c /* * */ #include <zephyr/logging/log.h> LOG_MODULE_REGISTER(net_mgmt_sock_sample, LOG_LEVEL_DBG); #include <zephyr/kernel.h> #include <errno.h> #include <stdio.h> #include <zephyr/net/socket.h> #include <zephyr/net/socket_net_mgmt.h> #include <zephyr/net/net_if.h> #define MAX_BUF_LEN 64 #define STACK_SIZE 102...
/content/code_sandbox/samples/net/sockets/net_mgmt/src/main.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
1,141
```unknown # Networking Config: CONFIG_NETWORKING=y CONFIG_NET_NATIVE=n CONFIG_NET_IPV4=y CONFIG_NET_IPV6=n CONFIG_NET_CONFIG_NEED_IPV6=n CONFIG_NET_SOCKETS=y # Enable SimpleLink WiFi Driver and Socket Offload CONFIG_WIFI=y CONFIG_WIFI_SIMPLELINK=y CONFIG_NET_SOCKETS_OFFLOAD=y # Disable unneeded settings from the bas...
/content/code_sandbox/samples/net/sockets/sntp_client/boards/cc3220sf_launchxl.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
145
```c /* * */ #include <zephyr/logging/log.h> LOG_MODULE_REGISTER(net_sntp_client_sample, LOG_LEVEL_DBG); #include <zephyr/net/sntp.h> #include <arpa/inet.h> #include "config.h" #define SNTP_PORT 123 int main(void) { struct sntp_ctx ctx; struct sockaddr_in addr; #if defined(CONFIG_NET_IPV6) struct sockaddr_in6...
/content/code_sandbox/samples/net/sockets/sntp_client/src/main.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
572
```unknown mainmenu "CoAP Download Sample Application" config NET_SAMPLE_COAP_SERVER_PORT int "CoAP server port" default 5683 help CoAP server port that the application should send requests to. config NET_SAMPLE_COAP_RESOURCE_PATH string "The CoAP resource path to download" default "test.txt" help The pa...
/content/code_sandbox/samples/net/sockets/coap_download/Kconfig
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
102
```unknown # Networking CONFIG_NETWORKING=y CONFIG_NET_UDP=y CONFIG_NET_SOCKETS=y CONFIG_NET_CONNECTION_MANAGER=y # Logging CONFIG_LOG=y CONFIG_NET_LOG=y # CoAP CONFIG_COAP=y CONFIG_COAP_CLIENT=y # Network application options and configuration CONFIG_NET_CONFIG_SETTINGS=y CONFIG_NET_CONFIG_NEED_IPV6=y CONFIG_NET_CON...
/content/code_sandbox/samples/net/sockets/coap_download/prj.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
146
```yaml sample: name: CoAP Download Sample tests: sample.net.sockets.coap_download: harness: net filter: CONFIG_ENTROPY_HAS_DRIVER depends_on: netif tags: - net - coap integration_platforms: - native_sim - nucleo_h753zi ```
/content/code_sandbox/samples/net/sockets/coap_download/sample.yaml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
74
```restructuredtext .. zephyr:code-sample:: coap-download :name: CoAP download :relevant-api: coap Use the CoAP client API to download data via a GET request Overview ******** This sample demonstrates the use of the CoAP client API to make GET requests to a CoAP server. If the data to be fetched is larger t...
/content/code_sandbox/samples/net/sockets/coap_download/README.rst
restructuredtext
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
866
```unknown CONFIG_NO_OPTIMIZATIONS=y CONFIG_DEBUG=y CONFIG_ASSERT=y CONFIG_STACK_SENTINEL=y CONFIG_STACK_CANARIES=y ```
/content/code_sandbox/samples/net/sockets/tcp/overlay-debug.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
31
```unknown # Overlay for experimental TCP as qemu_x86 target against the sanity check CONFIG_NET_SLIP_TAP=y CONFIG_SLIP_MAC_ADDR="00:00:00:00:00:01" ```
/content/code_sandbox/samples/net/sockets/tcp/overlay-slip.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
42
```unknown # Overlay for experimental TCP as qemu_x86 with E1000 CONFIG_PCIE=y CONFIG_NET_L2_ETHERNET=y CONFIG_NET_QEMU_ETHERNET=y ```
/content/code_sandbox/samples/net/sockets/tcp/overlay-e1000.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
37
```unknown CONFIG_NET_PKT_LOG_LEVEL_DBG=y CONFIG_NET_BUF_LOG=y CONFIG_NET_BUF_LOG_LEVEL_DBG=y ```
/content/code_sandbox/samples/net/sockets/tcp/overlay-log-pkt.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
23
```unknown CONFIG_LOG=y CONFIG_LOG_MODE_IMMEDIATE=y CONFIG_LOG_BACKEND_SHOW_COLOR=n CONFIG_NET_LOG=y #CONFIG_NET_IF_LOG_LEVEL_DBG=y #CONFIG_NET_L2_ETHERNET_LOG_LEVEL_DBG=y CONFIG_NET_SOCKETS_LOG_LEVEL_DBG=y CONFIG_NET_CONN_LOG_LEVEL_DBG=y CONFIG_NET_CONTEXT_LOG_LEVEL_DBG=y CONFIG_NET_TCP_LOG_LEVEL_DBG=y ```
/content/code_sandbox/samples/net/sockets/tcp/overlay-log.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
79
```c /* * */ #include <zephyr/kernel.h> #include <zephyr/logging/log.h> #include <zephyr/net/net_mgmt.h> #include <zephyr/net/socket.h> #include <zephyr/net/coap_client.h> #include <inttypes.h> #include <errno.h> LOG_MODULE_REGISTER(coap_download, LOG_LEVEL_INF); static K_SEM_DEFINE(net_connected_sem, 0, 1); stati...
/content/code_sandbox/samples/net/sockets/coap_download/src/main.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
908
```restructuredtext .. zephyr:code-sample:: sockets-tcp-sample :name: TCP sample for TTCN-3 based sanity check :relevant-api: bsd_sockets Use TTCN-3 to validate the functionality of the TCP stack. Overview ******** This application is used together with the TTCN-3 based sanity check to validate the function...
/content/code_sandbox/samples/net/sockets/tcp/README.rst
restructuredtext
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
268
```unknown #CONFIG_NET_IF_LOG_LEVEL_DBG=y #CONFIG_NET_L2_ETHERNET_LOG_LEVEL_DBG=y CONFIG_SLIP_LOG_LEVEL_DBG=y CONFIG_ETH_E1000_VERBOSE_DEBUG=y ```
/content/code_sandbox/samples/net/sockets/tcp/overlay-log-extra2.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
40
```unknown CONFIG_X86_MMU=n ```
/content/code_sandbox/samples/net/sockets/tcp/overlay-nommu.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
8
```unknown CONFIG_NET_MGMT_EVENT_STACK_SIZE=65535 CONFIG_PRIVILEGED_STACK_SIZE=65535 CONFIG_NET_TX_STACK_SIZE=130944 CONFIG_NET_RX_STACK_SIZE=130944 CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=65535 CONFIG_MAIN_STACK_SIZE=65535 CONFIG_IDLE_STACK_SIZE=65535 CONFIG_ISR_STACK_SIZE=65535 CONFIG_LOG_PROCESS_THREAD_STACK_SIZE=65535 ...
/content/code_sandbox/samples/net/sockets/tcp/overlay-max-stacks.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
84
```unknown #CONFIG_NET_IF_LOG_LEVEL_DBG=y #CONFIG_NET_L2_ETHERNET_LOG_LEVEL_DBG=y #CONFIG_SLIP_LOG_LEVEL_DBG=y CONFIG_ETHERNET_LOG_LEVEL_DBG=y ```
/content/code_sandbox/samples/net/sockets/tcp/overlay-log-extra.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
41
```unknown CONFIG_REQUIRES_FULL_LIBC=y CONFIG_NETWORKING=y CONFIG_NET_SOCKETS=y CONFIG_POSIX_API=y CONFIG_NET_IPV4=y CONFIG_NET_IPV6=y CONFIG_NET_CONFIG_SETTINGS=y CONFIG_NET_CONFIG_MY_IPV4_ADDR="192.0.2.1" CONFIG_NET_CONFIG_PEER_IPV4_ADDR="192.0.2.2" CONFIG_NET_CONFIG_MY_IPV6_ADDR="2001:db8::1" CONFIG_NET_CONFIG...
/content/code_sandbox/samples/net/sockets/tcp/prj.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
147
```yaml sample: description: A sample for running TTCN-3 based sanity check for TCP name: tcp tests: sample.net.socket.tcp: filter: CONFIG_FULL_LIBC_SUPPORTED and not CONFIG_NATIVE_LIBC harness: net platform_allow: qemu_x86 tags: - socket - net - tcp integration_platforms: ...
/content/code_sandbox/samples/net/sockets/tcp/sample.yaml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
87
```unknown CONFIG_NET_SOCKETS_SOCKOPT_TLS=y # Enable TLS credential filenames for secure socket offload CONFIG_TLS_CREDENTIAL_FILENAMES=y ```
/content/code_sandbox/samples/net/sockets/http_get/overlay-tls-offload.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
31
```unknown CONFIG_ETH_NATIVE_POSIX=n CONFIG_NET_DRIVERS=y CONFIG_NET_SOCKETS=y CONFIG_NET_SOCKETS_OFFLOAD=y CONFIG_NET_NATIVE_OFFLOADED_SOCKETS=y CONFIG_HEAP_MEM_POOL_SIZE=1024 ```
/content/code_sandbox/samples/net/sockets/http_get/overlay-nsos.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
47
```c /* * */ /* TCP Sample for TTCN-3 based Sanity Check */ #include <stdio.h> #include <stdlib.h> #include <errno.h> #include <zephyr/net/socket.h> #include <zephyr/data/json.h> #include <tp.h> #define UDP_PORT 4242 #define perror(fmt, args...) \ do { \ printf("Error: " fmt "(): %s\n" ## args, st...
/content/code_sandbox/samples/net/sockets/tcp/src/main.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
442
```unknown CONFIG_MAIN_STACK_SIZE=4096 # TLS configuration CONFIG_MBEDTLS=y CONFIG_MBEDTLS_BUILTIN=y CONFIG_MBEDTLS_ENABLE_HEAP=y CONFIG_MBEDTLS_HEAP_SIZE=60000 CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN=7168 CONFIG_MBEDTLS_HASH_ALL_ENABLED=y CONFIG_MBEDTLS_CMAC=y CONFIG_NET_SOCKETS_SOCKOPT_TLS=y ```
/content/code_sandbox/samples/net/sockets/http_get/overlay-tls.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
84
```unknown # General config CONFIG_MAIN_STACK_SIZE=1536 CONFIG_REQUIRES_FULL_LIBC=y # Networking config CONFIG_NETWORKING=y CONFIG_NET_IPV4=y CONFIG_NET_IPV6=y CONFIG_NET_TCP=y CONFIG_NET_SOCKETS=y CONFIG_POSIX_API=y CONFIG_DNS_RESOLVER=y CONFIG_DNS_SERVER_IP_ADDRESSES=y CONFIG_DNS_SERVER1="192.0.2.2" # Network dri...
/content/code_sandbox/samples/net/sockets/http_get/prj.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
181
```restructuredtext .. zephyr:code-sample:: sockets-http-get :name: HTTP GET using plain sockets :relevant-api: bsd_sockets tls_credentials secure_sockets_options Implement an HTTP(S) client using plain BSD sockets. Overview ******** The sockets/http_get sample application for Zephyr implements a simple HTT...
/content/code_sandbox/samples/net/sockets/http_get/README.rst
restructuredtext
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
703
```unknown # This makefile builds the sample for a POSIX system, like Linux http_get: src/http_get.c $(CC) $^ -o $@ ```
/content/code_sandbox/samples/net/sockets/http_get/Makefile.host
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
34
```yaml sample: description: BSD Sockets API HTTP GET example name: socket_http_get common: filter: CONFIG_FULL_LIBC_SUPPORTED depends_on: netif min_ram: 32 min_flash: 80 tags: - net - socket platform_exclude: - native_posix - native_posix/native/64 tests: sample.net.sockets.http_get: ...
/content/code_sandbox/samples/net/sockets/http_get/sample.yaml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
401
```objective-c /* * */ #ifndef __CA_CERTIFICATE_H__ #define __CA_CERTIFICATE_H__ #define CA_CERTIFICATE_TAG 1 /* By default only certificates in DER format are supported. If you want to use * certificate in PEM format, you can enable support for it in Kconfig. */ /* GlobalSign Root CA - R1 for path_to_url */ #i...
/content/code_sandbox/samples/net/sockets/http_get/src/ca_certificate.h
objective-c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
130
```unknown # Networking Config: CONFIG_NETWORKING=y CONFIG_NET_NATIVE=n CONFIG_NET_IPV4=y CONFIG_NET_IPV6=n CONFIG_NET_SOCKETS=y # Enable SimpleLink WiFi Driver and Socket Offload CONFIG_WIFI=y CONFIG_WIFI_SIMPLELINK=y CONFIG_NET_SOCKETS_OFFLOAD=y # Disable unneeded settings from the base prj.conf: CONFIG_DNS_RESOLVE...
/content/code_sandbox/samples/net/sockets/http_get/boards/cc3235sf_launchxl.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
161
```c /* * */ #include <stdio.h> #include <stdlib.h> #if !defined(__ZEPHYR__) #include <netinet/in.h> #include <sys/socket.h> #include <arpa/inet.h> #include <unistd.h> #include <netdb.h> #else #include <zephyr/net/socket.h> #include <zephyr/kernel.h> #if defined(CONFIG_NET_SOCKETS_SOCKOPT_TLS) #include <zephyr/...
/content/code_sandbox/samples/net/sockets/http_get/src/http_get.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
797
```unknown # Networking Config: CONFIG_NETWORKING=y CONFIG_NET_NATIVE=n CONFIG_NET_IPV4=y CONFIG_NET_IPV6=n CONFIG_NET_SOCKETS=y # Enable SimpleLink WiFi Driver and Socket Offload CONFIG_WIFI=y CONFIG_WIFI_SIMPLELINK=y CONFIG_NET_SOCKETS_OFFLOAD=y # Disable unneeded settings from the base prj.conf: CONFIG_DNS_RESOLVE...
/content/code_sandbox/samples/net/sockets/http_get/boards/cc3220sf_launchxl.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
161
```linker script #include <zephyr/linker/iterable_sections.h> ITERABLE_SECTION_ROM(http_resource_desc_test_http_service, Z_LINK_ITERABLE_SUBALIGN) ITERABLE_SECTION_ROM(http_resource_desc_test_https_service, Z_LINK_ITERABLE_SUBALIGN) ```
/content/code_sandbox/samples/net/sockets/http_server/sections-rom.ld
linker script
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
50
```unknown # Config options for http2 server sample application mainmenu "HTTP2 server sample application" config NET_SAMPLE_HTTP_SERVICE bool "Enable http service" default y config NET_SAMPLE_HTTP_SERVER_SERVICE_PORT int "Port number for http service" default 80 depends on NET_SAMPLE_HTTP_SERVICE config NET_...
/content/code_sandbox/samples/net/sockets/http_server/Kconfig
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
374
```restructuredtext .. zephyr:code-sample:: sockets-http-server :name: HTTP Server :relevant-api: http_service http_server tls_credentials Implement an HTTP(s) Server demonstrating various resource types. Overview -------- This sample application demonstrates the use of the :ref:`http_server_interface` libr...
/content/code_sandbox/samples/net/sockets/http_server/README.rst
restructuredtext
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
1,053
```yaml sample: description: HTTP Server Sample name: http_server_sample common: harness: net depends_on: netif min_ram: 192 tags: - http - net - server - socket platform_exclude: - native_posix - native_posix/native/64 tests: sample.net.sockets.http.server: {} ```
/content/code_sandbox/samples/net/sockets/http_server/sample.yaml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
87
```unknown # General config CONFIG_MAIN_STACK_SIZE=3072 CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048 CONFIG_SHELL=y CONFIG_LOG=y CONFIG_ENTROPY_GENERATOR=y CONFIG_TEST_RANDOM_GENERATOR=y CONFIG_INIT_STACKS=y CONFIG_ZVFS_OPEN_MAX=32 CONFIG_POSIX_API=y CONFIG_FDTABLE=y CONFIG_NET_SOCKETS_POLL_MAX=32 # Eventfd CONFIG_EVENTFD=...
/content/code_sandbox/samples/net/sockets/http_server/prj.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
529
```objective-c /* * */ #ifndef __CERTIFICATE_H__ #define __CERTIFICATE_H__ enum tls_tag { /** The Certificate Authority public key */ HTTP_SERVER_CA_CERTIFICATE_TAG, /** Used for both the public and private server keys */ HTTP_SERVER_CERTIFICATE_TAG, /** Used for both the public and private client keys */ HTT...
/content/code_sandbox/samples/net/sockets/http_server/src/certificate.h
objective-c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
242
```c /* * */ #include <stdio.h> #include <zephyr/kernel.h> #include <zephyr/net/tls_credentials.h> #include <zephyr/net/http/server.h> #include <zephyr/net/http/service.h> #include <zephyr/net/net_ip.h> #include <zephyr/net/socket.h> #include <zephyr/net/websocket.h> #include <zephyr/net/net_mgmt.h> #include <zephy...
/content/code_sandbox/samples/net/sockets/http_server/src/ws.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
2,400
```objective-c /* * */ /** * @brief Setup websocket for echoing data back to client * * @param ws_socket Socket file descriptor associated with websocket * @param user_data User data pointer * * @return 0 on success */ int ws_echo_setup(int ws_socket, void *user_data); /** * @brief Setup websocket for sendi...
/content/code_sandbox/samples/net/sockets/http_server/src/ws.h
objective-c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
121
```objective-c /* * */ #ifndef __DUMMY_PSK_H__ #define __DUMMY_PSK_H__ static const unsigned char psk[] = {0x01, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f}; static const char psk_id[] = "PSK_identity"; #endif /* __DUMMY_PSK_H__ */ ```
/content/code_sandbox/samples/net/sockets/http_server/src/dummy_psk.h
objective-c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
136
```javascript /* * */ async function fetchUptime() { try { const response = await fetch("/uptime"); if (!response.ok) { throw new Error(`Response status: ${response.status}`); } const json = await response.json(); const uptime = document.getElementById("uptime"); uptime.innerHTML = "Uptime: " + json ...
/content/code_sandbox/samples/net/sockets/http_server/src/static_web_resources/main.js
javascript
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
454
```html <!DOCTYPE html> <html lang="en"> <head> <script src="main.js"></script> <title>Zephyr HTTP Server</title> </head> <body> <h1>Welcome to Zephyr HTTP Server!</h1> <p>This is a simple HTML file.</p> <h4>LED Control</h4> <p>The buttons below toggle the LED on the board, or print a message t...
/content/code_sandbox/samples/net/sockets/http_server/src/static_web_resources/index.html
html
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
477
```c /* * */ #include <stdio.h> #include <inttypes.h> #include <zephyr/kernel.h> #include <zephyr/net/tls_credentials.h> #include <zephyr/net/http/server.h> #include <zephyr/net/http/service.h> #include <zephyr/net/net_ip.h> #include <zephyr/net/socket.h> #include "zephyr/device.h" #include "zephyr/sys/util.h" #inc...
/content/code_sandbox/samples/net/sockets/http_server/src/main.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
2,668
```shell if [ -z "$RUNNING_FROM_MAIN_SCRIPT" ]; then echo "Do not run this script directly!" echo "Run $ZEPHYR_BASE/scripts/net/run-sample-tests.sh instead." exit 1 fi start_configuration || return $? start_zephyr start_docker "/net-tools/libcoap/examples/etsi_coaptest.sh -i eth0 192.0.2.1" \ || retur...
/content/code_sandbox/samples/net/sockets/coap_server/docker-test.sh
shell
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
115
```linker script #include <zephyr/linker/iterable_sections.h> ITERABLE_SECTION_RAM(coap_resource_coap_server, Z_LINK_ITERABLE_SUBALIGN) ```
/content/code_sandbox/samples/net/sockets/coap_server/sections-ram.ld
linker script
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
33
```unknown # Generic networking options CONFIG_NETWORKING=y CONFIG_REQUIRES_FULL_LIBC=y CONFIG_NET_UDP=y # Socket CONFIG_NET_SOCKETS=y CONFIG_POSIX_API=y CONFIG_NET_SOCKETS_POLL_MAX=4 # CoAP CONFIG_COAP=y CONFIG_COAP_SERVER=y CONFIG_COAP_SERVER_WELL_KNOWN_CORE=y CONFIG_COAP_WELL_KNOWN_BLOCK_WISE=n # Kernel options C...
/content/code_sandbox/samples/net/sockets/coap_server/prj.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
270
```restructuredtext .. zephyr:code-sample:: coap-server :name: CoAP service :relevant-api: coap coap_service Use the CoAP server subsystem to register CoAP resources. Overview ******** This sample shows how to register CoAP resources to a main CoAP service. The CoAP server implementation expects all service...
/content/code_sandbox/samples/net/sockets/coap_server/README.rst
restructuredtext
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
438
```yaml common: filter: CONFIG_FULL_LIBC_SUPPORTED and not CONFIG_NATIVE_LIBC sample: description: BSD Sockets API CoAP server example name: socket_coap_server tests: sample.net.sockets.coap_server: harness: net tags: - net - socket platform_allow: - native_sim - qemu_x86 ``...
/content/code_sandbox/samples/net/sockets/coap_server/sample.yaml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
82
```c /* * */ #include <zephyr/logging/log.h> LOG_MODULE_DECLARE(net_coap_service_sample); #include <zephyr/sys/printk.h> #include <zephyr/net/coap_service.h> #include <zephyr/net/coap_link_format.h> static int core_get(struct coap_resource *resource, struct coap_packet *request, struct sockaddr *addr, ...
/content/code_sandbox/samples/net/sockets/coap_server/src/core.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
500
```c /* * */ #include <zephyr/logging/log.h> LOG_MODULE_DECLARE(net_coap_service_sample); #include <zephyr/sys/printk.h> #include <zephyr/net/coap_service.h> static int location_query_post(struct coap_resource *resource, struct coap_packet *request, struct sockaddr *addr, socklen_t addr_len) { ...
/content/code_sandbox/samples/net/sockets/coap_server/src/location_query.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
438
```c /* * */ #include <zephyr/logging/log.h> LOG_MODULE_DECLARE(net_coap_service_sample); #include <zephyr/sys/printk.h> #include <zephyr/net/coap_service.h> #define BLOCK_WISE_TRANSFER_SIZE_GET 2048 static int large_get(struct coap_resource *resource, struct coap_packet *request, struct sockaddr *a...
/content/code_sandbox/samples/net/sockets/coap_server/src/large.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
1,668
```c /* * */ #include <zephyr/logging/log.h> LOG_MODULE_DECLARE(net_coap_service_sample); #include <zephyr/kernel.h> #include <zephyr/sys/printk.h> #include <zephyr/net/coap_service.h> static int obs_counter; static void update_counter(struct k_work *work); K_WORK_DELAYABLE_DEFINE(obs_work, update_counter); stat...
/content/code_sandbox/samples/net/sockets/coap_server/src/observer.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
813
```c /* * */ #include <zephyr/logging/log.h> LOG_MODULE_REGISTER(net_coap_service_sample, LOG_LEVEL_DBG); #include <zephyr/net/coap_service.h> #ifdef CONFIG_NET_IPV6 #include "net_private.h" #include "ipv6.h" #endif static const uint16_t coap_port = 5683; #ifdef CONFIG_NET_IPV6 #define ALL_NODES_LOCAL_COAP_MCAS...
/content/code_sandbox/samples/net/sockets/coap_server/src/main.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
585
```c /* * */ #include <zephyr/logging/log.h> LOG_MODULE_DECLARE(net_coap_service_sample); #include <zephyr/sys/printk.h> #include <zephyr/net/coap_service.h> static int separate_get(struct coap_resource *resource, struct coap_packet *request, struct sockaddr *addr, socklen_t addr_len) { uint8_t data[CONFIG_...
/content/code_sandbox/samples/net/sockets/coap_server/src/separate.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
604
```c /* * */ #include <zephyr/logging/log.h> LOG_MODULE_DECLARE(net_coap_service_sample); #include <zephyr/sys/printk.h> #include <zephyr/net/coap_service.h> static int query_get(struct coap_resource *resource, struct coap_packet *request, struct sockaddr *addr, socklen_t addr_len) { uint8_t data[CO...
/content/code_sandbox/samples/net/sockets/coap_server/src/query.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
650
```c /* * */ #include <zephyr/logging/log.h> LOG_MODULE_DECLARE(net_coap_service_sample); #include <zephyr/net/coap_mgmt.h> #include <zephyr/net/coap_service.h> #define COAP_EVENTS_SET (NET_EVENT_COAP_OBSERVER_ADDED | NET_EVENT_COAP_OBSERVER_REMOVED | \ NET_EVENT_COAP_SERVICE_STARTED | NET_EVENT_COAP_SERVICE_S...
/content/code_sandbox/samples/net/sockets/coap_server/src/events.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
365
```unknown CONFIG_NET_L2_ETHERNET=y CONFIG_NATIVE_SIM_SLOWDOWN_TO_REAL_TIME=y CONFIG_NATIVE_UART_0_ON_STDINOUT=y CONFIG_PICOLIBC=y ```
/content/code_sandbox/samples/net/sockets/coap_server/boards/native_sim.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
39
```unknown CONFIG_NET_L2_ETHERNET=y CONFIG_NATIVE_POSIX_SLOWDOWN_TO_REAL_TIME=y CONFIG_NATIVE_UART_0_ON_STDINOUT=y ```
/content/code_sandbox/samples/net/sockets/coap_server/boards/native_posix.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
33
```c /* * */ #include <zephyr/logging/log.h> LOG_MODULE_DECLARE(net_coap_service_sample); #include <zephyr/sys/printk.h> #include <zephyr/net/coap_service.h> #include "net_private.h" static int piggyback_get(struct coap_resource *resource, struct coap_packet *request, struct sockaddr *addr, socklen_t addr...
/content/code_sandbox/samples/net/sockets/coap_server/src/test.c
c
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
1,670
```unknown CONFIG_NET_L2_ETHERNET=y CONFIG_ETH_DRIVER=y CONFIG_ETH_STELLARIS=y CONFIG_NET_QEMU_ETHERNET=y ```
/content/code_sandbox/samples/net/sockets/coap_server/boards/qemu_cortex_m3.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
32
```unknown CONFIG_NET_L2_ETHERNET=y CONFIG_NET_QEMU_ETHERNET=y CONFIG_PCIE=y #CONFIG_ETHERNET_LOG_LEVEL_DBG=y ```
/content/code_sandbox/samples/net/sockets/big_http_download/overlay-e1000.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
33
```unknown # CI-friendly config, using local host machine as # a server and finite number of iterations. CONFIG_SAMPLE_BIG_HTTP_DL_URL="path_to_url" CONFIG_SAMPLE_BIG_HTTP_DL_NUM_ITER=1 ```
/content/code_sandbox/samples/net/sockets/big_http_download/overlay-ci.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
42
```unknown CONFIG_NET_L2_ETHERNET=y CONFIG_NET_QEMU_ETHERNET=y ```
/content/code_sandbox/samples/net/sockets/big_http_download/overlay-smsc911x.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
19
```unknown CONFIG_MAIN_STACK_SIZE=4096 CONFIG_NET_PKT_TX_COUNT=10 # TLS configuration CONFIG_MBEDTLS=y CONFIG_MBEDTLS_BUILTIN=y CONFIG_MBEDTLS_ENABLE_HEAP=y CONFIG_MBEDTLS_HEAP_SIZE=65000 CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN=16384 CONFIG_MBEDTLS_PEM_CERTIFICATE_FORMAT=y CONFIG_NET_SOCKETS_SOCKOPT_TLS=y CONFIG_SAMPLE_B...
/content/code_sandbox/samples/net/sockets/big_http_download/overlay-tls.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
97
```unknown # Private config options for big_http_download sample mainmenu "big_http_download sample application" config SAMPLE_BIG_HTTP_DL_URL string "Download URL" default "path_to_url" help URL to download. config SAMPLE_BIG_HTTP_DL_MAX_URL_LENGTH int "Maximum length of the download URL" default 256 conf...
/content/code_sandbox/samples/net/sockets/big_http_download/Kconfig
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
106
```unknown CONFIG_NET_L2_ETHERNET=y CONFIG_NET_QEMU_ETHERNET=y CONFIG_NET_SLIP_TAP=n CONFIG_SLIP=n ```
/content/code_sandbox/samples/net/sockets/big_http_download/overlay-qemu_cortex_m3_eth.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
32
```restructuredtext .. zephyr:code-sample:: sockets-big-http-download :name: Large HTTP download :relevant-api: bsd_sockets tls_credentials Download a large file from a web server using BSD sockets. Overview ******** The sockets/big_http_download sample application for Zephyr implements a simple HTTP GET cl...
/content/code_sandbox/samples/net/sockets/big_http_download/README.rst
restructuredtext
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
884
```unknown # General config CONFIG_REQUIRES_FULL_LIBC=y CONFIG_MBEDTLS=y CONFIG_MBEDTLS_ENABLE_HEAP=y CONFIG_MBEDTLS_MD=y CONFIG_MAIN_STACK_SIZE=2536 # Networking config CONFIG_NETWORKING=y CONFIG_NET_IPV4=y CONFIG_NET_IPV6=y CONFIG_NET_TCP=y CONFIG_NET_SOCKETS=y CONFIG_POSIX_API=y CONFIG_NET_CONTEXT_RCVTIMEO=y CONFIG...
/content/code_sandbox/samples/net/sockets/big_http_download/prj.conf
unknown
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
273
```yaml sample: description: BSD Sockets big HTTP download example name: big_http_download common: filter: CONFIG_FULL_LIBC_SUPPORTED and not CONFIG_NATIVE_LIBC harness: net depends_on: netif min_ram: 32 min_flash: 128 tags: - net - socket platform_exclude: - native_posix - native_posi...
/content/code_sandbox/samples/net/sockets/big_http_download/sample.yaml
yaml
2016-05-26T17:54:19
2024-08-16T18:09:06
zephyr
zephyrproject-rtos/zephyr
10,307
139