Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
| zh:docs:guide-developer:adding_new_device [2020/09/09 02:32] – [Collecting relevant data] star_twinkling | zh:docs:guide-developer:adding_new_device [2020/09/09 02:44] – [从设备获取数据] star_twinkling | ||
|---|---|---|---|
| Line 155: | Line 155: | ||
| - | ==== Getting collected data from a device | + | ==== 从设备获取数据 |
| - | Sometimes no normal means such as scp or ftp are available for retrieving files from a device. Still one could use httpd and busybox | + | 由于空间有限,常见的文件传输实用程序(例如rsync/ |
| - | Assume the files with relevant data on the device with IP address '' | + | |
| - | On the device do: | + | 假设路由器ip为192.168.0.123,要传输的文件位于/ |
| - | cp important-data.txt /tmp | + | |
| - | mount -o bind /tmp /www | + | === HTTP通过" |
| - | After that the data on the host connected to the device do: | + | |
| - | wget http:// | + | 如果从/www提供Web界面 |
| + | |||
| + | == Sender == | ||
| + | <code bash> | ||
| + | mount -o bind /tmp /www | ||
| + | </ | ||
| + | |||
| + | == Receiver == | ||
| + | <code bash> | ||
| + | wget http:// | ||
| + | </ | ||
| + | |||
| + | === FTP通过“busybox ftpput” === | ||
| + | == Receiver == | ||
| + | 设置一个FTP服务器,添加一个具有写权限的匿名账号。 | ||
| + | <code bash> | ||
| + | python -m pyftpdlib -w -p 21 | ||
| + | </ | ||
| + | |||
| + | |||
| + | == Sender == | ||
| + | <code bash> | ||
| + | busybox ftpput 192.168.0.123 important-data.txt / | ||
| + | </ | ||
| + | |||
| + | === netcat通过“buxybox nc” === | ||
| + | == Receiver == | ||
| + | <code bash> | ||
| + | busybox nc -l -p 12345 > important-data.txt | ||
| + | </ | ||
| + | |||
| + | == Sender == | ||
| + | <code bash> | ||
| + | cat / | ||
| + | </ | ||
| + | |||
| + | === TFTP通过“busybox tftp” === | ||
| + | == Receiver == | ||
| + | Setup a tftp server | ||
| + | |||
| + | == Sender == | ||
| + | <code bash> | ||
| + | busybox tftp -p -l / | ||
| + | </ | ||
| + | |||
| + | === 通过终端(terminal)复制 === | ||
| + | 如果上述所有工具/ | ||
| | | ||