为了小孩多听粤语,想播放以前收音机里面的小说节目,于是做了一个这样的东西, 每天定时大约吃饭时间播放一集节目, 第一季节目就播三国演义把.

垃圾电视盒刷armbian, 接usb 声卡, 一个功放模块,一个控制模块, 三个模块都是自己做了, 控制模块是usb转串口,接一个单片机,控制功放模块的电源, 因为24小时不停待机,因此不播放的时候要休眠状态.
垃圾电视盒是没有IO的,所以有这个东西.

安装所有必须的东西
samba, cifs-utils , 音频文件在nas上,所以要装samba 共享.
stty,控制串口波特率等
sox , 播放mp3的的东西
python, 控制脚本

python 脚本

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/usr/bin/python

import json
import os
import linecache
import sys



filename = 'cur_play_id.json'
list_name = 'play_list'
index=1


os.system('stty -F /dev/ttyUSB0 115200')
os.system ('echo ":9000020101aa\r\n" >> /dev/ttyUSB0')
os.system ('play sanya.mp3')

if len(sys.argv) > 1 :
list_name= sys.argv[1]

print(list_name)



try:

with open (filename) as f_obj:
ja=json.load(f_obj)
index=ja['cur_index']
index = index +1

except FileNotFoundError:
print("index file Not Found!@!!!")
index = 1


try:

play_file = linecache.getline(list_name,index).strip()
if play_file =='' :
print ("end of play list file")
else :
a_cmd = 'play ' + play_file
print(a_cmd)
os.system(a_cmd)
os.system ('echo ":9000020100aa\r\n" >> /dev/ttyUSB0')

except FileNotFoundError:
print ("Play List file not found!!")
os._exit(0)



data_dic = {'cur_index':index}

with open(filename,'w') as f:
json.dump(data_dic,f)

用法就是python play_mp3.py list.txt

生成播放列表文件的脚本

1
ls -1 |awk '{print i$0}' i=`pwd`'/' > list.txt

#设置mac

盒子mac 没有,
直接编辑 /etc/network/interfaces 文件,在 iface eth0 inet static 后面添加一行:
pre-up ifconfig eth0 hw ether xx:xx:xx:xx:xx:xx(要改成的MAC)

1
2
3
4
5
iface eth0 inet static
pre-up ifconfig eth0 hw ether xx:xx:xx:xx:xx:xx(要改成的MAC)
address 192.168.1.10
netmask 255.255.255.0
gateway 192.168.1.1

对于wifi 也是一样

另外一种说法 uboot 中设置,不过我试过不行

/boot/uEnv.ini

dtb_name=/dtb/meson-gxl-s905d-phicomm-n1.dtb
bootargs=root=LABEL=ROOT_EMMC rootflags=data=writeback rw console=ttyAML0,115200n8 console=tty0 no_cons…………………..
ethaddr=42:b8:79:09:d8:ed

#设置时区

1
echo "Asia/Shanghai" > /etc/timezone && ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

#设置语言环境
/etc/environment

1
2
3
ARCH=arm64
LC_ALL="en_US.UTF-8"
LANG="en_US.UTF-8"

数码视讯Q7 的垃圾电视盒30元一个,S905L芯片, A53 x 4 ,1G RAM , 可以跑很多东西,本来想跑一些nas应用,后来猫盘,什么我家云等矿渣也不断出来,就放弃, 现在计划拿来跑AI的一些视频识别应用.

armbian 上面针对S905的都没有rtl8189的驱动,那就自己加

下载virtul box, 在上面跑一个unbutu的虚拟机,这里必须用官方mini.iso来安装.不能用18.4.3 这个官方推荐版本,说来都是泪,说白了就是版本依赖的问题.

下载armbian build脚本,我们用150balbes 针对s905的版本

1
2
3
git clone https://github.com/150balbes/Build-Armbian
cd Build-Armbian
./compile.sh BOARD=aml-g12 BRANCH=default RELEASE=bionic BUILD_MINIMAL=no BUILD_DESKTOP=no KERNEL_ONLY=no KERNEL_CONFIGURE=yes

