Skip to content

Commit 6a6ef67

Browse files
committed
Anjay-esp32-client 23.09
BREAKING CHANGES - Removed Anjay and FreeRTOS-Cellular-Interface submodules and added Anjay-esp-idf component into the components/ directory Improvements - Updated Anjay to version X.X.X - Revamped configuration of Anjay and its dependencies - The Anjay-esp-idf component includes a new `Component config/Anjay library configuration` menu for configuring the Anjay library - Updated recommended ESP IDF to v4.4.5
1 parent 8beedba commit 6a6ef67

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+97
-1789
lines changed

.gitmodules

+3-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
[submodule "main/anjay"]
2-
path = main/anjay
3-
url = https://github.com/AVSystem/Anjay.git
4-
[submodule "main/FreeRTOS-Cellular-Library"]
5-
path = main/FreeRTOS-Cellular-Interface
6-
url = https://github.com/AVSystem/FreeRTOS-Cellular-Interface
7-
branch = esp32-client-v1.2.0
1+
[submodule "components/anjay-esp-idf"]
2+
path = components/anjay-esp-idf
3+
url = https://github.com/AVSystem/Anjay-esp-idf.git

CHANGELOG.md

+12
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# Changelog
22

3+
## 23.09 (September 7th, 2023)
4+
5+
### BREAKING CHANGES
6+
- Removed Anjay and FreeRTOS-Cellular-Interface submodules and added Anjay-esp-idf
7+
component into the components/ directory
8+
9+
### Improvements
10+
- Revamped configuration of Anjay and its dependencies
11+
- The Anjay-esp-idf component includes a new `Component config/Anjay library
12+
configuration` menu for configuring the Anjay library
13+
- Updated recommended ESP IDF to v4.4.5
14+
315
## 22.12 (December 13th, 2022)
416

517
### Bugfixes

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2021-2022 AVSystem <[email protected]>
1+
# Copyright 2021-2023 AVSystem <[email protected]>
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2021-2022 AVSystem <[email protected]>
1+
# Copyright 2021-2023 AVSystem <[email protected]>
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

README.md

