If you like BoxMatrix then please contribute Supportdata, Supportdata2, Firmware and/or Hardware (get in touch).
My metamonk@yahoo.com is not reachable by me since years. Please use hippie2000@webnmail.de instead.
Property:libalwswdutil.so
BoxMatrix >> Shell-Commands >> libalwswdutil.so | @ BoxMatrix - IRC-Chat - Translate: de es fr it nl pl |
News | Selectors | Models | Accessories | Components | Environment | Config | Commands | System | Webif | Software | Develop | Lexicon | Community | Project | Media |
Startup-Scr | Hotplug-Scr | BusyBox-Cmds | Bash-Cmds | AVM-Cmds | Chipset-Cmds | Linux-Cmds | Shared-Libs | Kernel-Mods | Research |
Command: | libalwswdutil.so - type Link, Lib | Wiki | Freetz | IPPF | whmf | AVM | Web |
Location: | Shell-Commands >> Shared-Libraries - Origin: AVM | ||||||
Path: | Release: /lib Lab+Rel: /lib | ||||||
Properties: | Size: 33.4k - 45.5k, Link - Firmware: 7.39 - 7.62 | ||||||
Function: | ZigBee Network Co-Processor low-level management utilities |
Goto: Source - Dependencies - Model-Matrix - Symbols - SMW-Browser
Details
libalwswdutil.so is the ZigBee Network Co-Processor (NCP) low-level management utilities library.
The name stands for Avm Lr-Wpan Serial Wire Debug UTIL LIBrary
.
This library is a low-level interface for resetting, booting and flashing the NCP.
It supports a product dependent configurable set of communication methods to perform its job.
- Product configuration
Product configuration comes from /etc/lrwpan/config.json
and is handled by alw_product_*
functions.
For fsgw fw 7.57 it looks like this:
root@fritz:/var/mod/root# cat /etc/lrwpan/config.json { "has_usb": true, "has_uart": false, "serial_baudrate": 115200, "serial_flow_control": false, "has_usb_update": true, "has_uart_update": false, "has_bootloader_hold_gpio": true }
config.json has been added in fw 7.57, likely due to different solutions in the upcoming FRITZ!Box models with ZigBee.
It is parsed using libyajl.so.
- Communication lines
AVM uses 4 GPIO lines for low-level communication to the NCP. These are maintained by libgpiod.so;
root@fritz:/var/mod/root# gpioinfo gpiochip1 gpiochip1 - 4 lines: line 0: "lrwpan-reset-lowactive" "alw_swd_reset" output active-high [used] line 1: "lrwpan-swdio" "alw_swd_swdio" input active-high [used] line 2: "lrwpan-swclk" "alw_swd_swclk" input active-high [used] line 3: "lrwpan-bootloader-lowactive" "alw_swd_bootloader" output active-high [used]
The swclk
/ swdio
lines are the ARM developed SWD (Serial Wire Debug) interface, which supports all features of JTAG.
The reset
line resets the NCP, the bootloader
line holds the bootloader. All lines are bidirectional except reset
.
- Detection of firmware versions
The alw_imgversion_*
functions of libalwswdutil.so detect installed and update image firmware versions.
Firmware blobs are located at /lib/firmware/lrwpan/hw${HWRevision}_${hwvar
}.hwvar
is not the HWSubRevision - a HWSubRevision 3 model has hwvar 2.
- The Bootloader blob is named
mcuboot-<version>.bin
- The Application blob is named
zncp-<version>.bin
- the only blob which appeared in FRITZ!OS so far - The Production test blob is named
ptest-<version>.bin
<version>
is matched by the regular expression ([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})
.
From alw_runtime.log fw 7.57:
[alw_imgversion.c:265] Using target folder /lib/firmware/lrwpan/hw265_2 [alw_imgversion.c:281] Bootloader bin file not found [alw_imgversion.c:297] ptest app bin file not found [alw_imgversion.c:309] NCP app bin file found: zncp-1.0.2.bin with version 1.0.2 (hwrev: 265, hwvar: 2)
- Updating the firmware
Normally firmware updates are performed via USB using libalwncpdfu.so.
But there are also the low-level functions alw_swd_flash_nrf52_*
to perfom an update.
This uses the SWD MEM-AP
(MEMory Access Port) which permits to access the RAM and Flash of the NCP.
See the alw_swd_mem_ap*
, alw_swd_write_ap*
and alw_swd_read_ap*
functions below.
ZigBee stack:
- Lexicon: ZigBee, LR-WPAN
- Firmware: zncp-0.2.0.bin, zncp-1.0.0.bin, zncp-1.0.1.bin, zncp-1.0.2.bin
- Firmware: zncp-1.1.1.bin, zncp-1.2.0.bin, zncp-1.2.1.bin
- Devices: ttyACM0, ttyACM1, ttyLRWPAN_NCP, ttyLRWPAN_PTEST
- Sockets: alw_gw_uds.sock
- Sinks: aflrwpan_gw_app
- Commands: alw_zb_gw_app, alw_zb_gw_cli, alw_flash_util, alw_zb_gw_stop
- Commands: supportdata.aha, zb_pcap_dump, uart_flash_tool
- Libraries: liblrwpan.so, libahamodaflrwpan.so, libalwptest.so
- Libraries: libalwncpdfu.so, libalwswdutil.so, libalwudsmsg.so
- Libraries: libcodsu.so, libudev.so, libusb.so, libgpiod.so
- Config: lrwpan.cfg, 95-lrwpan_usb.rules, 95-aflrwpan_usb.rules, alw_zb_gw_app.service
- UI-Modules: lrwpan
- Logs: alw_runtime.log, alw_zb_coordinator.log, alw_gw_crashlog.json
- Temp: supportdata.lrwpan
- Procfs: lrwpan
Source
The names of source files compiled into an executable often help to understand function blocks (and show gaps in the docs).
fw 7.57 source files:
$ strings /lib/libalwswdutil.so | grep -e '\.c$' -e '\.cpp$' /GU/LRWPAN_maple_lowmem_build/src/main/aflrwpan_swd_util/src/alw_imgversion.c /GU/LRWPAN_maple_lowmem_build/src/main/aflrwpan_swd_util/src/alw_gpio_util.c /GU/LRWPAN_maple_lowmem_build/src/main/aflrwpan_swd_util/src/alw_swd_data_link.c /GU/LRWPAN_maple_lowmem_build/src/main/aflrwpan_swd_util/src/alw_swd_nrf52.c /GU/LRWPAN_maple_lowmem_build/src/main/aflrwpan_swd_util/src/alw_swd_util.c /GU/LRWPAN_maple_lowmem_build/src/main/aflrwpan_swd_util/src/alw_product_config.c /GU/LRWPAN_maple_lowmem_build/src/main/aflrwpan_swd_util/src/alw_gpio_gpiod.c
Dependencies
Daily updated index of all dependencies of this library. Last update: 2024-04-26 07:29 GMT.
A *
in the Mod
column marks info from Supportdata-Probes, which will always stay incomplete.
Relation | Typ | Object | Mod | Firmware | Info | Origin |
---|---|---|---|---|---|---|
Depends on | lib | libavmcsock.so | 5 | 7.39 - 7.62 | Networking, I/O and helper functions | AVM |
Depends on | lib | libc.so | 5 | 7.39 - 7.62 | Standard C library | Linux |
Depends on | lib | libgpiod.so | 5 | 7.39 - 7.62 | Linux GPIO character device API | LibGpiod |
Depends on | lib | libyajl.so | 5 | 7.57 - 7.62 | Event-driven JSON parser | Linux |
Required by | lib | libalwptest.so | 4 | 7.39 - 7.61 | ZigBee production test | AVM |
Required by | lib | liblrwpan.so | 5 | 7.39 - 7.62 | ctlmgr plugin library for ZigBee config | AVM |
Required by | cmd | alw_flash_util | 4 | 7.39 - 7.61 | Flash utility for the ZigBee Network Co-Processor application firmware. | AVM |
Required by | cmd | alw_zb_gw_app | 5 | 7.39 - 7.62 | ZigBee Network Co-Processor management daemon. | AVM |
Required by | cmd | alw_zb_gw_cli | 5 | 7.39 - 7.62 | Commandline frontend for the ZigBee daemon alw_zb_gw_app. | AVM |
9 dependencies for this library |
Model-Matrix
Daily updated index of the presence, path and size of this library for each model. Last update: 2024-04-26 05:10 GMT.
Showing all models using this library. Click any column header (click-wait-click) to sort the list by the respective data.
The (main/scrpn/boot/arm/prx/atom)
label in the Model
column shows which CPU is meant for models with multiple Linux instances.
Note that this list is merged from Firmware-Probes of all known AVM firmware for a model, including Recovery.exe and Labor-Files.
Model | Firmware | Path | Size |
---|---|---|---|
FRITZ!Box 5690 Pro (arm) | 7.59 - 7.60 | /lib | 41.4k, Link |
FRITZ!Box 6670 Cable (arm) | 7.61 - 7.62 | /lib | 41.5k - 45.5k, Link |
FRITZ!Box 6670 Cable (atom) | 7.61 - 7.62 | /lib | 41.5k - 45.5k, Link |
FRITZ!Box 7690 | 7.59 | /lib | 41.4k, Link |
FRITZ!Smart Gateway | 7.39 - 7.59 | /lib | 33.4k - 41.4k, Link |
5 models use this library |
Symbols
Daily updated index of all symbols of this library. Last update: 2024-04-26 07:29 GMT.
Firmware | Symbol |
---|---|
7.57 - 7.62 | alw_gpio_bootloader_pin_available |
7.39 - 7.62 | alw_gpio_close |
7.39 - 7.62 | alw_gpio_get_chip_mode |
7.39 - 7.62 | alw_gpio_hold_reset |
7.39 - 7.62 | alw_gpio_init |
7.39 - 7.62 | alw_gpio_reboot_application |
7.39 - 7.62 | alw_gpio_reboot_bootloader |
7.58 - 7.62 | alw_gpio_reboot_bootloader_available |
7.39 - 7.62 | alw_gpio_set_bootloader_stateless |
7.39 - 7.62 | alw_gpio_set_reset_stateless |
7.39 - 7.52 | alw_imgversion_find_fw_file |
7.39 - 7.52 | alw_imgversion_find_fw_folder |
7.39 - 7.62 | alw_imgversion_get_bin_file_info |
7.39 - 7.62 | alw_imgversion_get_target_folder_path |
7.39 - 7.62 | alw_imgversion_locate_bin_files |
7.57 - 7.62 | alw_imgversion_swd_read_app_version |
7.57 - 7.62 | alw_imgversion_swd_read_bootloader_version |
7.39 - 7.62 | alw_imgversion_swd_tag_read |
7.57 - 7.62 | alw_product_config_get |
7.57 - 7.62 | alw_product_config_load |
7.39 - 7.62 | alw_swd_close |
7.39 - 7.62 | alw_swd_connect |
7.39 - 7.62 | alw_swd_dl_clear_sticky_errors |
7.39 - 7.62 | alw_swd_dl_empty_transaction |
7.39 - 7.62 | alw_swd_dl_init |
7.39 - 7.62 | alw_swd_dl_read_reg |
7.39 - 7.62 | alw_swd_dl_write_reg |
7.39 - 7.62 | alw_swd_dp_init |
7.59 - 7.62 | alw_swd_flash_get_rwe_mode |
7.39 - 7.62 | alw_swd_flash_nrf52_bin |
7.58 - 7.62 | alw_swd_flash_nrf52_check_approtect |
7.39 - 7.62 | alw_swd_flash_nrf52_erase_all |
7.39 - 7.62 | alw_swd_flash_nrf52_erase_all_ctrl_ap |
7.59 - 7.62 | alw_swd_flash_nrf52_erase_page |
7.39 - 7.61 | alw_swd_flash_nrf52_reset |
7.59 - 7.62 | alw_swd_flash_set_rwe_mode |
7.59 - 7.62 | alw_swd_halt |
7.39 - 7.62 | alw_swd_init |
7.39 - 7.62 | alw_swd_mem_ap_async_read_u32 |
7.39 - 7.62 | alw_swd_mem_ap_async_write_u32 |
7.39 - 7.62 | alw_swd_mem_ap_atomic_read_u32 |
7.39 - 7.62 | alw_swd_mem_ap_atomic_write_u32 |
7.39 - 7.62 | alw_swd_mem_ap_init |
7.39 - 7.62 | alw_swd_mem_ap_read_buff |
7.39 - 7.62 | alw_swd_mem_ap_write_buff |
7.39 - 7.62 | alw_swd_read_ap |
7.39 - 7.62 | alw_swd_read_ap_plain |
7.39 - 7.62 | alw_swd_read_dp |
7.59 - 7.62 | alw_swd_readblock |
7.59 - 7.62 | alw_swd_reset |
7.39 - 7.62 | alw_swd_write_ap |
7.39 - 7.62 | alw_swd_write_ap_plain |
7.39 - 7.62 | alw_swd_write_dp |
7.59 - 7.62 | alw_swd_writeblock |
7.59 - 7.60 | alw_uart_flash_connection_test |
7.59 - 7.60 | alw_uart_flash_send_image |
56 symbols for this library |