下面这段话是别人的

1
2
3
4
5
6
7
BOARD 设置为 aml-g12,可以选 aml-s905,但是只有 aml-g12 编译时用的源码是最新的
BRANCH 编译使用的源码分支 在 105 的 build 中,default 使用的是他自己 fork 的 S905 kernel 源码
RELEASE 为需要编译的版本,我这里设置为 Ubuntu 19.04 disco,可以选择 buster bionic stretch xenial 等
BUILD_MINIMAL 是否为最小版本,这个选项改为 yes 之后,没有 armbian-config 了,所以还是把它改为了 no
BUILD_DESKTOP 是否编译桌面版本
KERNEL_ONLY 是否只编译内核
KERNEL_CONFIGURE 是否在开始编译是打开内核配置,这个选项需要设置为 yes,来添加我们需要的 WIFI 驱动

修改 /Build-Armbian/lib/compilation-prepare.sh 脚本

增加下载编译rtl8189的代码
代码在这里 https://github.com/jwrdegoede/rtl8189ES_linux

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Wireless drivers for Realtek 8189ES  chipsets

if linux-version compare $version ge 3.14 && [ "$EXTRAWIFI" == yes ]; then

# attach to specifics tag or branch
local rtl8189es="branch:rtl8189fs" #必须用这个分支

display_alert "Adding" "Wireless drivers for Realtek 8189fs chipsets ${rtl8189es}" "info"

