烧系统 https://romanrm.net/a10/debian
进入系统后首先:
cp /boot/script.bin /boot/script.bak
mkdir /mnt/nanda
mount /dev/nanda /mnt/nanda
cp /mnt/nanda/script.bin /boot/
umount /dev/nanda
sync
reboot
配置时区:dpkg-reconfigure tzdata
修改源为 mirrors.tuna.tsinghua.edu.cn
apt-get update
apt-get install build-essential
安装无线驱动:
wget http://www.electrictea.co.uk/rpi/8192cu.tar.gz
tar -vxzf 8192cu.tar.gz
install -p -m 644 8192cu.ko /lib/modules/$(uname -r)/kernel/drivers/net/wireless/
echo 8192cu >> /etc/modules
reboot
depmod -a
安装hostapd(不能使用仓库里的)
wget https://github.com/jenssegers/RTL8188-hostapd/archive/v2.0-beta.tar.gz
tar -vxzf v2.0-beta.tar.gz && cd RTL8188-hostapd-2.0-beta/hostapd
make && make install
安装dhcp服务器
apt-get install udhcpd
nano /etc/udhcpd.conf
interface 修改为 wlan0
nano /etc/default/udhcpd
注释掉 DHCPD_ENABLED=“NO”
配置无线热点
nano /etc/network/interface
allow-hotplug wlan0
iface wlan0 inet static
address 192.168.1.1
netmask 255.255.255.0
nano /etc/hostapd/hostapd.conf
修改ssid为“robot+编号”
注释掉WPA部分的内容
echo 1 > /proc/sys/net/ipv4/ip_forward
nano /etc/sysctl.conf
net.ipv4.ip_forward=1
sysctl -p
nano /etc/default/hostapd
去掉注释符号并改动下面这行为配置文件路径:
DAEMON_CONF="/etc/hostapd/hostapd.conf"
update-rc.d hostapd enable
安装Python依赖并设置car.py自启动
apt-get install python3-pip
pip-3.2 install pyserial
网友评论