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 |
|---|---|---|---|---|---|---|---|---|
```unknown
# Note: HW accleration does not support IPV6
CONFIG_ETH_NXP_ENET_HW_ACCELERATION=y
CONFIG_NET_SAMPLE_CODE_RELOCATE=y
CONFIG_NET_SAMPLE_CODE_RAM_NAME="ITCM"
``` | /content/code_sandbox/samples/net/zperf/boards/mimxrt1170_evk_mimxrt1176_cm7_A.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 45 |
```yaml
common:
tags:
- net
- zperf
# TODO: Does not work properly with native_posix, need more TLC
platform_exclude:
- native_posix
- native_posix/native/64
- sam_e70_xplained/same70q21
min_ram: 64
sample:
description: Network performance measurement tool for Zephyr
name: zperf
tests:
... | /content/code_sandbox/samples/net/zperf/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 775 |
```unknown
# Note: HW accleration does not support IPV6
CONFIG_ETH_NXP_ENET_HW_ACCELERATION=y
CONFIG_NET_SAMPLE_CODE_RELOCATE=y
CONFIG_NET_SAMPLE_CODE_RAM_NAME="ITCM"
``` | /content/code_sandbox/samples/net/zperf/boards/mimxrt1064_evk.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 45 |
```unknown
ð {
status = "okay";
};
&phy {
status = "okay";
};
&mdio {
status = "okay";
};
``` | /content/code_sandbox/samples/net/zperf/boards/fvp_base_revc_2xaemv8a.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 29 |
```unknown
CONFIG_NATIVE_POSIX_SLOWDOWN_TO_REAL_TIME=y
``` | /content/code_sandbox/samples/net/zperf/boards/native_posix.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 13 |
```unknown
ð {
status = "okay";
};
&phy {
status = "okay";
};
&mdio {
status = "okay";
};
``` | /content/code_sandbox/samples/net/zperf/boards/fvp_baser_aemv8r.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 29 |
```unknown
CONFIG_NET_DHCPV4=y
CONFIG_MDIO=y
CONFIG_MDIO_SHELL=n
CONFIG_NET_IPV6=n
CONFIG_NET_CONFIG_MY_IPV4_ADDR=""
CONFIG_NET_CONFIG_PEER_IPV4_ADDR=""
CONFIG_MDIO_INIT_PRIORITY=81
CONFIG_PHY_INIT_PRIORITY=82
CONFIG_NET_BUF_RX_COUNT=56
CONFIG_NET_BUF_TX_COUNT=56
``` | /content/code_sandbox/samples/net/zperf/boards/fvp_base_revc_2xaemv8a.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 74 |
```unknown
CONFIG_ASSERT=n
CONFIG_LOG=n
CONFIG_NET_LOG=n
CONFIG_NET_IP_ADDR_CHECK=n
CONFIG_SPEED_OPTIMIZATIONS=y
CONFIG_NET_ZPERF_MAX_PACKET_SIZE=1470
``` | /content/code_sandbox/samples/net/zperf/boards/mr_canhubk3.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 42 |
```unknown
CONFIG_NET_DHCPV4=y
CONFIG_MDIO=y
CONFIG_MDIO_SHELL=n
CONFIG_NET_IPV6=n
CONFIG_NET_CONFIG_MY_IPV4_ADDR=""
CONFIG_NET_CONFIG_PEER_IPV4_ADDR=""
CONFIG_MDIO_INIT_PRIORITY=81
CONFIG_PHY_INIT_PRIORITY=82
``` | /content/code_sandbox/samples/net/zperf/boards/fvp_baser_aemv8r.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 58 |
```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
# Running PTP sample using Docker testing
start_configuration || return $?
start_docker \
"/usr/local/sbin/ptp4l -4 -f /etc/gptp.cfg -m ... | /content/code_sandbox/samples/net/ptp/docker-test.sh | shell | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 195 |
```unknown
# Private config options for PTP sample app
mainmenu "PTP sample application"
if PTP
config NET_SAMPLE_RUN_DURATION
int "Run the application this many seconds"
default 0
help
A value of zero means that the sample application is run forever.
endif
source "Kconfig.zephyr"
``` | /content/code_sandbox/samples/net/ptp/Kconfig | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 68 |
```restructuredtext
.. zephyr:code-sample:: ptp
:name: PTP
:relevant-api: ptp
Enable PTP support and monitor messages and events via logging.
Overview
********
The PTP sample application for Zephyr will enable PTP support.
The source code for this sample application can be found at:
:zephyr_file:`samples/n... | /content/code_sandbox/samples/net/ptp/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 478 |
```unknown
CONFIG_NETWORKING=y
CONFIG_NET_LOG=y
CONFIG_LOG=y
CONFIG_NET_IPV4=y
CONFIG_NET_DHCPV4=n
CONFIG_NET_UDP=y
CONFIG_TEST_RANDOM_GENERATOR=y
CONFIG_NET_PKT_RX_COUNT=32
CONFIG_NET_PKT_TX_COUNT=32
CONFIG_NET_BUF_RX_COUNT=32
CONFIG_NET_BUF_TX_COUNT=32
CONFIG_NET_MAX_CONTEXTS=10
CONFIG_INIT_STACKS=y
CONFIG_PRINTK=... | /content/code_sandbox/samples/net/ptp/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 202 |
```yaml
common:
harness: net
tags:
- net
- ptp
sample:
description: Test PTP functionality
name: PTP sample app
tests:
sample.net.ptp:
platform_allow:
- native_sim
- native_sim/native/64
- nucleo_h563zi
- nucleo_h743zi
- nucleo_h745zi_q/stm32h745xx/m7
- qemu_x86... | /content/code_sandbox/samples/net/ptp/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 121 |
```unknown
# Settings for native_posix ethernet driver
CONFIG_ETH_NATIVE_POSIX_PTP_CLOCK=y
#CONFIG_ETH_NATIVE_POSIX_RANDOM_MAC=y
CONFIG_ETH_NATIVE_POSIX_MAC_ADDR="00:00:5e:00:53:2a"
# Assume 1 ms accuracy for native_posix simulated clock
CONFIG_PTP_CLOCK_ACCURACY_1MS=y
``` | /content/code_sandbox/samples/net/ptp/boards/native_sim_native_64.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 77 |
```unknown
# Settings for native_posix ethernet driver
CONFIG_ETH_NATIVE_POSIX_PTP_CLOCK=y
#CONFIG_ETH_NATIVE_POSIX_RANDOM_MAC=y
CONFIG_ETH_NATIVE_POSIX_MAC_ADDR="00:00:5e:00:53:2a"
# Assume 1 ms accuracy for native_posix simulated clock
CONFIG_PTP_CLOCK_ACCURACY_1MS=y
``` | /content/code_sandbox/samples/net/ptp/boards/native_sim.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 77 |
```unknown
# Settings for native_posix ethernet driver
CONFIG_ETH_NATIVE_POSIX_PTP_CLOCK=y
#CONFIG_ETH_NATIVE_POSIX_RANDOM_MAC=y
CONFIG_ETH_NATIVE_POSIX_MAC_ADDR="00:00:5e:00:53:2a"
# Assume 1 ms accuracy for native_posix simulated clock
CONFIG_PTP_CLOCK_ACCURACY_1MS=y
``` | /content/code_sandbox/samples/net/ptp/boards/native_posix.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 77 |
```c
/*
*
*/
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(net_ptp_sample, LOG_LEVEL_DBG);
#include <zephyr/kernel.h>
#include <errno.h>
#include <stdlib.h>
#include "ptp/clock.h"
#include "ptp/port.h"
static int run_duration = CONFIG_NET_SAMPLE_RUN_DURATION;
static struct k_work_delayable stop_sample;
sta... | /content/code_sandbox/samples/net/ptp/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 527 |
```unknown
CONFIG_USERSPACE=n
``` | /content/code_sandbox/samples/net/ptp/boards/qemu_x86.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 6 |
```unknown
# Settings for native_posix ethernet driver
CONFIG_ETH_NATIVE_POSIX_PTP_CLOCK=y
#CONFIG_ETH_NATIVE_POSIX_RANDOM_MAC=y
CONFIG_ETH_NATIVE_POSIX_MAC_ADDR="00:00:5e:00:53:2a"
# Assume 1 ms accuracy for native_posix simulated clock
CONFIG_PTP_CLOCK_ACCURACY_1MS=y
``` | /content/code_sandbox/samples/net/ptp/boards/native_posix_native_64.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 77 |
```unknown
# Private config options for network statistics sample app
mainmenu "Network statistics sample application"
config SAMPLE_PERIOD
int "How often to print statistics (in seconds)"
default 30
range 1 3600
depends on NET_STATISTICS
help
Print statistics after every n. seconds
source "Kconfig.zephyr"... | /content/code_sandbox/samples/net/stats/Kconfig | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 71 |
```restructuredtext
.. zephyr:code-sample:: net-stats
:name: Network statistics
:relevant-api: net_stats
Query and display network statistics from a user application.
Overview
********
This sample shows how to query (and display) network statistics from a user
application.
The source code for this sample a... | /content/code_sandbox/samples/net/stats/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 473 |
```yaml
sample:
description: Test network statistics functionality
name: Network statistics sample app
tests:
sample.net.stats:
harness: net
min_ram: 64
tags:
- net
- statistics
depends_on: netif
integration_platforms:
- qemu_x86
``` | /content/code_sandbox/samples/net/stats/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 67 |
```unknown
# Generic network options
CONFIG_NETWORKING=y
CONFIG_NET_LOG=y
CONFIG_NET_IPV6=y
CONFIG_NET_IPV4=y
CONFIG_NET_DHCPV4=n
CONFIG_NET_UDP=y
CONFIG_NET_TCP=y
# Network statistics options
CONFIG_NET_STATISTICS=y
CONFIG_NET_STATISTICS_USER_API=y
CONFIG_NET_STATISTICS_PER_INTERFACE=y
CONFIG_NET_STATISTICS_ETHERNET=... | /content/code_sandbox/samples/net/stats/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 287 |
```unknown
# Disable DHCPv4 and use static address
CONFIG_NET_DHCPV4=n
# Use local DNS server on host
CONFIG_DNS_SERVER1="192.0.2.2"
# Configure static addresses
CONFIG_NET_CONFIG_MY_IPV4_ADDR="192.0.2.1"
CONFIG_NET_CONFIG_MY_IPV4_GW="192.0.2.2"
``` | /content/code_sandbox/samples/net/cloud/mqtt_azure/overlay-qemu_x86.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 79 |
```c
/*
*
*/
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(net_stats_sample, LOG_LEVEL_DBG);
#include <zephyr/kernel.h>
#include <errno.h>
#include <zephyr/net/net_core.h>
#include <zephyr/net/net_if.h>
#include <zephyr/net/net_stats.h>
static struct k_work_delayable stats_timer;
#if defined(CONFIG_NET_STA... | /content/code_sandbox/samples/net/stats/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 1,591 |
```restructuredtext
.. zephyr:code-sample:: mqtt-azure
:name: Microsoft Azure IoT Hub MQTT
:relevant-api: bsd_sockets mqtt_socket tls_credentials random_api
Connect to Azure IoT Hub and publish messages using MQTT.
Overview
********
This sample application demonstrates how an MQTT client
can publish message... | /content/code_sandbox/samples/net/cloud/mqtt_azure/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 1,332 |
```unknown
# Private config options for mqtt-azure sample app
mainmenu "Networking mqtt-azure sample application"
config SAMPLE_CLOUD_AZURE_USERNAME
string "Azure cloud username"
help
Username of your Azure account.
config SAMPLE_CLOUD_AZURE_PASSWORD
string "Azure cloud password"
help
Password of your Azu... | /content/code_sandbox/samples/net/cloud/mqtt_azure/Kconfig | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 269 |
```yaml
common:
filter: CONFIG_FULL_LIBC_SUPPORTED
sample:
description: MQTT sample app to Azure cloud
name: mqtt-azure
tests:
sample.net.cloud.mqtt_azure:
harness: net
platform_allow:
- sam_e70_xplained/same70q21
- frdm_k64f
- qemu_x86
integration_platforms:
- qemu_x86
t... | /content/code_sandbox/samples/net/cloud/mqtt_azure/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 105 |
```unknown
CONFIG_NETWORKING=y
CONFIG_POSIX_API=y
# Disable IPv6 support
CONFIG_NET_IPV6=n
# Enable IPv4 support
CONFIG_NET_IPV4=y
CONFIG_NET_IF_MAX_IPV4_COUNT=2
CONFIG_NET_IF_UNICAST_IPV4_ADDR_COUNT=3
# Enable TCP support
CONFIG_NET_TCP=y
# Enable Sockets support
CONFIG_NET_SOCKETS=y
CONFIG_NET_SOCKETS_SOCKOPT_TLS... | /content/code_sandbox/samples/net/cloud/mqtt_azure/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 516 |
```objective-c
/*
*
*/
#ifndef __CONFIG_H__
#define __CONFIG_H__
#define SERVER_ADDR CONFIG_SAMPLE_CLOUD_AZURE_SERVER_ADDR
#define SERVER_PORT CONFIG_SAMPLE_CLOUD_AZURE_SERVER_PORT
#if defined(CONFIG_SOCKS)
#define SOCKS5_PROXY_ADDR CONFIG_SAMPLE_SOCKS_ADDR
#define SOCKS5_PROXY_PORT CONFIG_SAMPLE_SOCKS_PORT
#end... | /content/code_sandbox/samples/net/cloud/mqtt_azure/src/config.h | objective-c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 126 |
```objective-c
/*
*
*/
#ifndef __TEST_CERTS_H__
#define __TEST_CERTS_H__
static const unsigned char ca_certificate[] = {
#include "digicert.cer"
};
#endif /* __TEST_CERTS_H__ */
``` | /content/code_sandbox/samples/net/cloud/mqtt_azure/src/test_certs.h | objective-c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 45 |
```unknown
/* Baltimore CyberTrust Root */
"-----BEGIN CERTIFICATE-----\r\n"
"MIIDdzCCAl+gAwIBAgIEAgAAuTANBgkqhkiG9w0BAQUFADBaMQswCQYDVQQGEwJJ\r\n"
your_sha256_hash\r\n"
your_sha256_hash\r\n"
your_sha256_hash\r\n"
your_sha256_hash\r\n"
your_sha256_hash\r\n"
"mD1X6CZymrV51Cni4eiVgLGw41uOKymaZN+hXe2wCQVt2yguzmKiYv60iNoS6... | /content/code_sandbox/samples/net/cloud/mqtt_azure/src/digicert.cer | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 2,444 |
```unknown
CONFIG_WIFI=y
# WiFi offload drivers don't resolve DNS, so use manual IP
CONFIG_TAGOIO_MANUAL_SERVER=y
CONFIG_TAGOIO_HTTP_WIFI_SSID="<your network ssid>"
CONFIG_TAGOIO_HTTP_WIFI_PSK="<yout network passwd>"
CONFIG_NET_CONFIG_SETTINGS=n
CONFIG_NET_DHCPV4=n
``` | /content/code_sandbox/samples/net/cloud/tagoio_http_post/overlay-wifi.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 71 |
```restructuredtext
.. zephyr:code-sample:: tagoio-http-post
:name: TagoIO HTTP Post
:relevant-api: bsd_sockets http_client dns_resolve tls_credentials
Send random temperature values to TagoIO IoT Cloud Platform using HTTP.
Overview
********
This sample application implements an HTTP client that will do an ... | /content/code_sandbox/samples/net/cloud/tagoio_http_post/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 1,017 |
```unknown
mainmenu "TagoIO IoT Cloud Platform (HTTP Post) Client Configuration"
menu "TagoIO IoT Cloud Configuration"
config TAGOIO_MANUAL_SERVER
bool "Disable DNS lookup"
config TAGOIO_API_SERVER_IP
string "TagoIO Main Server"
depends on TAGOIO_MANUAL_SERVER
default "75.2.65.153"
config TAGOIO_DEVICE_TOKEN
... | /content/code_sandbox/samples/net/cloud/tagoio_http_post/Kconfig | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 259 |
```unknown
# App stack
CONFIG_MAIN_STACK_SIZE=4096
# C Library
# Default use minimal libc and with COMMON_LIBC_MALLOC_ARENA_SIZE defining
# HEAP size (512 bytes) are enough to run DNS.
CONFIG_COMMON_LIBC_MALLOC_ARENA_SIZE=4096
CONFIG_POSIX_API=y
# Networking config
CONFIG_NETWORKING=y
CONFIG_NET_IPV4=y
CONFIG_NET_IP... | /content/code_sandbox/samples/net/cloud/tagoio_http_post/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 231 |
```c
/*
*
*/
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(mqtt_azure, LOG_LEVEL_DBG);
#include <zephyr/kernel.h>
#include <zephyr/net/net_if.h>
#include <zephyr/net/socket.h>
#include <zephyr/net/mqtt.h>
#include <zephyr/sys/printk.h>
#include <zephyr/random/random.h>
#include <string.h>
#include <errno.h>
... | /content/code_sandbox/samples/net/cloud/mqtt_azure/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 3,078 |
```yaml
common:
tags:
- net
- cloud
- dns
- http
- wifi
min_ram: 64
harness: net
sample:
description: TagoIO HTTP(S) client sample
name: tagoio_http_post
tests:
sample.net.cloud.tagoio_http_post:
platform_allow:
- frdm_k64f
- nucleo_f767zi
integration_platforms:
... | /content/code_sandbox/samples/net/cloud/tagoio_http_post/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 215 |
```objective-c
/*
*
*/
#if defined(CONFIG_WIFI)
void wifi_connect(void);
#else
#define wifi_connect()
#endif
``` | /content/code_sandbox/samples/net/cloud/tagoio_http_post/src/wifi.h | objective-c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 22 |
```c
/*
*
*/
#include <zephyr/logging/log.h>
LOG_MODULE_DECLARE(tagoio_http_post, CONFIG_TAGOIO_HTTP_POST_LOG_LEVEL);
#include <zephyr/net/wifi_mgmt.h>
static int connected;
static struct net_mgmt_event_callback wifi_shell_mgmt_cb;
static void handle_wifi_connect_result(struct net_mgmt_event_callback *cb)
{
cons... | /content/code_sandbox/samples/net/cloud/tagoio_http_post/src/wifi.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 507 |
```c
/*
*
*/
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(tagoio_http_post, CONFIG_TAGOIO_HTTP_POST_LOG_LEVEL);
#include <zephyr/kernel.h>
#include <zephyr/net/socket.h>
#include <zephyr/net/http/client.h>
#include <zephyr/random/random.h>
#include <stdio.h>
#include "wifi.h"
#include "sockets.h"
static st... | /content/code_sandbox/samples/net/cloud/tagoio_http_post/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 469 |
```objective-c
/*
*
*/
#define TAGOIO_SOCKET_MAX_BUF_LEN 1280
struct tagoio_context {
int sock;
uint8_t payload[TAGOIO_SOCKET_MAX_BUF_LEN];
uint8_t resp[TAGOIO_SOCKET_MAX_BUF_LEN];
};
int tagoio_connect(struct tagoio_context *ctx);
int tagoio_http_push(struct tagoio_context *ctx,
http_response_cb_t resp_... | /content/code_sandbox/samples/net/cloud/tagoio_http_post/src/sockets.h | objective-c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 85 |
```c
/*
*
*/
#include <zephyr/logging/log.h>
LOG_MODULE_DECLARE(tagoio_http_post, CONFIG_TAGOIO_HTTP_POST_LOG_LEVEL);
#include <zephyr/net/net_ip.h>
#include <zephyr/net/socket.h>
#include <zephyr/net/socketutils.h>
#include <zephyr/net/dns_resolve.h>
#include <zephyr/net/tls_credentials.h>
#include <zephyr/net/htt... | /content/code_sandbox/samples/net/cloud/tagoio_http_post/src/sockets.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 826 |
```unknown
#
#
#
menu "AWS"
mainmenu "AWS IoT Core MQTT sample application"
config AWS_ENDPOINT
string "AWS endpoint"
default ""
help
Endpoint (hostname) of the AWS MQTT broker.
Note that the endpoint is different when using AWS Device Advisor.
config AWS_MQTT_PORT
int "MQTT Port"
default 8883
help
Se... | /content/code_sandbox/samples/net/cloud/aws_iot_mqtt/Kconfig | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 449 |
```restructuredtext
.. zephyr:code-sample:: aws-iot-mqtt
:name: AWS IoT Core MQTT
:relevant-api: bsd_sockets mqtt_socket dns_resolve tls_credentials json sntp random_api
Connect to AWS IoT Core and publish messages using MQTT.
Overview
********
This sample application demonstrates the implementation of an M... | /content/code_sandbox/samples/net/cloud/aws_iot_mqtt/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 1,622 |
```unknown
CONFIG_AWS_ENDPOINT="a31gokdeokxhl8-ats.iot.eu-west-1.amazonaws.com"
CONFIG_AWS_MQTT_PORT=8883
CONFIG_AWS_THING_NAME="zephyr_sample"
CONFIG_AWS_PUBLISH_TOPIC="zephyr_sample/data"
CONFIG_AWS_SUBSCRIBE_TOPIC="zephyr_sample/downlink"
CONFIG_AWS_TEST_SUITE_DQP=n
CONFIG_MAIN_STACK_SIZE=4096
CONFIG_ENTROPY_GENERA... | /content/code_sandbox/samples/net/cloud/aws_iot_mqtt/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 474 |
```yaml
sample:
description: MQTT sample app to AWS IoT Core
name: aws_iot_mqtt
common:
tags: net mqtt cloud
harness: net
filter: CONFIG_FULL_LIBC_SUPPORTED and not CONFIG_NATIVE_LIBC
extra_args: USE_DUMMY_CREDS=1
tests:
sample.net.cloud.aws_iot_mqtt:
depends_on: netif
platform_allow: qemu_x86 nuc... | /content/code_sandbox/samples/net/cloud/aws_iot_mqtt/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 107 |
```objective-c
/* DHCPv4 client startup. */
/*
*
*/
#ifndef __DHCP_H__
#define __DHCP_H__
void app_dhcpv4_startup(void);
#endif
``` | /content/code_sandbox/samples/net/cloud/aws_iot_mqtt/src/dhcp.h | objective-c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 35 |
```c
/* DHCPv4 client startup. */
/*
*
*/
#include <zephyr/logging/log.h>
LOG_MODULE_DECLARE(aws, LOG_LEVEL_DBG);
#include <zephyr/kernel.h>
#include <zephyr/net/net_if.h>
#include <zephyr/net/net_core.h>
#include <zephyr/net/net_context.h>
#include <zephyr/net/net_mgmt.h>
static struct net_mgmt_event_callback ... | /content/code_sandbox/samples/net/cloud/aws_iot_mqtt/src/dhcp.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 347 |
```c
/*
*
*/
#include <stdint.h>
const uint8_t public_cert[] = { 0x00 };
const uint32_t public_cert_len = sizeof(public_cert);
const uint8_t ca_cert[] = { 0x00 };
const uint32_t ca_cert_len = sizeof(ca_cert);
const uint8_t private_key[] = { 0x00 };
const uint32_t private_key_len = sizeof(private_key);
``` | /content/code_sandbox/samples/net/cloud/aws_iot_mqtt/src/creds/dummy.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 87 |
```python
import os
import glob
def bin2array(name, fin, fout):
with open(fin, 'rb') as f:
data = f.read()
data += b'\0' # add null terminator
with open(fout, 'w') as f:
f.write("#include <stdint.h>\n")
f.write(f"const uint8_t {name}[] = {{")
for i in range(0, len(data),... | /content/code_sandbox/samples/net/cloud/aws_iot_mqtt/src/creds/convert_keys.py | python | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 387 |
```objective-c
/*
*
*/
#ifndef _AWS_CERTS_H_
#define _AWS_CERTS_H_
#include <stdint.h>
extern const uint8_t ca_cert[];
extern const uint32_t ca_cert_len;
extern const uint8_t private_key[];
extern const uint32_t private_key_len;
extern const uint8_t public_cert[];
extern const uint32_t public_cert_len;
#endif /... | /content/code_sandbox/samples/net/cloud/aws_iot_mqtt/src/creds/creds.h | objective-c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 83 |
```unknown
-----BEGIN CERTIFICATE-----
MIIDQTCCAimgAwIBAgITBmyfz5m/jAo54vB4ikPmljZbyjANBgkqhkiG9w0BAQsF
your_sha256_hash
your_sha256_hash
your_sha256_hash
your_sha256_hash
your_sha256_hash
9O6II8c+6zf1tRn4SWiw3te5djgdYZ6k/oI2peVKVuRF4fn9tBb6dNqcmzU5L/qw
IFAGbHrQgLKm+a/sRxmPUDgH3KKHOVj4utWp+UhnMJbulHheb4mjUcAwhmahRWa6
V... | /content/code_sandbox/samples/net/cloud/aws_iot_mqtt/src/creds/AmazonRootCA1.pem | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 565 |
```unknown
CONFIG_ENTROPY_DEVICE_RANDOM_GENERATOR=y
CONFIG_NET_DHCPV4=y
CONFIG_NET_DHCPV4_INITIAL_DELAY_MAX=2
``` | /content/code_sandbox/samples/net/cloud/aws_iot_mqtt/boards/nucleo_f429zi.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 31 |
```unknown
&mac {
local-mac-address = [00 00 00 77 77 77];
};
``` | /content/code_sandbox/samples/net/cloud/aws_iot_mqtt/boards/nucleo_f429zi.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 23 |
```unknown
CONFIG_QEMU_ICOUNT=n
# QEMU networking configuration
CONFIG_NET_CONFIG_SETTINGS=y
CONFIG_NET_CONFIG_NEED_IPV6=y
CONFIG_NET_CONFIG_MY_IPV6_ADDR="2001:db8::1"
CONFIG_NET_CONFIG_PEER_IPV6_ADDR="2001:db8::2"
CONFIG_NET_CONFIG_NEED_IPV4=y
CONFIG_NET_CONFIG_MY_IPV4_ADDR="192.0.2.1"
CONFIG_NET_CONFIG_PEER_IPV4_ADD... | /content/code_sandbox/samples/net/cloud/aws_iot_mqtt/boards/qemu_x86.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 117 |
```restructuredtext
.. zephyr:code-sample:: ipv4-autoconf
:name: IPv4 autoconf client
:relevant-api: networking net_if net_context net_mgmt
Perform IPv4 autoconfiguration and self-assign a random IPv4 address
Overview
********
This sample application starts a IPv4 autoconf and self-assigns
a random IPv4 add... | /content/code_sandbox/samples/net/ipv4_autoconf/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 467 |
```unknown
CONFIG_NETWORKING=y
CONFIG_NET_IPV6=n
CONFIG_NET_IPV4=y
CONFIG_NET_ARP=y
CONFIG_NET_UDP=y
CONFIG_NET_IPV4_AUTO=y
CONFIG_NET_PKT_RX_COUNT=10
CONFIG_NET_PKT_TX_COUNT=10
CONFIG_NET_BUF_RX_COUNT=20
CONFIG_NET_BUF_TX_COUNT=20
CONFIG_NET_BUF_POOL_USAGE=y
CONFIG_TEST_RANDOM_GENERATOR=y
CONFIG_INIT_STACKS=y
CONF... | /content/code_sandbox/samples/net/ipv4_autoconf/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 116 |
```yaml
common:
harness: net
tags:
- net
- ipv4_autoconf
platform_allow:
- qemu_x86
- native_posix
- native_posix/native/64
- native_sim
- native_sim/native/64
integration_platforms:
- native_sim
sample:
description: Test IPv4 autoconf functionality
name: IPv4 autoconf sample... | /content/code_sandbox/samples/net/ipv4_autoconf/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 109 |
```c
/*
*
*/
#include "creds/creds.h"
#include "dhcp.h"
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <zephyr/net/socket.h>
#include <zephyr/net/dns_resolve.h>
#include <zephyr/net/mqtt.h>
#include <zephyr/net/sntp.h>
#include <zephyr/net/tls_credentials.h>
#include <zephyr/data/json.h>
#inclu... | /content/code_sandbox/samples/net/cloud/aws_iot_mqtt/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 3,336 |
```c
/* Networking DHCPv4 client */
/*
*
*/
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(net_ipv4_autoconf_sample, LOG_LEVEL_DBG);
#include <zephyr/kernel.h>
#include <zephyr/linker/sections.h>
#include <errno.h>
#include <stdio.h>
#include <zephyr/net/net_if.h>
#include <zephyr/net/net_core.h>
#include <z... | /content/code_sandbox/samples/net/ipv4_autoconf/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 385 |
```unknown
# sam_e70_xplained/same70q21 board need more buffers, otherwise it fails to build
CONFIG_NET_PKT_RX_COUNT=20
CONFIG_NET_PKT_TX_COUNT=20
CONFIG_NET_BUF_RX_COUNT=30
CONFIG_NET_BUF_TX_COUNT=30
``` | /content/code_sandbox/samples/net/ipv4_autoconf/boards/sam_e70_xplained_same70q21.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 56 |
```unknown
# Private config options for virtual network interface sample app
mainmenu "Networking virtual network interface sample application"
config NET_SAMPLE_IFACE2_MY_IPV6_ADDR
string "My IPv6 address for second interface"
help
The value depends on your network setup.
config NET_SAMPLE_IFACE2_MY_IPV4_ADDR... | /content/code_sandbox/samples/net/virtual/Kconfig | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 274 |
```restructuredtext
.. zephyr:code-sample:: virtual-network-interface
:name: Virtual network interface
:relevant-api: virtual virtual_mgmt
Create a sample virtual network interface.
Overview
********
This sample application creates a sample virtual network interface for
demonstrative purposes, it does not d... | /content/code_sandbox/samples/net/virtual/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 304 |
```yaml
common:
harness: net
tags:
- net
- virtual
- tunnel
sample:
description: Test virtual network interface functionality
name: Virtual network interface sample app
tests:
sample.net.virtual:
depends_on: netif
``` | /content/code_sandbox/samples/net/virtual/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 57 |
```unknown
CONFIG_NETWORKING=y
CONFIG_NET_UDP=y
CONFIG_NET_TCP=y
CONFIG_NET_IPV6=y
CONFIG_NET_IPV4=y
#CONFIG_NET_DHCPV4=y
CONFIG_NET_L2_ETHERNET=y
CONFIG_NET_L2_VIRTUAL=y
CONFIG_NET_L2_VIRTUAL_MGMT=y
CONFIG_NET_L2_IPIP=y
CONFIG_NET_MGMT=y
CONFIG_NET_MGMT_EVENT=y
CONFIG_ENTROPY_GENERATOR=y
CONFIG_TEST_RANDOM_GENERATO... | /content/code_sandbox/samples/net/virtual/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 506 |
```unknown
CONFIG_NET_L2_VIRTUAL=y
CONFIG_NET_L2_VIRTUAL_MGMT=y
CONFIG_NET_L2_IPIP=y
CONFIG_NET_IF_MAX_IPV6_COUNT=4
CONFIG_NET_IF_MAX_IPV4_COUNT=4
# Use this for IPv6 over IPv4
CONFIG_NET_SAMPLE_TUNNEL_MY_ADDR="2001:db8:200::1"
CONFIG_NET_SAMPLE_TUNNEL_PEER_ADDR="2001:db8:200::2"
# Use this for IPv4 over IPv4
#CONFI... | /content/code_sandbox/samples/net/capture/overlay-tunnel.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 135 |
```c
/*
*
*/
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(net_virtual_interface_sample, LOG_LEVEL_DBG);
#include <zephyr/kernel.h>
#include <zephyr/device.h>
#include <errno.h>
#include <zephyr/net/net_core.h>
#include <zephyr/net/ethernet.h>
#include <zephyr/net/virtual.h>
#include <zephyr/net/virtual_mgmt... | /content/code_sandbox/samples/net/virtual/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 2,994 |
```unknown
# Private config options for capture sample app
mainmenu "Networking capture sample application"
config NET_SAMPLE_TUNNEL_PEER_ADDR
string "Remote IP address of the tunnel interface"
depends on NET_L2_IPIP
help
Use overlay-tunnel.conf to setup the tunnel support.
config NET_SAMPLE_TUNNEL_MY_ADDR
s... | /content/code_sandbox/samples/net/capture/Kconfig | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 103 |
```unknown
CONFIG_NETWORKING=y
CONFIG_ENTROPY_GENERATOR=y
CONFIG_TEST_RANDOM_GENERATOR=y
CONFIG_INIT_STACKS=y
CONFIG_NET_LOG=y
CONFIG_LOG=y
CONFIG_NET_UDP=y
CONFIG_NET_TCP=y
CONFIG_NET_IPV6=y
CONFIG_NET_IPV4=y
CONFIG_NET_CAPTURE=y
CONFIG_NET_SHELL=y
CONFIG_NET_STATISTICS=y
CONFIG_NET_IF_MAX_IPV6_COUNT=3
CONFIG_NET_... | /content/code_sandbox/samples/net/capture/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 234 |
```yaml
common:
harness: net
depends_on: netif
sample:
description: Network packet capture
name: Network packet capture sample application
tests:
sample.net.capture:
tags:
- net
- capture
``` | /content/code_sandbox/samples/net/capture/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 51 |
```restructuredtext
.. zephyr:code-sample:: net-capture
:name: Network packet capture
:relevant-api: net_capture
Capture network packets and send them to a remote host via IPIP tunnel.
Overview
********
This application will setup the device so that net-shell can be used
to enable network packet capture.
T... | /content/code_sandbox/samples/net/capture/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 2,724 |
```unknown
CONFIG_WEBSOCKET_CLIENT=y
CONFIG_MQTT_LIB_WEBSOCKET=y
CONFIG_HEAP_MEM_POOL_SIZE=1500
``` | /content/code_sandbox/samples/net/mqtt_publisher/overlay-websocket.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 27 |
```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
echo "Starting MQTT test"
start_configuration || return $?
start_docker \
"/usr/local/sbin/mosquitto -v -c /usr/local/etc/mosquitto/m... | /content/code_sandbox/samples/net/mqtt_publisher/docker-test.sh | shell | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 336 |
```unknown
CONFIG_SOCKS=y
``` | /content/code_sandbox/samples/net/mqtt_publisher/overlay-socks5.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 7 |
```unknown
# Lower values used for testing
CONFIG_NET_SAMPLE_APP_MAX_ITERATIONS=3
CONFIG_NET_SAMPLE_APP_MAX_CONNECTIONS=3
``` | /content/code_sandbox/samples/net/mqtt_publisher/overlay-sample.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 28 |
```unknown
CONFIG_MQTT_LIB_TLS=y
CONFIG_NET_SOCKETS_SOCKOPT_TLS=y
``` | /content/code_sandbox/samples/net/mqtt_publisher/overlay-tls-offload.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 19 |
```c
/*
*
*/
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(net_capture_sample, LOG_LEVEL_DBG);
#include <zephyr/posix/net/if_arp.h>
#include <zephyr/kernel.h>
#include <zephyr/shell/shell.h>
#include <zephyr/net/capture.h>
#include <zephyr/net/ethernet.h>
#include <zephyr/net/virtual_mgmt.h>
#if defined(CONF... | /content/code_sandbox/samples/net/capture/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 3,217 |
```unknown
CONFIG_MAIN_STACK_SIZE=4096
CONFIG_MQTT_LIB_TLS=y
CONFIG_NET_SOCKETS_SOCKOPT_TLS=y
# TLS configuration
CONFIG_MBEDTLS=y
CONFIG_MBEDTLS_BUILTIN=y
CONFIG_MBEDTLS_ENABLE_HEAP=y
CONFIG_MBEDTLS_HEAP_SIZE=30000
CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN=2048
``` | /content/code_sandbox/samples/net/mqtt_publisher/overlay-tls.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 75 |
```unknown
# Config options for mqtt_publisher sample application
mainmenu "Networking mqtt_publisher sample application"
config NET_SAMPLE_APP_MAX_ITERATIONS
int "Number of times to Publish sample MQTT messages"
default 500
help
Send sample MQTT messages this many times in a MQTT connection
before exiting.... | /content/code_sandbox/samples/net/mqtt_publisher/Kconfig | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 148 |
```unknown
CONFIG_NETWORKING=y
CONFIG_NET_SOCKETS=y
CONFIG_NET_TCP=y
CONFIG_NET_LOG=y
CONFIG_NET_IPV6_RA_RDNSS=y
CONFIG_NET_IF_UNICAST_IPV6_ADDR_COUNT=3
CONFIG_NET_IF_MCAST_IPV6_ADDR_COUNT=2
CONFIG_PRINTK=y
CONFIG_STDOUT_CONSOLE=y
CONFIG_POSIX_API=y
# Enable IPv6 support
CONFIG_NET_IPV6=n
# Enable IPv4 support
CONFI... | /content/code_sandbox/samples/net/mqtt_publisher/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 221 |
```yaml
sample:
description: MQTT publisher sample application
name: MQTT publisher
common:
harness: net
tags:
- net
- mqtt
tests:
sample.net.mqtt_publisher:
platform_allow:
- frdm_k64f
- qemu_x86
- pinnacle_100_dvk
- mg100
integration_platforms:
- qemu_x86
samp... | /content/code_sandbox/samples/net/mqtt_publisher/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 167 |
```objective-c
/*
*
*/
#ifndef __CONFIG_H__
#define __CONFIG_H__
#ifdef CONFIG_NET_CONFIG_SETTINGS
#ifdef CONFIG_NET_IPV6
#define ZEPHYR_ADDR CONFIG_NET_CONFIG_MY_IPV6_ADDR
#define SERVER_ADDR CONFIG_NET_CONFIG_PEER_IPV6_ADDR
#else
#define ZEPHYR_ADDR CONFIG_NET_CONFIG_MY_IPV4_ADDR
#define SERVER_ADDR CONFIG_NE... | /content/code_sandbox/samples/net/mqtt_publisher/src/config.h | objective-c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 423 |
```restructuredtext
.. zephyr:code-sample:: mqtt-publisher
:name: MQTT publisher
:relevant-api: mqtt_socket
Send MQTT PUBLISH messages to an MQTT server.
Overview
********
`MQTT <path_to_url`_ (MQ Telemetry Transport) is a lightweight
publish/subscribe messaging protocol optimized for small sensors and
mobi... | /content/code_sandbox/samples/net/mqtt_publisher/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 4,189 |
```objective-c
/*
*
*/
#ifndef __TEST_CERTS_H__
#define __TEST_CERTS_H__
#if defined(CONFIG_NET_SOCKETS_OFFLOAD)
/* 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.
*/
#if defined(CONFIG_TLS_CREDENTIAL_FILENAMES)
s... | /content/code_sandbox/samples/net/mqtt_publisher/src/test_certs.h | objective-c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 4,258 |
```unknown
# Networking Config:
CONFIG_NET_IPV4=y
CONFIG_NET_IPV6=n
CONFIG_NET_SOCKETS=y
CONFIG_NET_NATIVE=n
CONFIG_TEST_RANDOM_GENERATOR=y
# Enable SimpleLink WiFi Driver and Socket Offload
CONFIG_WIFI=y
CONFIG_WIFI_SIMPLELINK=y
CONFIG_NET_SOCKETS_OFFLOAD=y
# Enable TLS credential filenames for secure socket offload... | /content/code_sandbox/samples/net/mqtt_publisher/boards/cc3235sf_launchxl.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 159 |
```unknown
# Networking Config:
CONFIG_NET_IPV4=y
CONFIG_NET_IPV6=n
CONFIG_NET_SOCKETS=y
CONFIG_NET_NATIVE=n
CONFIG_TEST_RANDOM_GENERATOR=y
# Enable SimpleLink WiFi Driver and Socket Offload
CONFIG_WIFI=y
CONFIG_WIFI_SIMPLELINK=y
CONFIG_NET_SOCKETS_OFFLOAD=y
# Enable TLS credential filenames for secure socket offload... | /content/code_sandbox/samples/net/mqtt_publisher/boards/cc3220sf_launchxl.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 151 |
```unknown
CONFIG_MAX_THREAD_BYTES=3
``` | /content/code_sandbox/samples/net/mqtt_publisher/boards/frdm_k64f.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 8 |
```unknown
# This overlay switches from NCP to RCP, use in combination with prj.conf
CONFIG_OPENTHREAD_COPROCESSOR_NCP=n
CONFIG_OPENTHREAD_COPROCESSOR_RCP=y
CONFIG_NET_PKT_RX_COUNT=8
CONFIG_NET_PKT_TX_COUNT=8
``` | /content/code_sandbox/samples/net/openthread/coprocessor/overlay-rcp.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 64 |
```unknown
# TRI n4m BR
CONFIG_SHELL_PROMPT_UART="ncp-uart:~$ "
CONFIG_STDOUT_CONSOLE=y
CONFIG_GPIO=y
CONFIG_USB_DEVICE_STACK=y
CONFIG_USB_DEVICE_PRODUCT="OpenThread Co-Processor K64"
CONFIG_LOG=y
CONFIG_USB_DRIVER_LOG_LEVEL_ERR=y
CONFIG_USB_CDC_ACM=y
CONFIG_USB_DEVICE_LOG_LEVEL_ERR=y
CONFIG_SERIAL=y
CONFIG_UART_INTER... | /content/code_sandbox/samples/net/openthread/coprocessor/overlay-tri-n4m-br.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 136 |
```restructuredtext
.. zephyr:code-sample:: coprocessor
:name: OpenThread co-processor
:relevant-api: openthread
Build a Thread border-router using OpenThread's co-processor designs.
Overview
********
OpenThread Co-Processor allows building a Thread Border Router. The code in this
sample is only the MCU tar... | /content/code_sandbox/samples/net/openthread/coprocessor/README.rst | restructuredtext | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 602 |
```unknown
# Config options for OpenThread Border Router sample app
mainmenu "OpenThread NCP"
menu "Application configuration"
config NET_SAMPLE_APPLICATION_VERSION
string "Version number for the application"
default "v0.0.0"
endmenu
source "Kconfig.zephyr"
``` | /content/code_sandbox/samples/net/openthread/coprocessor/Kconfig | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 59 |
```unknown
# Nordic NCP USB CDC-ACM
CONFIG_SHELL_PROMPT_UART="ncp-uart:~$ "
# Use USB-CDC-ACM for Co-Processor
CONFIG_USB_DEVICE_STACK=y
CONFIG_USB_DEVICE_PRODUCT="OpenThread CoProcessor NRF"
CONFIG_USB_CDC_ACM=y
CONFIG_UART_LINE_CTRL=y
CONFIG_USB_REQUEST_BUFFER_SIZE=2048
CONFIG_ISR_STACK_SIZE=4096
``` | /content/code_sandbox/samples/net/openthread/coprocessor/overlay-usb-nrf-br.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 87 |
```c
/*
*
*/
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(net_mqtt_publisher_sample, LOG_LEVEL_DBG);
#include <zephyr/kernel.h>
#include <zephyr/net/socket.h>
#include <zephyr/net/mqtt.h>
#include <zephyr/random/random.h>
#include <string.h>
#include <errno.h>
#include "config.h"
#if defined(CONFIG_USERSP... | /content/code_sandbox/samples/net/mqtt_publisher/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 3,432 |
```unknown
/*
*
*/
/ {
chosen {
zephyr,ot-uart = &cdc_acm_uart0;
};
};
&zephyr_udc0 {
cdc_acm_uart0: cdc_acm_uart0 {
compatible = "zephyr,cdc-acm-uart";
};
};
``` | /content/code_sandbox/samples/net/openthread/coprocessor/usb.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 68 |
```unknown
CONFIG_NETWORKING=y
CONFIG_NET_L2_OPENTHREAD=y
# Disable certain parts of Zephyr IPv6 stack
CONFIG_NET_IPV6_NBR_CACHE=n
CONFIG_NET_IPV6_MLD=n
# Logging
CONFIG_LOG=y
CONFIG_LOG_MAX_LEVEL=1
CONFIG_LOG_MODE_MINIMAL=n
CONFIG_LOG_BACKEND_SPINEL=y
CONFIG_LOG_BACKEND_RTT=y
CONFIG_LOG_BACKEND_UART=n
CONFIG_BOOT_BA... | /content/code_sandbox/samples/net/openthread/coprocessor/prj.conf | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 242 |
```c
/* main.c - OpenThread NCP */
/*
*
*/
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(ot_br, LOG_LEVEL_DBG);
#define APP_BANNER "***** OpenThread NCP on Zephyr %s *****"
int main(void)
{
LOG_INF(APP_BANNER, CONFIG_NET_SAMPLE_APPLICATION_VERSION);
return 0;
}
``` | /content/code_sandbox/samples/net/openthread/coprocessor/src/main.c | c | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 73 |
```yaml
common:
harness: net
tags:
- net
- openthread
depends_on: openthread
min_flash: 140
sample:
description: Runs the OpenThread stack as NCP BR
name: OpenThread Network Co-Processor
tests:
sample.net.openthread.coprocessor:
build_only: true
platform_allow:
- nrf52840dk/nrf52840
... | /content/code_sandbox/samples/net/openthread/coprocessor/sample.yaml | yaml | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 323 |
```unknown
/*
*
*/
/ {
chosen {
zephyr,ot-uart = &uart0;
zephyr,console = &uart1;
};
};
&uart1 {
status = "okay";
};
``` | /content/code_sandbox/samples/net/openthread/coprocessor/boards/nrf52833dk_nrf52833.overlay | unknown | 2016-05-26T17:54:19 | 2024-08-16T18:09:06 | zephyr | zephyrproject-rtos/zephyr | 10,307 | 46 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.