Pine64 使用问题汇总
使用MacOS在SD上刻录系统
df -lh
diskutil list
diskutil unmount /dev/disk2s1
dd bs=4M if=xenial-pine64-bspkernel-20161218-1.img of=/dev/disk2
diskutil unmount /dev/disk2
diskutil eject /dev/disk2
首次连接
将Pine64用网线连接到路由器上,如果没有路由器,也可以用网线连接到你的Mac上,然后在 设置->共享->互联网共享,将WIFI网络共享到以太网,并启动共享。然后在设置->网络中查看以太网地址,如果已分配,说明Pine64和Mac已连接上,但是这个IP并不是Pine64的IP,可以使用命令arp -a
来查看联网设备的IP地址。
耳机无声音
使用root用户执行以下命令:
apt-get update
apt-get install alsa-base alsa-utils pulseaudio mplayer
cat <<EOF >/etc/modules-load.d/pine64-audiojack.conf
sunxi_codec
sunxi_i2s
sunxi_sndcodec
EOF
wget https://raw.githubusercontent.com/longsleep/build-pine64-image/master/blobs/asound.state -O /var/lib/alsa/asound.state
usermod -a -G audio ubuntu
reboot
重启后使用命令alsamixer
调整音量,使用aplay -l
来查看设备(https://blog.csdn.net/davidzwb/article/details/51516783)。
使用mplayer播放时指定设备
mplayer -ao alsa:device=hw=1.0 some_audio_or_vide_file.mp4
参考:https://forum.pine64.org/showthread.php?tid=1228&highlight=alsa
开启蓝牙
首先,安装必要的软件
sudo apt-get install build-essential bluetooth bluez blueman
安装驱动
git clone https://github.com/lwfinger/rtl8723bs_bt.git
cd rtl8723bs_bt
make && sudo make install
启动蓝牙
./rtk_hciattach -n -s 115200 /dev/ttyS1 rtk_h5 > /tmp/hciattach.txt 2>&1 &
/bin/sleep 5
/usr/sbin/rfkill unblock 3
/usr/bin/bluetoothctl
pairable on
power on
quit
查看设备
rfkill list
rfkill unblock all
结果如下
0: sunxi-bt: Bluetooth
Soft blocked: no
Hard blocked: no
1: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no
2: phy1: Wireless LAN
Soft blocked: no
Hard blocked: no
3: hci0: Bluetooth
Soft blocked: no
Hard blocked: no
启动并查看蓝牙:
hciconfig hci0 up
hcitool dev
要使用蓝牙作为音频,先启动pulseaudio
pulseaudio -k
pulseaudio --start
重启蓝牙服务
systemctl restart bluetooth
蓝牙控制命令
bluetoothctl
list
power on
scan on
agent on
pair 10:48:B1:E5:2F:1C
trust 10:48:B1:E5:2F:1C
connect 10:48:B1:E5:2F:1C
如果connect无法连接,也可以尝试使用
rfcomm bind hci0 10:48:B1:E5:2F:1C
hcitool cc 10:48:B1:E5:2F:1C
配置默认音频输出设备
pacmd list-sinks
单声音配置
pacmd set-default-sink 1
参考
https://blog.csdn.net/pengrui18/article/details/53747562
https://forum.pine64.org/showthread.php?tid=2248
安装python3.7
apt-get install zlibc zlib1g-dev libffi-dev libcurl4-openssl-dev libssl-dev openssl openssl-dev sqlite3 libsqlite3-dev -y
wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tgz
tar xf Python-3.7.0.tgz && cd Python3.7.0
./configure --enable-optimizations --with-ensurepip=install --enable-shared --disable-ipv6 && make -j4 && make install