16篇 树莓派 related articles

开始玩树莓派 - 装CentOS

镜像地址 https://mirrors.huaweicloud.com/centos-altarch/7.7.1908/isos/armhfp/CentOS-Userland-7-armv7hl-RaspberryPI-Minimal-4-1908-sda.raw.xz

CentOS8貌似还没有树莓派的编译版本。

准备另一个32G的tf卡, 用SDCardFormater格式化,再用dd命令烧写。
diskutil umount /dev/disk3s1 别忘了这句

sudo dd bs=64m if=~/Downloads/CentOS-Userland-7-armv7hl-RaspberryPI-Minimal-4-1908-sda.raw of=/dev/disk3

连接网线开机。

在mac上用nmap扫出IP. nmap可以用brew 装
nmap -sn 192.168.1.0/24

More ~

开始玩树莓派 - 将树莓派连接的USB打印机搞成打印服务器

当初为了省钱,买了个不支持无线的有线打印机,联想的LJ2205,黑白激光。
其实mac连接后,共享也没啥问题,不过用的时候mac要开机。

树莓派上先装cups相关的服务。

sudo apt-get install cups

装完执行sudo cupsctl --remote-any 允许远程访问

USB连接打印机。这个LJ2205有linux驱动,但是解压出的pdd文件没法用。找了些资料,说是联想的打印机都是Brother代工的,驱动大同小异。索性就用Brother的驱动试。

sudo apt-cache search printer-driver*可以查找下有哪些驱动,期中有个printer-driver-brlaser

于是装了这个sudo apt-get install printer-driver-brlaser

在Add printers时使用这个**Brother HL-L2300D, using brlaser v4 **,试了下测试页可以正常打出了。

前面试过其它打出的是空白的,一些坑就不细说了。
另外在访问https://*:631时,https在chrome下报错,可以在Safari下正常访问。

以下我也试了,iPhone手机和安卓手机,mac添加没问题,除了win10没试
To enable LPR support for Windows, we need to install the inet daemon:

apt-get install openbsd-inetd
Once installed, add the following line to the end of /etc/inetd.conf:

printer stream tcp nowait lp /usr/lib/cups/daemon/cups-lpd cups-lpd -o document-format=application/octet-stream

Restart inetd with:

systemctl restart openbsd-inetd

For AirPrint support, you must install avahi-daemon:

apt-get install --no-install-recommends avahi-daemon libnss-mdns

参考:
https://jtanx.github.io/2016/12/27/making-a-fast-rpi-print-server/

More ~

开始玩树莓派 - TF卡刷系统

树莓派官网提供了个imager工具,用来烧录系统。可是我在win10和mac下装上刷完系统,开机没任何反应。

最后在哪看到要用SDCardFormater格式化,这个试了也是一样,格式化应该用mac系统带的Disk Utility就可以。

主要原因应该还是烧录系统的问题。后来用dd命令试了刷了系统可以启动。

diskutil list 先查sd卡,如disk3

diskutil umount /dev/disk3s1 再卸载挂载的

sudo dd bs=4m if=/Users/xxx/Downloads/2020-02-13-raspbian-buster.img of=/dev/disk3

status=progress mac不支持这个选项。
再往盘里写系统

More ~

开始玩树莓派-修改源

vi /etc/apt/sources.list

原有的先注释,改为阿里的。

deb http://mirrors.aliyun.com/raspbian/raspbian/ buster main non-free contrib rpi
deb-src http://mirrors.aliyun.com/raspbian/raspbian/ buster main non-free contrib rpi

More ~

Raspberry Pi 4 brings what

Screen Shot 2019-06-28 at 10.57.13.png

Raspberry Pi 4 Model B is the latest product in the popular Raspberry Pi range of computers. It offers ground-breaking increases in processor speed, multimedia performance, memory, and connectivity compared to the prior-generation Raspberry Pi 3 Model B+, while retaining backwards compatibility and similar power consumption. For the end user, Raspberry Pi 4 Model B provides desktop performance comparable to entry-level x86 PC systems.

This product's key features include a high-performance 64-bit quad-core processor, dual-display support at resolutions up to 4K via a pair of micro-HDMI ports, hardware video decode at up to 4Kp60, up to 4GB of RAM, dual-band 2.4/5.0 GHz wireless LAN, Bluetooth 5.0, Gigabit Ethernet, USB 3.0, and PoE capability (via a separate PoE HAT add-on).

简言之就是4代树莓派硬件性能提升可以媲美入门级x86 PC性能。双口的4K60帧输出、2.4/5G多频无线、蓝牙5.0、3.0USB、可选1G/2G/4G内存规格。

More ~