wfb-ng Release 23.01镜像无头烧录&配置(1)

92 篇文章 42 订阅

@[TOC](wfb-ng Release 23.01镜像无头烧录&配置(1))

最近打算搭一个数字图传系统,并进行一些简单测试,在刚开始烧录阶段就遇到各种问题。

当然,主要的问题就是不熟悉,经过几天的摸索和学习,记录下一路遇到的问题,将问题圆满的解决将会是产品化的细化内容。

1. 源由

基于开源树莓派硬件和wfb-ng开源软件,搭建一套数字图传系统,进行简单视频测试。

2. 需求

从源由的角度,我们这里如下技术需求:

  1. 硬件配置:树莓派 + 摄像头 – 笔记本电脑
  2. 软件配置:raspivid + wfb-ng + gstreamer1.0

3. 分析

鉴于wfb-ng目前已经提供镜像文件,因此安装将会非常方便,直接采用:

4. 步骤

4.1 镜像安装&USB登录

请参考Raspbian镜像无头烧录,将固件Release 23.01刷写到tf卡

注:无需配置无线2.4G WiFi登录,将在后续优化配置时进行调整。

4.2 配置RNDIS-ethernet bridge更新镜像

在这里插入图片描述
更新apt库

pi@raspberrypi:~ $ sudo apt-get update
Get:1 http://archive.raspberrypi.org/debian bullseye InRelease [23.6 kB]
Get:2 http://raspbian.raspberrypi.org/raspbian bullseye InRelease [15.0 kB]
Get:3 http://raspbian.raspberrypi.org/raspbian bullseye/main armhf Packages [13.                                                                                       2 MB]
Get:4 http://archive.raspberrypi.org/debian bullseye/main armhf Packages [315 kB                                                                              ]
Get:5 http://archive.raspberrypi.org/debian bullseye/main armhf Contents (deb) [1,314 kB]
Get:6 http://raspbian.raspberrypi.org/raspbian bullseye/main armhf Contents (deb) [41.3 MB]
Fetched 56.2 MB in 2min 13s (421 kB/s)
Reading package lists... Done

更新系统

pi@raspberrypi:~ $ sudo apt-get upgrade

如果更新存在问题,请使用下面命令

pi@raspberrypi:~ $ sudo apt-get upgrade --fix-broken
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Correcting dependencies... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
  eject exfatprogs gdisk libatasmart4 libblockdev-crypto2 libblockdev-fs2 libblockdev-loop2 libblockdev-part-err2 libblockdev-part2 libblockdev-swap2
  libblockdev-utils2 libblockdev2 libgpgme11 libnl-route-3-200 libparted-fs-resize0 libpcsclite1 libudisks2-0 libvolume-key1
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  wpasupplicant
The following packages have been kept back:
  raspinfo
The following packages will be upgraded:
  base-files bind9-host bind9-libs bluez-firmware curl distro-info-data git git-man gtk-update-icon-cache libavcodec-dev libavcodec58 libavformat-dev libavformat58
  libavutil-dev libavutil56 libbluray2 libcamera-apps-lite libcamera0 libcurl3-gnutls libcurl4 libde265-0 libegl-mesa0 libgbm1 libgl1-mesa-dri libglapi-mesa
  libglx-mesa0 libgnutls30 libgtk-3-0 libgtk-3-bin libgtk-3-common libksba8 liblept5 libnftables1 libnss3 libopenexr-dev libopenexr25 libpq5 libraspberrypi-bin
  libraspberrypi-dev libraspberrypi-doc libraspberrypi0 libssl1.1 libswresample-dev libswresample3 libswscale-dev libswscale5 libtasn1-6 libtiff-dev libtiff5
  libtiffxx5 linux-libc-dev mesa-va-drivers mesa-vdpau-drivers mesa-vulkan-drivers nano nftables openssl raspberrypi-bootloader raspberrypi-kernel
  raspberrypi-kernel-headers raspi-config rpi-eeprom sudo tzdata vcdbg
