Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions examples/wolfmqtt_aws/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# name of your application
APPLICATION = wolfmqtt_aws

# If no BOARD is found in the environment, use this default:
BOARD ?= native

# This has to be the absolute path to the RIOT base directory:
RIOTBASE ?= $(CURDIR)/../..

# Comment this out to disable code in RIOT that does safety checking
# which is not needed in a production environment but helps in the
# development process:
DEVELHELP ?= 1

# Change this to 0 show compiler invocation lines by default:
QUIET ?= 1

WIFI_SSID ?= "WIFI_SSID"
WIFI_PASS ?= "WIFI_PASS"

USEPKG += wolfmqtt

USEPKG += wolfssl
USEMODULE += wolfssl_socket
USEMODULE += wolfcrypt wolfcrypt_rsa wolfcrypt_dh

# This firmware is implemented inside the package examples
USEMODULE += wolfmqtt_examples_aws

# rsa needs a larger stack
CFLAGS += -DTHREAD_STACKSIZE_MAIN=\(5*THREAD_STACKSIZE_DEFAULT\)

CFLAGS += -DWOLFMQTT_DEBUG_SOCKET

LWIP_IPV4 ?= 0

USEMODULE += lwip
USEMODULE += lwip_netdev
USEMODULE += lwip_netdb

ifneq (0,$(LWIP_IPV4))
USEMODULE += ipv4_addr
USEMODULE += lwip_arp
USEMODULE += lwip_ipv4
USEMODULE += lwip_dhcp_auto
CFLAGS += -DETHARP_SUPPORT_STATIC_ENTRIES=1
LWIP_IPV6 ?= 0
else
LWIP_IPV6 ?= 1
endif

ifneq (0,$(LWIP_IPV6))
USEMODULE += ipv6_addr
USEMODULE += lwip_ipv6
USEMODULE += lwip_ipv6_autoconfig
endif

USEMODULE += sock_udp
USEMODULE += sock_tcp

include $(RIOTBASE)/Makefile.include

# needs to be put after "include $(RIOTBASE)/Makefile.include"
ifneq (,$(filter arch_esp,$(FEATURES_USED)))
CFLAGS += -DESP_WIFI_SSID=\"$(WIFI_SSID)\"
CFLAGS += -DESP_WIFI_PASS=\"$(WIFI_PASS)\"
endif
9 changes: 9 additions & 0 deletions examples/wolfmqtt_aws/Makefile.board.dep
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Put board specific dependencies here

ifneq (,$(filter arch_esp,$(FEATURES_USED)))
USEMODULE += esp_wifi
endif

ifeq ($(BOARD),native)
USEMODULE += netdev_default
endif
54 changes: 54 additions & 0 deletions examples/wolfmqtt_aws/user_settings.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/* user_settings.h : custom configuration for wolfmqtt */

#ifndef WOLFMQTT_USER_SETTINGS_H
#define WOLFMQTT_USER_SETTINGS_H


#ifdef __cplusplus
extern "C" {
#endif

/* MANDATORY */
#undef RIOT_OS
#define RIOT_OS

#undef ENABLE_AWSIOT_EXAMPLE
#define ENABLE_AWSIOT_EXAMPLE

#define WOLFMQTT_USE_HOSTNAME 1

#if WOLFMQTT_USE_HOSTNAME
#undef AWSIOT_HOST
#define AWSIOT_HOST "a2dujmi05ideo2.iot.us-west-2.amazonaws.com"

#if defined(MODULE_IPV6_ADDR)
#undef WOLFMQTT_DNS_SERVER_IPV6
#define WOLFMQTT_DNS_SERVER_IPV6 "2001:4860:4860::8888"
#else
#undef WOLFMQTT_DNS_SERVER_IPV4
#define WOLFMQTT_DNS_SERVER_IPV4 "8.8.8.8"
#endif
#else
#if defined(MODULE_IPV6_ADDR)
#undef AWSIOT_HOST
#define AWSIOT_HOST "2620:108:700f::2351:30f8"
#else
#undef AWSIOT_HOST
#define AWSIOT_HOST "34.209.16.27"
#endif
#endif

#undef ENABLE_MQTT_TLS
#define ENABLE_MQTT_TLS

/* OPTIONAL */
#undef TEST_MESSAGE
#define TEST_MESSAGE "wolfmqtt aws on RIOT OS"

#ifdef __cplusplus
}
#endif