+11-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Anjay ESP32 Client
22
## Overview
3-
This repository contains a LwM2M Client application example for ESP32 devices, based on open-source [Anjay](https://github.com/AVSystem/Anjay) library and [Espressif IoT Development Framework](https://github.com/espressif/esp-idf).
3+
This repository contains a LwM2M Client application example for ESP32 devices, based on open-source [Anjay-esp-idf](https://github.com/AVSystem/Anjay-esp-idf) component and [Espressif IoT Development Framework](https://github.com/espressif/esp-idf).
44

55
The following boards are supported natively in the project:
66
- ESP-WROVER-KIT
@@ -18,16 +18,18 @@ The following LwM2M Objects are supported:
1818
| M5StickC-Plus | Push button (/3347)<br>Light control (/3311)<br>Temperature sensor (/3303)<br>Accelerometer (/3313)<br>Gyroscope (/3343)
1919

2020
## Compiling and launching
21-
1. Install ESP-IDF and its dependencies on your computer. Please follow the instructions at https://docs.espressif.com/projects/esp-idf/en/v4.4/esp32/get-started/index.html up to and including the point where you call `. $HOME/esp/esp-idf/export.sh`
22-
* The project has been tested with ESP-IDF v4.4, but may work with other versions as well.
21+
1. Install ESP-IDF and its dependencies on your computer. Please follow the instructions at https://docs.espressif.com/projects/esp-idf/en/v4.4.5/esp32/get-started/index.html up to and including the point where you call `. $HOME/esp/esp-idf/export.sh`
22+
* The project has been tested with ESP-IDF v4.4.5, but may work with other versions as well.
2323
1. Clone the repository `git clone https://github.com/AVSystem/Anjay-esp32-client.git` and navigate to project directory
2424
1. Initialize and update submodules with `git submodule update --init --recursive`
2525
1. Run `idf.py set-target esp32` in the project directory
2626
1. Run `idf.py menuconfig`
2727
* navigate to `Component config/anjay-esp32-client`:
2828
* select one of supported boards or manually configure the board in `Board options` menu
29-
* configure Anjay in `Client options` menu
30-
* configure WiFi in `Connection configuration` menu
29+
* configure LwM2M client configuration in `Client options` menu
30+
* configure Wi-Fi in `Connection configuration` menu
31+
* navigate to `Component config/Anjay library configuration` to configure `Anjay`
32+
library and its dependencies (`avs_commons` and `avs_coap`)
3133
1. Run `idf.py build` to compile
3234
1. Run `idf.py flash` to flash
3335
* NOTE: M5StickC-Plus does not support default baudrate, run `idf.py -b 750000 flash` to flash it
@@ -95,8 +97,11 @@ $PROJECT_DIR/build/anjay-esp32-client/build/anjay-esp32-client.bin
9597
1. Run `idf.py menuconfig`
9698
* navigate to `Component config/anjay-esp32-client`:
9799
* select `External BG96 module` in `Choose an interface` menu
100+
* navigate to `Component config/Anjay library configuration/Enable support for external BG96 module`:
98101
* configure BG96 in `BG96 module configuration` menu
99-
* configure PDN in `Connection configuration` menu
102+
* configure PDN authentication type in `PDN authentication type` menu
103+
* configure the `APN name` (and `PDN username/password` if needed)
104+
100105
## Links
101106
* [Anjay source repository](https://github.com/AVSystem/Anjay)
102107
* [Anjay documentation](https://avsystem.github.io/Anjay-doc/index.html)

components/anjay-esp-idf

Submodule anjay-esp-idf added at 5448c8f

main/CMakeLists.txt

+1-47
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2021-2022 AVSystem <[email protected]>
1+
# Copyright 2021-2023 AVSystem <[email protected]>
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -49,51 +49,6 @@ idf_component_register(SRCS ${sources}
4949
INCLUDE_DIRS "."
5050
EMBED_FILES ${Embedded_cert})
5151

52-
file(GLOB_RECURSE ANJAY_SOURCES
53-
"anjay/src/*.c"
54-
"anjay/deps/avs_coap/src/*.c"
55-
"anjay/deps/avs_commons/src/*.c")
56-
57-
add_library(anjay MODULE ${ANJAY_SOURCES})
58-
target_include_directories(anjay PRIVATE
59-
"anjay/src"
60-
"anjay/deps/avs_coap/src"
61-
"anjay/deps/avs_commons/src")
62-
target_include_directories(anjay PUBLIC
63-
"anjay-config"
64-
"anjay/include_public"
65-
"anjay/deps/avs_coap/include_public"
66-
"anjay/deps/avs_commons/include_public")
67-
target_link_libraries(anjay PRIVATE idf::mbedtls)
68-
69-
# NOTE: avs_coap contains some assertions that check if allocated memory
70-
# follows alignment requirements. malloc() on ESP-IDF aligns everything
71-
# to 4 bytes, even though alignof(max_align_t) == alignof(int64_t)
72-
# == alignof(long double) == 8. This is just GCC being overly cautious,
73-
# the maximum hardware-imposed alignment on ESP32 is actually 4 bytes.
74-
# We disable assertions within anjay to work around that.
75-
target_compile_definitions(anjay PRIVATE NDEBUG)
76-
77-
if (CONFIG_ANJAY_CLIENT_INTERFACE_BG96_MODULE)
78-
file(GLOB_RECURSE FREERTOS_CELLULAR_LIBRARY_SOURCES
79-
"FreeRTOS-Cellular-Interface/source/*.c"
80-
"FreeRTOS-Cellular-Interface/modules/bg96/*.c"
81-
"FreeRTOS-Cellular-Interface/modules/cellular_platform.c")
82-
83-
add_library(freertos_cellular_library MODULE ${FREERTOS_CELLULAR_LIBRARY_SOURCES})
84-
target_include_directories(freertos_cellular_library PRIVATE
85-
"FreeRTOS-Cellular-Interface/source/include/private"
86-
"FreeRTOS-Cellular-Interface/modules/bg96")
87-
target_include_directories(freertos_cellular_library PUBLIC
88-
"FreeRTOS-Cellular-Interface/source/include"
89-
"FreeRTOS-Cellular-Interface/source/include/common"
90-
"FreeRTOS-Cellular-Interface/source/logging"
91-
"FreeRTOS-Cellular-Interface/source/cellular_network_transport"
92-
"FreeRTOS-Cellular-Interface/source/interface"
93-
"FreeRTOS-Cellular-Interface/modules")
94-
target_link_libraries(freertos_cellular_library PRIVATE anjay)
95-
endif()
96-
9752
add_custom_target( configure_git_version
9853
COMMAND ${CMAKE_COMMAND}
9954
-D GIT_EXECUTABLE=${GIT_EXECUTABLE}
@@ -104,7 +59,6 @@ add_custom_target( configure_git_version
10459

10560
add_dependencies(${COMPONENT_LIB} configure_git_version)
10661

107-
target_link_libraries(${COMPONENT_LIB} PRIVATE anjay)
10862
if (CONFIG_ANJAY_CLIENT_INTERFACE_BG96_MODULE)
10963
target_link_libraries(${COMPONENT_LIB} PRIVATE freertos_cellular_library)
11064
endif()

main/FreeRTOS-Cellular-Interface

-1
This file was deleted.

main/Kconfig

+7-54
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2021-2022 AVSystem <[email protected]>
1+
# Copyright 2021-2023 AVSystem <[email protected]>
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -13,6 +13,7 @@
1313
# limitations under the License.
1414

1515
menu "anjay-esp32-client"
16+
1617
choice ANJAY_CLIENT_DEVBOARD
1718
prompt "Choose targeted development board"
1819
default ANJAY_CLIENT_BOARD_UNKNOWN
@@ -146,30 +147,14 @@ menu "anjay-esp32-client"
146147

147148
config ANJAY_CLIENT_INTERFACE_BG96_MODULE
148149
bool "External BG96 module"
150+
select ANJAY_ESP_IDF_WITH_BG96_SUPPORT
149151
endchoice
150152

151153
config ANJAY_CLIENT_CELLULAR_EVENT_LOOP
152154
bool
153155
default y if ANJAY_CLIENT_INTERFACE_BG96_MODULE
154156
default n
155157

156-
if ANJAY_CLIENT_INTERFACE_BG96_MODULE
157-
menu "BG96 module configuration"
158-
159-
config ANJAY_BG96_UART_PORT_NUMBER
160-
int "UART port number"
161-
default 0
162-
163-
config ANJAY_BG96_TX_PIN
164-
int "UART Tx pin"
165-
default 0
166-
167-
config ANJAY_BG96_RX_PIN
168-
int "UART Rx pin"
169-
default 0
170-
endmenu
171-
endif
172-
173158
menu "Client options"
174159
config ANJAY_CLIENT_ENDPOINT_NAME
175160
string "Endpoint name"
@@ -217,8 +202,8 @@ menu "anjay-esp32-client"
217202
endmenu
218203
endmenu
219204

220-
menu "Connection configuration"
221-
if ANJAY_CLIENT_INTERFACE_ONBOARD_WIFI
205+
if ANJAY_CLIENT_INTERFACE_ONBOARD_WIFI
206+
menu "Connection configuration"
222207
config ANJAY_WIFI_SSID
223208
string "WiFi SSID"
224209
default "myssid"
@@ -249,38 +234,6 @@ menu "anjay-esp32-client"
249234
bool "Unique Local Link Address"
250235
endchoice
251236
endif
252-
endif
253-
254-
if ANJAY_CLIENT_INTERFACE_BG96_MODULE
255-
config ANJAY_CELLULAR_APN
256-
string "APN name"
257-
default "Cellular APN"
258-
259-
choice ANJAY_CELLULAR_PDN_AUTH_TYPE
260-
prompt "PDN authentication type"
261-
default ANJAY_CELLULAR_PDN_AUTH_TYPE_NONE
262-
263-
config ANJAY_CELLULAR_PDN_AUTH_TYPE_NONE
264-
bool "No authentication"
265-
266-
config ANJAY_CELLULAR_PDN_AUTH_TYPE_PAP
267-
bool "PAP"
268-
269-
config ANJAY_CELLULAR_PDN_AUTH_TYPE_CHAP
270-
bool "CHAP"
271-
272-
config ANJAY_CELLULAR_PDN_AUTH_TYPE_PAP_OR_CHAP
273-
bool "PAP or CHAP"
274-
endchoice
275-
276-
config ANJAY_CELLULAR_PDN_USERNAME
277-
string "PDN username" if !ANJAY_CELLULAR_PDN_AUTH_TYPE_NONE
278-
default ""
279-
280-
config ANJAY_CELLULAR_PDN_PASSWORD
281-
string "PDN password" if !ANJAY_CELLULAR_PDN_AUTH_TYPE_NONE
282-
default ""
283-
284-
endif
285-
endmenu
237+
endmenu
238+
endif
286239
endmenu

main/anjay

-1
This file was deleted.

0 commit comments

Comments
 (0)