65 upgraded, 0 newly installed, 1 to remove and 1 not upgraded.
1 not fully installed or removed.
Need to get 200 MB of archives.
After this operation, 2,336 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://archive.raspberrypi.org/debian bullseye/main armhf libssl1.1 armhf 1.1.1n-0+deb11u4+rpt1 [1,293 kB]
Get:2 http://raspbian.raspberrypi.org/raspbian bullseye/main armhf base-files armhf 11.1+rpi1+deb11u6 [70.4 kB]
Get:3 http://raspbian.raspberrypi.org/raspbian bullseye/main armhf nftables armhf 0.9.8-3.1+deb11u1 [68.0 kB]
Get:5 http://archive.raspberrypi.org/debian bullseye/main armhf bluez-firmware all 1.2-4+rpt10 [200 kB]
Get:6 http://archive.raspberrypi.org/debian bullseye/main armhf gtk-update-icon-cache armhf 3.24.24-4+rpt12+deb11u2 [87.7 kB]
Get:7 http://archive.raspberrypi.org/debian bullseye/main armhf libavformat-dev armhf 7:4.3.5-0+deb11u1+rpt3 [1,817 kB]
Get:10 http://archive.raspberrypi.org/debian bullseye/main armhf libavcodec-dev armhf 7:4.3.5-0+deb11u1+rpt3 [10.3 MB]
Get:16 http://archive.raspberrypi.org/debian bullseye/main armhf libavformat58 armhf 7:4.3.5-0+deb11u1+rpt3 [1,570 kB]
Get:14 http://raspbian.raspberrypi.org/raspbian bullseye/main armhf bind9-libs armhf 1:9.16.37-1~deb11u1 [1,271 kB]
Get:19 http://archive.raspberrypi.org/debian bullseye/main armhf libavcodec58 armhf 7:4.3.5-0+deb11u1+rpt3 [9,133 kB]
Get:4 http://raspbian.raspberrypi.org/raspbian bullseye/main armhf libnftables1 armhf 0.9.8-3.1+deb11u1 [227 kB]
Get:8 http://raspbian.raspberrypi.org/raspbian bullseye/main armhf libtasn1-6 armhf 4.16.0-2+deb11u1 [50.0 kB]
Get:9 http://raspbian.raspberrypi.org/raspbian bullseye/main armhf libgnutls30 armhf 3.7.1-5+deb11u3 [1,269 kB]
Get:11 http://raspbian.raspberrypi.org/raspbian bullseye/main armhf libksba8 armhf 1.5.0-3+deb11u2 [104 kB]
Get:15 http://raspbian.raspberrypi.org/raspbian bullseye/main armhf bind9-host armhf 1:9.16.37-1~deb11u1 [307 kB]
Get:12 http://raspbian.raspberrypi.org/raspbian bullseye/main armhf tzdata all 2021a-1+deb11u8 [284 kB]
Get:13 http://raspbian.raspberrypi.org/raspbian bullseye/main armhf nano armhf 5.4-2+deb11u2 [625 kB]
Get:17 http://raspbian.raspberrypi.org/raspbian bullseye/main armhf curl armhf 7.74.0-1.3+deb11u7 [258 kB]
Get:18 http://raspbian.raspberrypi.org/raspbian bullseye/main armhf libcurl4 armhf 7.74.0-1.3+deb11u7 [310 kB]
Get:20 http://raspbian.raspberrypi.org/raspbian bullseye/main armhf distro-info-data all 0.51+deb11u3 [7,812 B]
Get:21 http://raspbian.raspberrypi.org/raspbian bullseye/main armhf git-man all 1:2.30.2-1+deb11u2 [1,828 kB]
Get:27 http://archive.raspberrypi.org/debian bullseye/main armhf libswresample-dev armhf 7:4.3.5-0+deb11u1+rpt3 [131 kB]
Get:28 http://archive.raspberrypi.org/debian bullseye/main armhf libswresample3 armhf 7:4.3.5-0+deb11u1+rpt3 [121 kB]
Get:30 http://archive.raspberrypi.org/debian bullseye/main armhf libswscale-dev armhf 7:4.3.5-0+deb11u1+rpt3 [278 kB]
Get:31 http://archive.raspberrypi.org/debian bullseye/main armhf libavutil-dev armhf 7:4.3.5-0+deb11u1+rpt3 [604 kB]
Get:32 http://archive.raspberrypi.org/debian bullseye/main armhf libswscale5 armhf 7:4.3.5-0+deb11u1+rpt3 [261 kB]
Get:33 http://archive.raspberrypi.org/debian bullseye/main armhf libavutil56 armhf 7:4.3.5-0+deb11u1+rpt3 [464 kB]
Get:34 http://archive.raspberrypi.org/debian bullseye/main armhf libraspberrypi-bin armhf 1:2+git20220616~133208+6e8f786-1 [147 kB]
Get:35 http://archive.raspberrypi.org/debian bullseye/main armhf libraspberrypi-dev armhf 1:2+git20220616~133208+6e8f786-1 [177 kB]
Get:36 http://archive.raspberrypi.org/debian bullseye/main armhf raspberrypi-kernel armhf 1:1.20230106-1 [99.1 MB]
Get:22 http://raspbian.raspberrypi.org/raspbian bullseye/main armhf libcurl3-gnutls armhf 7.74.0-1.3+deb11u7 [306 kB]
Get:23 http://raspbian.raspberrypi.org/raspbian bullseye/main armhf git armhf
... bla bla... bla ... bla. ...
Removing 'diversion of /boot/start4cd.elf to /usr/share/rpikernelhack/start4cd.elf by rpikernelhack'
Removing 'diversion of /boot/start4db.elf to /usr/share/rpikernelhack/start4db.elf by rpikernelhack'
Removing 'diversion of /boot/start4x.elf to /usr/share/rpikernelhack/start4x.elf by rpikernelhack'
Removing 'diversion of /boot/fixup4.dat to /usr/share/rpikernelhack/fixup4.dat by rpikernelhack'
Removing 'diversion of /boot/fixup4cd.dat to /usr/share/rpikernelhack/fixup4cd.dat by rpikernelhack'
Removing 'diversion of /boot/fixup4db.dat to /usr/share/rpikernelhack/fixup4db.dat by rpikernelhack'
Removing 'diversion of /boot/fixup4x.dat to /usr/share/rpikernelhack/fixup4x.dat by rpikernelhack'
Removing 'diversion of /boot/LICENCE.broadcom to /usr/share/rpikernelhack/LICENCE.broadcom by rpikernelhack'
Setting up libglapi-mesa:armhf (20.3.5-1+rpt5+rpi1) ...
Setting up libraspberrypi0:armhf (1:2+git20220616~133208+6e8f786-1) ...
Setting up nano (5.4-2+deb11u2) ...
Setting up libcurl4:armhf (7.74.0-1.3+deb11u7) ...
Setting up git-man (1:2.30.2-1+deb11u2) ...
Setting up libswscale5:armhf (7:4.3.5-0+deb11u1+rpt3) ...
Setting up libtiff5:armhf (4.2.0-1+deb11u4) ...
Setting up curl (7.74.0-1.3+deb11u7) ...
Setting up mesa-va-drivers:armhf (20.3.5-1+rpt5+rpi1) ...
Setting up libcamera0:armhf (0~git20230302+923f5d70-1) ...
Setting up libbluray2:armhf (1:1.2.1-4+deb11u2) ...
Setting up libde265-0:armhf (1.0.11-0+deb11u1+rpi1) ...
Setting up bind9-host (1:9.16.37-1~deb11u1) ...
Setting up openssl (1.1.1n-0+deb11u4+rpt1) ...
Setting up raspi-config (20230214) ...
Installing new version of config file /etc/init.d/raspi-config ...
Setting up libgtk-3-common (3.24.24-4+rpt12+deb11u2) ...
Setting up libtiffxx5:armhf (4.2.0-1+deb11u4) ...
Setting up vcdbg (1:1.20230106-1) ...
Setting up libavutil-dev:armhf (7:4.3.5-0+deb11u1+rpt3) ...
Setting up libgl1-mesa-dri:armhf (20.3.5-1+rpt5+rpi1) ...
Setting up libswresample3:armhf (7:4.3.5-0+deb11u1+rpt3) ...
Setting up libraspberrypi-bin (1:2+git20220616~133208+6e8f786-1) ...
Setting up liblept5:armhf (1.79.0-1.1+deb11u1) ...
Setting up libegl-mesa0:armhf (20.3.5-1+rpt5+rpi1) ...
Setting up libtiff-dev:armhf (4.2.0-1+deb11u4) ...
Setting up libswscale-dev:armhf (7:4.3.5-0+deb11u1+rpt3) ...
Setting up git (1:2.30.2-1+deb11u2) ...
Setting up libraspberrypi-dev (1:2+git20220616~133208+6e8f786-1) ...
Setting up libcamera-apps-lite (0~git20230301+54a781d-1) ...
Setting up rpi-eeprom (16.0-1) ...
Setting up libavcodec58:armhf (7:4.3.5-0+deb11u1+rpt3) ...
Setting up libglx-mesa0:armhf (20.3.5-1+rpt5+rpi1) ...
Setting up libswresample-dev:armhf (7:4.3.5-0+deb11u1+rpt3) ...
Setting up libavformat58:armhf (7:4.3.5-0+deb11u1+rpt3) ...
Setting up libavcodec-dev:armhf (7:4.3.5-0+deb11u1+rpt3) ...
Setting up libavformat-dev:armhf (7:4.3.5-0+deb11u1+rpt3) ...
Setting up libraspberrypi-doc (1:2+git20220616~133208+6e8f786-1) ...
Processing triggers for man-db (2.9.4-2) ...
Processing triggers for dbus (1.12.24-0+deb11u1) ...
Processing triggers for install-info (6.7.0.dfsg.2-6) ...
Processing triggers for libglib2.0-0:armhf (2.66.8-1) ...
Setting up libgtk-3-0:armhf (3.24.24-4+rpt12+deb11u2) ...
Processing triggers for libc-bin (2.31-13+rpt2+rpi1+deb11u5) ...
Setting up libgtk-3-bin (3.24.24-4+rpt12+deb11u2) ...

