这是本文档旧的修订版!


deyaio-manifest的rtsp分支,用rtsp.xml,使用meta-custom的rtsp分支

使用固件20250303

这个版本已经集成了udhcpd的相关服务,包括mjpg-streamer和rtsp服务器等软件,并且用sthttpd替代busybox的,以实现更多web功能的支持。

启动后,有可能需要systemctl restart udhcpd,后续固件更新相关的服务配置,就不需要。 要开启AP,直接ifup wlan1。 另外注意,当前的cypress固件回载出错,不过其应该使用默认的固件,也是可以用来简单测试的,如果要提升性能,可能需要更新无线的固件。

卡刷这个版本固件, 上电后按任意键停在uboot下

setenv dey-image-qt
run install_linux_fw_sd

测试步骤: 1、修改本地显示输出,默认是HDMI接口,如果要改为本地的lvds,开机后按任意键停在uboot下,执行

setenv overlays _ov_board_g101evn010-lvds_ccmp25-dvk.dtbo
saveenv
reset

1、自定义wifi密码:

nano /etc/hostapd_wlan1.conf 

按需更改热点名称密码,然后重启,比如名称改为ap-ccmp25,密码改为digidigi 重启,或是得新启动hostapd@wland

2、 启动后,由于移除busybox-httpd,改用sthttpd,所以报错busybox-httpd服务无法启动,未来需要把服务改成sthttpd

检查:下面这些可能要手动关闭或从服务中移除

 986 root     34388 S    /usr/bin/cccsd -d
 997 root      3848 S    {cccs-gs-demo} /bin/sh /etc/cccs-gs-demo start
 1004 root      9360 S    /usr/bin/cccs-gs-demo

检查wifi的功能:

iw reg get
没设置时,创建nano /etc/systemd/system/set-regdomain.service
另外,wlan1是用来设置ap的,创建
nano /etc/udhcpd.conf

interface       wlan1
start           192.168.46.100
end             192.168.46.200
max_leases      10
opt router      192.168.46.30
opt lease       86400

nano /etc/systemd/system/udhcpd.service

[Unit]
Description=DHCP Server
After=network-online.target hostapd@wlan1.service
Wants=network-online.target

[Service]
ExecStart=/usr/sbin/udhcpd -f /etc/udhcpd.conf
Restart=on-failure
RestartSec=5s
StartLimitInterval=0

[Install]
WantedBy=multi-user.target


修改/etc/network/interfaces

auto wlan1
iface wlan1 inet static
        address 192.168.46.30
        netmask 255.255.255.0
        pre-up [ -d /proc/device-tree/wireless ]
        post-up systemctl start hostapd@wlan1.service
        post-up udhcpd /etc/udhcpd.conf
        pre-down systemctl stop hostapd@wlan1.service
        pre-down pkill udhcpd

固件加载错误时,查日志,改名

cp cyfmac55500-sdio.trxse cypress/cyfmac55500-sdio.digi,ccmp25-dvk.trxse

* 1、使用deyaio编译带有rtsp服务器支持的镜像,或是直接下载预编译的镜像,刷到开发板或设备中

要自己编译,可以在conf/local.conf中加入这些:

# 启用 gst-plugins-ugly 的 x264 支持
PACKAGECONFIG:append:pn-gstreamer1.0-plugins-ugly = " x264"

# 接受 GPL 许可证(如果需要)
LICENSE_FLAGS_ACCEPTED = "commercial_gpl"

# 在 local.conf 中添加
GLIBC_GENERATE_LOCALES = "zh_CN.UTF-8 en_GB.UTF-8 en_US.UTF-8"
IMAGE_LINGUAS = "zh-cn"
LOCALE_UTF8_ONLY="1"

IMAGE_INSTALL:append = " gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-rtsp-server ffmpeggstreamer1.0-libav gstreamer1.0-omx gstreamer1.0-plugins-base-apps x264 libjpeg-turbo libpng zlib nano tmux localedef glibc-utils v4l-utils"
IMAGE_INSTALL:remove = " cccs connectcore-demo-example"

nxp用了一个IMAGE_INSTALL:append = “ gst-variable-rtsp-server” ,原来的gstreamer1.0-rtsp-server不会被编译

2、连上并上电 若要支持10寸lvds屏,一并连接好,设置一下overlays,也可用默认hdmi显示屏或不接屏

连接摄像头,console线,上电进入linux

3、测试摄像头

先用v4l2-ctl –list-devices 列出所有,其中前两个是vpu和相关通道,最后一个是摄像头节点。

在显示屏上查看摄像头的视频,可以用

gst-launch-1.0 v4l2src device=/dev/video2 ! autovideoconvert ! autovideosink

查看摄像头支持的格式,用

v4l2-ctl --list-formats-ext -d /dev/video2

查看摄像头的默认输出格式,用

v4l2-ctl -d /dev/video2 --get-fmt-video

设置摄像头的格式,可以用下面命令,注意你要设置硬件所支持的范围

v4l2-ctl -d /dev/video2 --set-fmt-video=width=640,height=480,pixelformat=YUYV

手动测试:

pkill hostapd
pkill udhcpd
ip link set wlan1 down
ip link set wlan1 up

hostapd -B /etc/hostapd_wlan1.conf
udhcpd -f -v /etc/udhcpd.conf