fetch_from_repo "https://github.com/jwrdegoede/rtl8189ES_linux" "rtl8189fs" "${rtl8189es}" "yes"
cd ${SRC}/cache/sources/${LINUXSOURCEDIR}
rm -rf ${SRC}/cache/sources/${LINUXSOURCEDIR}/drivers/net/wireless/rtl8189fs
mkdir -p ${SRC}/cache/sources/${LINUXSOURCEDIR}/drivers/net/wireless/rtl8189fs/
cp -R ${SRC}/cache/sources/rtl8189fs/${rtl8189es#*:}/{core,hal,include,os_dep,platform} \
${SRC}/cache/sources/${LINUXSOURCEDIR}/drivers/net/wireless/rtl8189fs

# Makefile
cp ${SRC}/cache/sources/rtl8189fs/${rtl8189es#*:}/Makefile \
${SRC}/cache/sources/${LINUXSOURCEDIR}/drivers/net/wireless/rtl8189fs/Makefile
cp ${SRC}/cache/sources/rtl8189fs/${rtl8189es#*:}/Kconfig \
${SRC}/cache/sources/${LINUXSOURCEDIR}/drivers/net/wireless/rtl8189fs/Kconfig

# Add to section Makefile
echo "obj-\$(CONFIG_RTL8189FS) += rtl8189fs/" >> $SRC/cache/sources/${LINUXSOURCEDIR}/drivers/net/wireless/Makefile
sed -i '/source "drivers\/net\/wireless\/ti\/Kconfig"/a source "drivers\/net\/wireless\/rtl8189fs\/Kconfig"' \
$SRC/cache/sources/${LINUXSOURCEDIR}/drivers/net/wireless/Kconfig

fi

然后就重新编译就可以, 上面看上去好像很简单,我也搞了几天.

下面这段事别人的, https://blog.csdn.net/jklinux/article/details/78737691

我复制过来, 有时候有用

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
通过检查电路原理图,可以发现此wifi芯片是连接到板上mmc1控制器上的。H5共有三个sd/mmc控制器, 而控制器驱动是platform_driver, 需要用platform_device或在设备树里提供硬件控制器的硬件资源.

在H5的设备树sunxi-h3-h5.dtsi文件里,而描述好三个sd/mmc控制器的设备节点:

mmc0: mmc@01c0f000 {
/* compatible and clocks are in per SoC .dtsi file */
reg = <0x01c0f000 0x1000>;
resets = <&ccu RST_BUS_MMC0>;
reset-names = "ahb";
interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>;
status = "enabled";
#address-cells = <1>;
#size-cells = <0>;
};

mmc1: mmc@01c10000 {
/* compatible and clocks are in per SoC .dtsi file */
reg = <0x01c10000 0x1000>;
resets = <&ccu RST_BUS_MMC1>;
reset-names = "ahb";
interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>;
status = "enabled";
#address-cells = <1>;
#size-cells = <0>;
};

mmc2: mmc@01c11000 {
/* compatible and clocks are in per SoC .dtsi file */
reg = <0x01c11000 0x1000>;
resets = <&ccu RST_BUS_MMC2>;
reset-names = "ahb";
interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>;
status = "enabled";
#address-cells = <1>;
#size-cells = <0>;
};

但三个设备节点的status属性值不是”okay”的话,是不会生效的. 而且还需要提供sd/mmc控制器使用的gpio口配置信息.

在设备树文件sun50i-h5-nanopi-neo2.dts里,已提供让mmc0控制器生效的设备节点:

&mmc0 {
pinctrl-names = "default";
pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>;
vmmc-supply = <&reg_vcc3v3>;
bus-width = <4>;
cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
boot_device = <1>;
status = "okay";
};

所以要想使用mmc1控制器,再增加一个mmc的设备节点即可:

&mmc1 {
pinctrl-names = "default";
pinctrl-0 = <&mmc1_pins_a>;
vmmc-supply = <&reg_vcc3v3>;
bus-width = <4>;
status = "okay";
};

修改完成后更新使用设备树,进入系统后:

//查看到已有两个设备与sd/mmc控制器的驱动匹配上了:
^_^ / # ls /sys/bus/platform/drivers/sunxi-mmc/
1c0f000.mmc/ 1c10000.mmc/ bind uevent unbind

sd/mmc控制器驱动好后,它会自动读取sdio设备的信息,并在系统里创建出相应的sdio设备信息:

这里可以获取到wifi芯片的厂家和设备id, wifi设备驱动里是根据这些id来作匹配的.

^_^ / # cat /sys/bus/sdio/devices/mmc2\:0001\:1/device
0xf179
^_^ / # cat /sys/bus/sdio/devices/mmc2\:0001\:1/vendor
0x024c

通过官网的说明: http://linux-sunxi.org/Wifi#RTL8189FTV
rtl8189ftv型号的wifi用的就是rtl8189ES驱动. 与型号8189fs一致.

下载驱动源码: git clone https://github.com/jwrdegoede/rtl8189ES_linux.git
git checkout -b rtl8189fs origin/rtl8189fs //下载8189fs的分支
git pull //检查更新
1
2
3
4
驱动源码下载后, 可以发现此驱动源码是可以支持很多个型号的wifi芯片.

在驱动源码os_dep/linux/sdio_intf.c文件里, 可以看到匹配用的设备id表:

47 static const struct sdio_device_id sdio_ids[] =
48 {
49 #ifdef CONFIG_RTL8723B
50 { SDIO_DEVICE(0x024c, 0xB723),.driver_data = RTL8723B},
51 #endif
52 #ifdef CONFIG_RTL8188E
53 { SDIO_DEVICE(0x024c, 0x8179),.driver_data = RTL8188E},
54 #endif //CONFIG_RTL8188E
55
56 #ifdef CONFIG_RTL8821A
57 { SDIO_DEVICE(0x024c, 0x8821),.driver_data = RTL8821},
58 #endif //CONFIG_RTL8821A
59
60 #ifdef CONFIG_RTL8192E
61 { SDIO_DEVICE(0x024c, 0x818B),.driver_data = RTL8192E},
62 #endif //CONFIG_RTL8192E
63
64 #ifdef CONFIG_RTL8703B
65 { SDIO_DEVICE(0x024c, 0xB703), .driver_data = RTL8703B},
66 #endif
67
68 #ifdef CONFIG_RTL8188F //rtl8189ftv的厂家和设备id
69 {SDIO_DEVICE(0x024c, 0xF179), .driver_data = RTL8188F},
70 #endif
....

98 static struct sdio_drv_priv sdio_drvpriv = {
99 .r871xs_drv.probe = rtw_drv_init,
100 .r871xs_drv.remove = rtw_dev_remove,
101 .r871xs_drv.name = (char*)DRV_NAME,
102 .r871xs_drv.id_table = sdio_ids,
103 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29))
104 .r871xs_drv.drv = {
105 .pm = &rtw_sdio_pm_ops,
106 }
107 #endif
108 };


具体要编译支持哪个芯片,需要修改里面的Makefile.
//只要作了git checkout … 里面会自动修改支持8189ftv/818fs的.
Makefile里的内容:

38 CONFIG_RTL8188F = y
39 ######################### Interface ###########################
40 CONFIG_USB_HCI = n
41 CONFIG_PCI_HCI = n
42 CONFIG_SDIO_HCI = y

//需要修改的内容:
114 CONFIG_PLATFORM_ARM_SUNxI = y
...
1373 ARCH := arm64

1375 CROSS_COMPILE=aarch64-linux-gnu-
...
1378 KSRC=~/fH5/NanoPi-NEO2/sources/linux/

修改完成后,执行Makefile, 最终会生成8189fs.ko。在板上系统加载此驱动模块后,会有”wlan0”网络设备.
————————————————
版权声明:本文为CSDN博主「jklinux」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/jklinux/article/details/78737691

(原文在这里)[https://stray.love/itshou-zha/wei-aria2-tian-jia-tracker-fu-wu-qi]

把下面脚本放入定时任务,然后通过rpc更新 ,简单方便快捷

1
2
3
4
5
6
7
8
9
#!/bin/sh
#more trackers list, see https://github.com/ngosang/trackerslist

tracker_url='https://raw.githubusercontent.com/ngosang/trackerslist/master/trackers_all.txt'
path='http://10.10.10.5:6800/jsonrpc'
passwd='xxxxxx'

tracker=$(echo -n $(curl -s -L $tracker_url | sed 'N;s/\n//g') | tr ' ' ',')
[ -n "$tracker" ] && curl $path -d '{"jsonrpc":"2.0","method":"aria2.changeGlobalOption","id":"cron","params":["token:'$passwd'",{"bt-tracker":"'$tracker'"}]}'

利用猫盘做一个下载机,其实也没什么东西要下载,迅雷都可以,干嘛还要做这样一台机呢? 折腾罢了. aria2下载速度远远不如迅雷的,但是还要折腾这个,还是有一点比迅雷好的地方的,就是可以利用晚上时间下载.

猫盘刷debin系统, 不表.

fireware在这里

然后apt instll aria2 nginx等组件.

airaNg 的要手动下载,apt 安装不了.

重点说配置把,aria2 最重要就是配置文件,这个网上有, 主要事要做一个service加入系统服务中
在/etc/systemd/system 下面做一个aira2.service文件

1
2
3
4
5
6
7
8
9
[Unit]
Description=Aria2 Service
After=network.target

[Service]
ExecStart=aria2c --enable-rpc=true --input-file=/root/aria2/aria2.session --conf-path=/root/aria2/aria2.conf

[Install]
WantedBy=multi-user.target

必须放入/etc/systemd/system中,不要放入user文件夹中 ,会导致退出登录后无法连接到airaNg的问题.

ariaNg 下载后/var/www/html/下面 ,不要放到其他地方,如果放到其他地方,nginx 要配置,当然如果你会配nginx,当我没说. 我比较懒,就不配了,自己放入,然后就可以访问.

curl 不单单是下载工具,还可以上传,支持众多协议.
我有一个摄像头接在ar9331 上面,跑mjpeg-stream,主要是拍照,监控淋花的情况,每天拍一张都两张照片,为什么不用现成的摄像头呢? 其实也可以,不过了,一来做来玩玩,另外一个可以把多年照片存起来,这个还是有点意思.

不说废话

在公司内网开内一个ftp服务器, 要端口映射到外网,这里面有点技巧,
ftp现在都是加密的,要不然就太不安全. 必须ssh.

内网ftp服务器vsftpd的设置

/etc/vsftpd.conf 关键地方我用中文标记

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
# Example config file /etc/vsftpd.conf
#
# The default compiled in settings are fairly paranoid. This sample file
# loosens things up a bit, to make the ftp daemon more usable.
# Please see vsftpd.conf.5 for all compiled in defaults.
#
# READ THIS: This example file is NOT an exhaustive list of vsftpd options.
# Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's
# capabilities.
#
#
# Run standalone? vsftpd can run either from an inetd or as a standalone
# daemon started from an initscript.
listen=Yes 关闭ipv6 后必须打开这个
#
# This directive enables listening on IPv6 sockets. By default, listening
# on the IPv6 "any" address (::) will accept connections from both IPv6
# and IPv4 clients. It is not necessary to listen on *both* IPv4 and IPv6
# sockets. If you want that (perhaps because you want to listen on specific
# addresses) then you must run two copies of vsftpd with two configuration
# files.
listen_ipv6=No 必须关闭ipv6 ,否则最后传不到实际外网的ip地址
#
# Allow anonymous FTP? (Disabled by default).
anonymous_enable=NO
#
# Uncomment this to allow local users to log in.
local_enable=YES
#
# Uncomment this to enable any form of FTP write command.
write_enable=YES
#
# Default umask for local users is 077. You may wish to change this to 022,
# if your users expect that (022 is used by most other ftpd's)
local_umask=022
#
# Uncomment this to allow the anonymous FTP user to upload files. This only
# has an effect if the above global write enable is activated. Also, you will
# obviously need to create a directory writable by the FTP user.
#anon_upload_enable=YES
#
# Uncomment this if you want the anonymous FTP user to be able to create
# new directories.
#anon_mkdir_write_enable=YES
#
# Activate directory messages - messages given to remote users when they
# go into a certain directory.
dirmessage_enable=YES
#
# If enabled, vsftpd will display directory listings with the time
# in your local time zone. The default is to display GMT. The
# times returned by the MDTM FTP command are also affected by this
# option.
use_localtime=YES
#
# Activate logging of uploads/downloads.
xferlog_enable=YES
#
# Make sure PORT transfer connections originate from port 20 (ftp-data).
connect_from_port_20=YES
#
# If you want, you can arrange for uploaded anonymous files to be owned by
# a different user. Note! Using "root" for uploaded files is not
# recommended!
#chown_uploads=YES
#chown_username=whoever
#
# You may override where the log file goes if you like. The default is shown
# below.
#xferlog_file=/var/log/vsftpd.log
#
# If you want, you can have your log file in standard ftpd xferlog format.
# Note that the default log file location is /var/log/xferlog in this case.
#xferlog_std_format=YES
#
# You may change the default value for timing out an idle session.
#idle_session_timeout=600
#
# You may change the default value for timing out a data connection.
#data_connection_timeout=120
#
# It is recommended that you define on your system a unique user which the
# ftp server can use as a totally isolated and unprivileged user.
#nopriv_user=ftpsecure
#
# Enable this and the server will recognise asynchronous ABOR requests. Not
# recommended for security (the code is non-trivial). Not enabling it,
# however, may confuse older FTP clients.
#async_abor_enable=YES
#
# By default the server will pretend to allow ASCII mode but in fact ignore
# the request. Turn on the below options to have the server actually do ASCII
# mangling on files when in ASCII mode.
# Beware that on some FTP servers, ASCII support allows a denial of service
# attack (DoS) via the command "SIZE /big/file" in ASCII mode. vsftpd
# predicted this attack and has always been safe, reporting the size of the
# raw file.
# ASCII mangling is a horrible feature of the protocol.
#ascii_upload_enable=YES
#ascii_download_enable=YES
#
# You may fully customise the login banner string:
#ftpd_banner=Welcome to blah FTP service.
#
# You may specify a file of disallowed anonymous e-mail addresses. Apparently
# useful for combatting certain DoS attacks.
#deny_email_enable=YES
# (default follows)
#banned_email_file=/etc/vsftpd.banned_emails
#
# You may restrict local users to their home directories. See the FAQ for
# the possible risks in this before using chroot_local_user or
# chroot_list_enable below.
#chroot_local_user=YES
#
# You may specify an explicit list of local users to chroot() to their home
# directory. If chroot_local_user is YES, then this list becomes a list of
# users to NOT chroot().
# (Warning! chroot'ing can be very dangerous. If using chroot, make sure that
# the user does not have write access to the top level directory within the
# chroot)
chroot_local_user=YES
#chroot_list_enable=YES
# (default follows)
chroot_list_file=/etc/vsftpd.chroot_list
#
# You may activate the "-R" option to the builtin ls. This is disabled by
# default to avoid remote users being able to cause excessive I/O on large
# sites. However, some broken FTP clients such as "ncftp" and "mirror" assume
# the presence of the "-R" option, so there is a strong case for enabling it.
#ls_recurse_enable=YES
#
# Customization
#
# Some of vsftpd's settings don't fit the filesystem layout by
# default.
#
# This option should be the name of a directory which is empty. Also, the
# directory should not be writable by the ftp user. This directory is used
# as a secure chroot() jail at times vsftpd does not require filesystem
# access.
secure_chroot_dir=/var/run/vsftpd/empty
#
# This string is the name of the PAM service vsftpd will use.
pam_service_name=vsftpd
#
# This option specifies the location of the RSA certificate to use for SSL
# encrypted connections.
rsa_cert_file=/etc/ssl/certs/xxxxx.pem
rsa_private_key_file=/etc/ssl/private/xxxx.key
ssl_enable=Yes
force_local_data_ssl=Yes
force_local_logins_ssl=Yes
ssl_tlsv1=Yes

#
# Uncomment this to indicate that vsftpd use a utf8 filesystem.
utf8_filesystem=YES

userlist_enable=Yes
userlist_deny=No
userlist_file=/etc/vsftpd.user_list
allow_writeable_chroot=Yes

pasv_enable=Yes
listen_port=??? //看需要
pasv_max_port=???? //看需要
pasv_min_port=???? //看需要
pasv_addr_resolve=Yes // 必须用这个 , 否则下面要填实际ip,但是动态ip怎么可能有ip , 这是pasv 模式下,回传给客户段的ip地址,
pasv_address=abc.com // 可以填域名,必须有上面那个yes

然后把端口映射一下.

然后利用curl 上传,curl 是支持加密ftp的.

1
curl -k --ftp-ssl --ftp-ssl-reqd --ftp-create-dirs -T xxx.jpg -u user:password ftp://abcd.com:1000/

-k 是忽略证书检查, 是ftp:// 不是ftps.

要提取702N 后64K的art部分 ,需要用hex editor, vscode 有一个hexdump的插件,不过不能复制截取, notepad++ 也有hexeditor的插件,不过搞来搞去都安装不成功,算了,那些事情就不说了,安装成功后,也没什么用,也非常不稳定,一下崩了.

最后还是用 HxD 这个免费的hex editor.

当然ultraEdit 也可以, 不过不免费,我也懒得用了.

PC

用时间作为文件夹和文件名

1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh

folder=$(date "+%Y%m%d")
filename=$(date "+%Y%m%d%H%M%S.jpg")
#echo $filename $folder

if test -e /mnt/sda1/$folder
then
echo "folder exits"
else
mkdir /mnt/sda1/$folder
fi

wget --o /mnt/sda1/$folder/$filename http://localhost:8080/?action=snapshot