4.3 安装wpasupplicant

pi@raspberrypi:~ $ sudo apt-get install wpasupplicant
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  eject exfatprogs gdisk libatasmart4 libblockdev-crypto2 libblockdev-fs2 libblockdev-loop2 libblockdev-part-err2 libblockdev-part2 libblockdev-swap2
  libblockdev-utils2 libblockdev2 libgpgme11 libparted-fs-resize0 libudisks2-0 libvolume-key1
Use 'sudo apt autoremove' to remove them.
Suggested packages:
  wpagui libengine-pkcs11-openssl
The following NEW packages will be installed:
  wpasupplicant
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 1,027 kB of archives.
After this operation, 2,828 kB of additional disk space will be used.
Get:1 http://mirrors.zju.edu.cn/raspbian/raspbian bullseye/main armhf wpasupplicant armhf 2:2.9.0-21 [1,027 kB]
Fetched 1,027 kB in 3s (358 kB/s)
Selecting previously unselected package wpasupplicant.
(Reading database ... 121066 files and directories currently installed.)
Preparing to unpack .../wpasupplicant_2%3a2.9.0-21_armhf.deb ...
Unpacking wpasupplicant (2:2.9.0-21) ...
Setting up wpasupplicant (2:2.9.0-21) ...
wpa_supplicant.service is a disabled or a static unit not running, not starting it.
Processing triggers for man-db (2.9.4-2) ...
Processing triggers for dbus (1.12.24-0+deb11u1) ...

