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 september. Please use hippie2000@webnmail.de instead.


Property:rpc (avmcmd)

From BoxMatrix

BoxMatrix >> Shell-Commands >> rpc (avmcmd) @ 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 Gallery

Startup-Scr Hotplug-Scr BusyBox-Cmds Bash-Cmds AVM-Cmds Chipset-Cmds Linux-Cmds Shared-Libs Kernel-Mods Research

Name-Collision - multiple objects in this wiki use the name rpc!
rpc (avmcmd) Remote command executer for Puma6 / Puma7 models.
rpc (event) ptestd remote commands
rpc (static) TODO
rpc (tmpdir) TODO
rpc (vartar) TODO


Goto:   Examples  -  Source  -  Dependencies   -   Model-Matrix   -   Symbols   -   SMW-Browser


rpc is a remote command executer for Puma6 / Puma7 models, runing the passed command on 'the other' CPU.
Since FRITZ!OS is completely ported to ATOM rpc is installed on the ATOM side to run a command on the ARM CPU.
In early 64xx firmware when FRITZ!OS was running on the ARM rpc was installed there to run a command on the ATOM CPU.

The arguments passed to rpc are launched in a remote sh invocation which redirects its stdin, stdout and stderr back to rpc.
There is no way to do input or output redirection or use piping on the target side. This has to be done on the rpc side.

The error handling is special. The redirection of stderr only works as long as the target command does not fail.
Whenever a command fails the hardcoded string rpc: call failed: file or directory not found is printed to stdout.
This means redirecting stderr with 2> only makes sense if the target command prints something to stderr without failing.

This works since dd prints the report to stderr without failing:

root@fritz2:/var/mod/root# rpc dd if=/dev/zero of=/dev/null count=1

1+0 records in
1+0 records out

root@fritz2:/var/mod/root# rpc dd if=/dev/zero of=/dev/null count=1 2>/dev/null

Here redirection fails, dd fails on the invalid option and the default error is reported to stdout (not stderr):

root@fritz2:/var/mod/root# rpc dd invalid=2 if=/dev/zero of=/dev/null count=1 2>/dev/null

rpc: call failed: file or directory not found

dd did print its help text to stderr on the target side, but it is dropped to report the hardcoded error to stdout.
This means you never get a real error message from the target side unless you use an armconsole.

fw 7.29 help:

root@fritz2:/var/mod/root# rpc -?

Usage: rpc remote_command_line
       rpc [OPTIONS] -- remote_command_line

         -t SEC           timeout SEC seconds
         -s               connect over socket
         -f="src:tgt"   file transfer

There's a limit for the remote_command_line length, if it's exceeded rpc reports:

rpc: ERROR 0x86 (errno 0): remote command line too long, max. size:
     4*argc + strlen(argv[0]) + ... + strlen(argv[argc-1]) <= 224


Let's compare the kernels running both Linux instances in fw 7.29:

root@fritz2:/var/mod/root# uname -a

Linux fritz2 #1 SMP PREEMPT 2021-06-04 i686 GNU/Linux

root@fritz2:/var/mod/root# rpc uname -a

Linux FRITZ!Box Cable #1 PREEMPT 2021-06-04 armv6b

Let's peek the ARM Linux acc0 interface from the ATOM Linux in fw 7.29;

root@fritz2:/var/mod/root# rpc ifconfig acc0

acc0      Link encap:Ethernet  HWaddr 4A:1B:86:XX:XX:XX  
          inet addr:  Bcast:  Mask:
          RX packets:2353120 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2348476 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:121915139 (116.2 MiB)  TX bytes:1012745287 (965.8 MiB)


The names of source files compiled into an executable often help to understand function blocks (and show gaps in the docs).
fw 7.29 source files:

$ strings /usr/bin/rpc | grep -e '\.c$' -e '\.cpp$'



Daily updated index of all dependencies of this command. Last update: 2023-01-28 07:15 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 ld.so 4 7.08 - 7.13 Dynamic linker / loader Linux
Depends on lib libavmcsock.so 12 6.20 - 7.50 Networking, I/O and helper functions AVM
Depends on lib libc.so 12 6.20 - 7.50 Standard C library Linux
Depends on lib libgcc_s.so 6 6.20 - 6.110 GCC low-level runtime library Linux
4 dependencies for this command


Daily updated index of the presence, path and size of this command for each model. Last update: 2023-01-28 05:56 GMT.
Showing all models using this command. 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 6430 Cable (arm) 6.84 - 7.29 /usr/bin 9.7k - 13.3k
FRITZ!Box 6430 Cable (atom) 6.84 - 7.29 /usr/bin 10.5k - 13.2k
FRITZ!Box 6490 Cable (arm) 6.20 - 7.39 /usr/bin 9.7k - 13.3k
FRITZ!Box 6490 Cable (atom) 6.20 - 7.39 /usr/bin 10.5k - 13.2k
FRITZ!Box 6590 Cable (arm) 6.83 - 7.39 /usr/bin 9.7k - 13.3k
FRITZ!Box 6590 Cable (atom) 6.83 - 7.39 /usr/bin 10.5k - 13.2k
FRITZ!Box 6591 Cable (arm) 7.04 - 7.39 /usr/bin 11.8k - 17.4k
FRITZ!Box 6591 Cable (atom) 7.04 - 7.39 /usr/bin 11.8k - 17.4k
FRITZ!Box 6660 Cable (arm) 7.14 - 7.39 /usr/bin 13.3k - 17.4k
FRITZ!Box 6660 Cable (atom) 7.14 - 7.39 /usr/bin 13.3k - 17.4k
FRITZ!Box 6690 Cable (arm) 7.28 - 7.50 /usr/bin 13.3k - 17.4k
FRITZ!Box 6690 Cable (atom) 7.28 - 7.50 /usr/bin 13.3k - 17.4k
FRITZ!Box Fon WLAN 7390 /usr/bin 542
13 models use this command


Daily updated index of all symbols of this command. Last update: 2023-01-28 07:15 GMT.

Firmware Symbol
7.08 - 7.39 main
1 symbol for this command


Information is currently being retrieved from the backend.