#endif /* WOLFMQTT_USER_SETTINGS_H */

58 changes: 58 additions & 0 deletions examples/wolfmqtt_azure/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# name of your application
APPLICATION = wolfmqtt_mqttclient

# If no BOARD is found in the environment, use this default:
BOARD ?= native

# This has to be the absolute path to the RIOT base directory:
RIOTBASE ?= $(CURDIR)/../..

# Comment this out to disable code in RIOT that does safety checking
# which is not needed in a production environment but helps in the
# development process:
DEVELHELP ?= 1

# Change this to 0 show compiler invocation lines by default:
QUIET ?= 1

WIFI_SSID ?= "WIFI_SSID"
WIFI_PASS ?= "WIFI_PASS"

USEPKG += wolfmqtt

# This firmware is implemented inside the package examples
USEMODULE += wolfmqtt_examples_azure

LWIP_IPV4 ?= 0

USEMODULE += lwip
USEMODULE += lwip_netdev
USEMODULE += lwip_netdb

ifneq (0,$(LWIP_IPV4))
USEMODULE += ipv4_addr
USEMODULE += lwip_arp
USEMODULE += lwip_ipv4
USEMODULE += lwip_dhcp_auto
CFLAGS += -DETHARP_SUPPORT_STATIC_ENTRIES=1
LWIP_IPV6 ?= 0
else
LWIP_IPV6 ?= 1
endif

ifneq (0,$(LWIP_IPV6))
USEMODULE += ipv6_addr
USEMODULE += lwip_ipv6
USEMODULE += lwip_ipv6_autoconfig
endif

USEMODULE += sock_udp
USEMODULE += sock_tcp

include $(RIOTBASE)/Makefile.include

# needs to be put after "include $(RIOTBASE)/Makefile.include"
ifneq (,$(filter arch_esp,$(FEATURES_USED)))
CFLAGS += -DESP_WIFI_SSID=\"$(WIFI_SSID)\"
CFLAGS += -DESP_WIFI_PASS=\"$(WIFI_PASS)\"
endif
9 changes: 9 additions & 0 deletions examples/wolfmqtt_azure/Makefile.board.dep
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Put board specific dependencies here

ifneq (,$(filter arch_esp,$(FEATURES_USED)))
USEMODULE += esp_wifi
endif

ifeq ($(BOARD),native)
USEMODULE += netdev_default
endif
51 changes: 51 additions & 0 deletions examples/wolfmqtt_azure/user_settings.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/* user_settings.h : custom configuration for wolfmqtt */

#ifndef WOLFMQTT_USER_SETTINGS_H
#define WOLFMQTT_USER_SETTINGS_H


#ifdef __cplusplus
extern "C" {
#endif

/* MANDATORY */
#undef RIOT_OS
#define RIOT_OS

#define WOLFMQTT_USE_HOSTNAME 1

#if WOLFMQTT_USE_HOSTNAME
#undef DEFAULT_MQTT_HOST
#define DEFAULT_MQTT_HOST "test.mosquitto.org"

#if defined(MODULE_IPV6_ADDR)
#undef WOLFMQTT_DNS_SERVER_IPV6
#define WOLFMQTT_DNS_SERVER_IPV6 "2001:4860:4860::8888"
#else
#undef WOLFMQTT_DNS_SERVER_IPV4
#define WOLFMQTT_DNS_SERVER_IPV4 "8.8.8.8"
#endif
#else
#if defined(MODULE_IPV6_ADDR)
#undef DEFAULT_MQTT_HOST
#define DEFAULT_MQTT_HOST "2001:41d0:a:fed0::1"
#else
#undef DEFAULT_MQTT_HOST
#define DEFAULT_MQTT_HOST "5.196.95.208"
#endif
#endif

/* OPTIONAL */
#undef TEST_MESSAGE
#define TEST_MESSAGE "wolfmqtt azure on RIOT OS"

#undef WOLFMQTT_DISCONNECT_CB
#define WOLFMQTT_DISCONNECT_CB

#ifdef __cplusplus
}
#endif