4.4 优化WiFi配置

将Raspberry Pi Zero W默认wifi网卡去掉屏蔽

pi@raspberrypi:~ $ sudo nano /etc/modprobe.d/blacklist-rtl8xxxu.conf
pi@raspberrypi:~ $ cat /etc/modprobe.d/blacklist-rtl8xxxu.conf
#blacklist brcmfmac
blacklist rtl8xxxu

配置wpa无线路由账号密码

pi@raspberrypi:~ $ sudo nano /etc/wpa_supplicant/wpa_supplicant-wlan0.conf
pi@raspberrypi:~ $ cat /etc/wpa_supplicant/wpa_supplicant-wlan0.conf
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=CN

network={
    ssid="your-network-ssid"
    psk="your-network-password"
}

修改**【Raspberry Pi 3b+】**网络接口定义

pi@raspberrypi:~ $ sudo nano /etc/network/interfaces
pi@raspberrypi:~ $ cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
# Include files from /etc/network/interfaces.d:
source /etc/network/interfaces.d/*

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

auto wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant-wlan0.conf
iface default inet dhcp

修改**【Raspberry Pi Zero W】**网络接口定义

pi@raspberrypi:~ $ sudo nano /etc/network/interfaces
pi@raspberrypi:~ $ cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
# Include files from /etc/network/interfaces.d:
source /etc/network/interfaces.d/*

auto lo
iface lo inet loopback

auto wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant-wlan0.conf
iface default inet dhcp

然后重启树莓派

pi@raspberrypi:~ $ sudo reboot

4.5 调整wfb-ng天空端配置

  1. 配置key
  2. 调整频段
  3. 配置参数
  4. 锁定WiFi接口

注:详见Setup-HOWTO

5. 补充资料 修改hostname

WiFi本地网络内部存在两个相同hostname的设备,会出现一些异常问题。鉴于天空端和地面端都采用了同一个镜像,所以配置时需要做下区分。

5.1 raspi-config弹出对话框

pi@raspberrypi:~ $ sudo raspi-config

在这里插入图片描述

5.2 选择Hostname

在这里插入图片描述

5.3 Hostname命名规则

在这里插入图片描述

5.4 命名地面端和天空端

在这里插入图片描述在这里插入图片描述

5.5 配置完成重启

在这里插入图片描述在这里插入图片描述

6. 补充资料 天空端完整步骤整理

本文主要介绍了如何天空端入门步骤,比如:ssh/wifi。wfb_ng的配置未进行详细的描述,这部分内容将在wfb-ng Release 23.01镜像无头烧录&配置(2)介绍,其中也会涉及绑定WiFi图传硬件的方法。

7. 参考资料

【1】Raspbian镜像无头烧录
【2】7 Ways to Disable Wi-Fi on Raspberry P (Lite/Desktop)
【3】How to automatically connect to Wifi on boot for Pi2?
【4】which path do you use for connecting Raspberry pi zero w? #285
【5】How to Setup Bridge Connections on Windows 10
【6】Changing the hostname of your Raspberry Pi using the terminal
【7】wfb-ng 锁定WiFi接口
【8】wfb-ng Release 23.01镜像无头烧录&配置(2)

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值