#endif /* WOLFMQTT_USER_SETTINGS_H */

58 changes: 58 additions & 0 deletions examples/wolfmqtt_mqttclient/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# name of your application
APPLICATION = wolfmqtt_mqttclient

# If no BOARD is found in the environment, use this default:
BOARD ?= native

# This has to be the absolute path to the RIOT base directory:
RIOTBASE ?= $(CURDIR)/../..

# Comment this out to disable code in RIOT that does safety checking
# which is not needed in a production environment but helps in the
# development process:
DEVELHELP ?= 1

# Change this to 0 show compiler invocation lines by default:
QUIET ?= 1

WIFI_SSID ?= "WIFI_SSID"
WIFI_PASS ?= "WIFI_PASS"

USEPKG += wolfmqtt

# This firmware is implemented inside the package examples
USEMODULE += wolfmqtt_examples_mqttclient

LWIP_IPV4 ?= 0

USEMODULE += lwip
USEMODULE += lwip_netdev
USEMODULE += lwip_netdb

ifneq (0,$(LWIP_IPV4))
USEMODULE += ipv4_addr
USEMODULE += lwip_arp
USEMODULE += lwip_ipv4
USEMODULE += lwip_dhcp_auto
CFLAGS += -DETHARP_SUPPORT_STATIC_ENTRIES=1
LWIP_IPV6 ?= 0
else
LWIP_IPV6 ?= 1
endif

ifneq (0,$(LWIP_IPV6))
USEMODULE += ipv6_addr
USEMODULE += lwip_ipv6
USEMODULE += lwip_ipv6_autoconfig
endif

USEMODULE += sock_udp
USEMODULE += sock_tcp

include $(RIOTBASE)/Makefile.include

# needs to be put after "include $(RIOTBASE)/Makefile.include"
ifneq (,$(filter arch_esp,$(FEATURES_USED)))
CFLAGS += -DESP_WIFI_SSID=\"$(WIFI_SSID)\"
CFLAGS += -DESP_WIFI_PASS=\"$(WIFI_PASS)\"
endif
9 changes: 9 additions & 0 deletions examples/wolfmqtt_mqttclient/Makefile.board.dep
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Put board specific dependencies here

ifneq (,$(filter arch_esp,$(FEATURES_USED)))
USEMODULE += esp_wifi
endif

ifeq ($(BOARD),native)
USEMODULE += netdev_default
endif
51 changes: 51 additions & 0 deletions examples/wolfmqtt_mqttclient/user_settings.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/* user_settings.h : custom configuration for wolfmqtt */

#ifndef WOLFMQTT_USER_SETTINGS_H
#define WOLFMQTT_USER_SETTINGS_H


#ifdef __cplusplus
extern "C" {
#endif

/* MANDATORY */
#undef RIOT_OS
#define RIOT_OS

#define WOLFMQTT_USE_HOSTNAME 1

#if WOLFMQTT_USE_HOSTNAME
#undef DEFAULT_MQTT_HOST
#define DEFAULT_MQTT_HOST "test.mosquitto.org"

#if defined(MODULE_IPV6_ADDR)
#undef WOLFMQTT_DNS_SERVER_IPV6
#define WOLFMQTT_DNS_SERVER_IPV6 "2001:4860:4860::8888"
#else
#undef WOLFMQTT_DNS_SERVER_IPV4
#define WOLFMQTT_DNS_SERVER_IPV4 "8.8.8.8"
#endif
#else
#if defined(MODULE_IPV6_ADDR)
#undef DEFAULT_MQTT_HOST
#define DEFAULT_MQTT_HOST "2001:41d0:a:fed0::1"
#else
#undef DEFAULT_MQTT_HOST
#define DEFAULT_MQTT_HOST "5.196.95.208"
#endif
#endif

/* OPTIONAL */
#undef TEST_MESSAGE
#define TEST_MESSAGE "wolfmqtt mqttclient on RIOT OS"

#undef WOLFMQTT_DISCONNECT_CB
#define WOLFMQTT_DISCONNECT_CB

#ifdef __cplusplus
}
#endif


#endif /* WOLFMQTT_USER_SETTINGS_H */

Loading