Skip to content

OpenXPlay Relay for Linux 0.1.6

Choose a tag to compare

@github-actions github-actions released this 01 Nov 10:59
· 83 commits to main since this release
linux-v0.1.6
40af815

Linux relay: the first release since 0.1.3, with the Android app's phone-first admin page, CarPlay that fits the head-unit browser, Carlink on a second Wi-Fi adapter, Trusted HTTPS and installation with OpenXPlay Flasher. · Linux 中继:0.1.3 之后的第一个正式版,带来与 Android 应用一致、以手机为主的管理页,贴合车机浏览器的 CarPlay 画面,用第二块 Wi-Fi 网卡运行的 Carlink,可信 HTTPS,并可用 OpenXPlay Flasher 安装。

New

  • The admin page has the Android app's phone-first design, in light and dark. Home shows the connection as one path, iPhone → this relay → car, with the progress of each part, and each step opens its details, fix, code and time. A setup guide marks what blocks Next right at the field, and buttons turn on Bluetooth and Wi-Fi. Settings follow the Android app's menus and include its settings, such as the Carlink name, auto-reconnect, the head-unit page port and Clear saved screen.
  • After you sign in with the default password, the admin page asks you to set your own (you can skip). Admin access from the network can be turned off, and the admin password reset.
  • iPhone pairing on the admin page names the relay as the iPhone lists it, OpenXPlay Linux. Paired devices on Home and in Settings → iPhone connection can be removed (a session using one stops first); then forget OpenXPlay Linux in the iPhone's Bluetooth settings and open pairing again.
  • Wired CarPlay: Settings → iPhone connection → USB cable drives an iPhone plugged into a USB-A port on the relay, with a USB-A to Lightning or USB-A to USB-C cable; the head unit still reaches the relay over Wi-Fi. Wireless stays the default.
  • CarPlay view areas, on by default: when the head-unit browser enters or leaves full screen, CarPlay re-lays out to fit without reconnecting and without black bars. The last head unit is remembered, so CarPlay fits even when it starts before the page opens.
  • CarPlay picture, on the admin page and the head-unit page: Resolution (Automatic, Native, 1080p, 720p, Whole screen), CarPlay screen width (125, 200, 250 or 300 mm, default 200), Video codec (Automatic, H.265, H.264; it replaces the page's own "H.264 only" option) and Frame rate (Auto or 30–60 fps), plus video statistics over 5 or 15 seconds. Changes on the admin page apply at the next connection, with Reconnect while CarPlay runs.
  • Head-unit page: after the browser leaves full screen, for example for the reverse camera, one tap returns to full screen without reaching CarPlay. The OpenXPlay icon in CarPlay opens the page's settings. The page shows the startup stage and its versions, keeps reconnecting after ordinary disconnects and reloads itself once after the relay is updated.
  • Car and screen: choose the car by brand, model and year from the Android app's catalog (with ZEEKR), with screens saved per car.
  • Audio → CarPlay audio over the car's Bluetooth (experimental), on by default: the relay offers the iPhone no CarPlay audio, so music, navigation and calls play over the iPhone's own Bluetooth connection with the car. Keep the iPhone paired with the car and choose Bluetooth as the car's audio source; if the sound plays on the iPhone instead, turn it off.
  • Interfaces and network roles: the relay lists every Ethernet and Wi-Fi interface with what it can do and decides which one carries the iPhone, the head-unit browser and Carlink. Automatic is the default; you can also choose each role, with checks for combinations a radio cannot run. The hotspot band and channel follow the Wi-Fi hardware, with Wi-Fi country and Hotspot security settings (WPA2 by default, WPA3 where the hardware supports it, or open).
  • Carlink runs on a second Wi-Fi adapter, so the CarPlay hotspot stays up while it joins the car. Carlink remembers how each car hands off, keeps scanning until the car appears, follows a car whose Bluetooth address changes and passes the steering-wheel media keys to the iPhone. It uses H.265 when the car asks for it and the iPhone sends it, and adds picture sizes, approval before a car replaces its pairing, Vehicle information (off by default), Wi-Fi Direct where the car and the adapter support it, and protocol traces in developer options.
  • Admin hotspot (off by default) on a second Wi-Fi adapter: an always-on hotspot for the admin page at https://10.79.0.1:6975, paused while Carlink uses that adapter.
  • Trusted HTTPS (off by default): the relay publishes its head-unit address under a DuckDNS or dynv6 name with a Let's Encrypt certificate, so the head-unit browser opens the page without a certificate warning. Each provider keeps its own setup, a configuration file can be imported, and the page still opens by IP address.
  • Tesla browser (off by default, listed for Tesla cars): the relay adds an address the Tesla browser can open to its own hotspot, in the Android app's modes (TeslaMirror-style recommended), and removes it on Stop. It needs the browser output and this relay's hotspot; the trusted-name modes need Trusted HTTPS.
  • Logs, Configuration files and Check for updates, as on Android: export redacted logs as a ZIP to save, or upload them to logs.openxplay.org for a log ID and QR code; export and import user and privacy configurations in the Android app's format; Check for updates looks on GitHub for a newer Linux release, Stable or Beta, only when you tap it. The logs say what the relay is waiting for, why a start was refused and how the previous run ended.
  • Identity and certificates: import or remove the Apple accessory identity (files or a ZIP), use a remote MFi server or an authentication chip over I2C or a CH341 adapter, and install your own certificate for the head-unit page opened by IP address. Certificate changes, including Trusted HTTPS renewals, take effect without disconnecting the page.
  • Options that need hardware stay hidden or disabled without it: with a V4L2 video encoder, Carlink H.265 alongside the browser, the corrected 1280×720 picture and H.265 conversion for browsers; with an ALSA sound card, CarPlay audio and the microphone on the relay (off by default; playback needs ffmpeg, the microphone arecord).
  • Experimental, all on by default: the Android relay's switches (screen session handling, playback confirmation, startup status and diagnostics, sending this relay's Bluetooth address to the car); three for iPhones, for example on iOS 16, that connect but never show a picture (open the iAP2 Wi-Fi channel only when the iPhone offers it, release Bluetooth when the iPhone asks, wait for the iPhone to reconnect); and Watch for stalls, which logs pauses and blocked threads. If connections get worse, turn off Use experimental options.
  • Each release includes the relay's Debian package and install manifest, which OpenXPlay Flasher uses to install and update the relay. The package and install.sh also install generic host tuning: Wi-Fi power save off, no MAC randomisation while scanning, and a clock guard that removes TLS state dated in the future once the clock is synchronised.
  • For other hosts: a host profile, /etc/openxplay/host.json (or --host-profile), holds what differs between hosts, such as the model, Wi-Fi interface, hotspot channel and Bluetooth adapter; Diagnostics shows what the host's Wi-Fi and Bluetooth can do.

Changes

  • With one Wi-Fi radio, as on the UFI003, the relay offers only the browser output; Carlink, alone or with the browser, needs a second Wi-Fi adapter. The setup guide and Settings say so, a saved Carlink output then shows a Home item that switches to the browser, and Carlink comes back without a restart once a second adapter appears.
  • The admin page has a name per network: openxplay-car.local on the iPhone's network (this relay's CarPlay hotspot, or the car's hotspot) and openxplay-admin.local on the others, such as Ethernet or the admin hotspot; openxplay-linux.local still works. Plain http:// on the admin port redirects to https://, so an address typed without https:// still opens the page.
  • The CarPlay hotspot and the admin hotspot use the password openxplay unless you set your own, so a phone can join and open the admin page; change it there. A hotspot password generated by an earlier version changes to openxplay when you update and the hotspot name stays, so a head unit that joined with the old password needs the new one once. Hotspot passwords are no longer passed on the command line.
  • The CarPlay hotspot stays up as long as the relay runs, also after a failed start or Stop, so the admin page stays reachable in the car. Stop holds until the device restarts; Connect resumes.
  • Connect automatically starts once everything is ready, after a five-second countdown that Not now cancels. Start on device boot is a separate setting (off on new installs; updates keep the earlier choice for both).
  • After reaching the iPhone, a failing start retries five times, then stops with a report and tries once more when Bluetooth, Wi-Fi, Carlink or the iPhone comes back; with no iPhone in range the relay keeps waiting. With Carlink as the only output, CarPlay waits for the car's Carlink however late it starts; with both outputs, the browser starts after 60 seconds and Carlink joins when the car is ready. When no screen size is known yet, CarPlay waits up to 20 seconds for one; Start now skips the waits.
  • A new AirPlay control session keeps the screen while the old one closes, and a screen rebuilt within the same session keeps the head-unit page session and sound. With Video codec on Automatic, two disconnects within 30 seconds of H.265 starting switch the head-unit page to H.264.
  • Carlink uses the same identity in the Bluetooth handoff and in the session, as on Android, so after updating the car asks for the Carlink code once. Reconnecting or resizing restarts only Carlink; the head-unit page keeps running.
  • The relay reports its real version (0.1.3 reported 0.1.2). With two Bluetooth adapters it uses the configured one, or else the lowest hciN. A missing Wi-Fi interface no longer stops it: the admin page stays reachable, for example over Ethernet, and CarPlay starts once the interface appears.
  • Relay updates wait up to three minutes while the package database is busy, and a failed update says why. From this version on, settings saved by a newer relay no longer stop an older one from starting.

Notes

  • This is the first Linux release since 0.1.3 and includes everything in the Linux 0.1.5 and 0.1.6 betas. New since 0.1.6-beta.3: wired CarPlay, the one- and two-radio rule, the per-network names and the HTTPS redirect, a CarPlay hotspot that stays up, removing paired devices, the iOS 16 options and Watch for stalls, and a more accurate admin page.
  • On GitHub, the release marked Latest is always the Android app; Linux releases have tags starting with linux-v.
  • Refresh the head-unit page once after updating from 0.1.3; later updates reload it automatically.
  • Going back to 0.1.3: 0.1.3 does not start with the settings this version writes. First put back a copy of /var/lib/openxplay/settings.json from before the update, or delete it.
  • Tested on a Phicomm N1 without an iPhone or a car: the relay stays up and waits for the iPhone; it adds and removes the Tesla address; the admin hotspot, openxplay-admin.local and the redirect to HTTPS work; the CarPlay hotspot stays up after a failed start and after Stop; when the second Wi-Fi adapter disappears only the browser is offered, and Carlink returns when it comes back; a paired Bluetooth test device can be removed. Before the 0.1.5 betas, a test build ran CarPlay from an iPhone through a UFI003 to a phone browser standing in for the head unit, with view areas, the picture settings and the full-screen tap.
  • Not yet tested on a device: CarPlay with an iPhone on this version, wired CarPlay, pairing an iPhone again after removing it, openxplay-car.local from an iPhone, Carlink with a car (including the one-time code request), the iOS 16 options, CarPlay audio over the car's Bluetooth, a Tesla, WPA3, Trusted HTTPS issuance, hardware encoding, Wi-Fi Direct, I2C, CH341 or remote MFi, and audio on the relay.
  • Known issues: on some head-unit browsers the page shows fewer frames than it receives, which is being investigated; Experimental → Suggest working modes does nothing on Linux yet.
  • Install it with OpenXPlay Flasher, or by hand from the Debian package or the tarball. You supply your own Apple accessory (MFi) identity; no build contains one.

新增

  • 管理页改用 Android 应用以手机为主的设计,支持浅色和深色。首页把连接显示为一条路径(iPhone → 这台中继 → 车机),并显示每一段的进度;每一步都能打开详情、处理方法、错误代码和时间。设置向导会在对应的字段旁标出无法“下一步”的原因,并提供打开蓝牙和 Wi-Fi 的按钮。设置沿用 Android 应用的菜单结构,并加入它的设置,例如 Carlink 名称、自动重连、车机网页端口和清除保存的屏幕参数。
  • 用默认密码登录管理页后,会提示你设置自己的密码(可以跳过)。可以关闭从网络访问管理页,也可以重置管理密码。
  • 在管理页配对 iPhone 时,页面会写明 iPhone 上显示的中继名称 OpenXPlay Linux。首页和“设置 → iPhone 连接”中可以移除已配对的设备(正在使用该设备的会话会先停止);之后在 iPhone 的蓝牙设置里忽略 OpenXPlay Linux,再重新开放配对。
  • 有线 CarPlay:“设置 → iPhone 连接 → USB 数据线”可以驱动插在中继 USB-A 接口上的 iPhone,使用 USB-A 转 Lightning 或 USB-A 转 USB-C 数据线;车机仍通过 Wi-Fi 连接中继。默认仍是无线。
  • “CarPlay 显示区域”,默认开启。车机浏览器进入或退出全屏时,CarPlay 画面随之调整,不用重新连接,也没有黑边。中继会记住上次的车机,即使 CarPlay 先于车机网页启动,画面也能准确贴合。
  • “CarPlay 画面”,管理页和车机网页都可以调整:分辨率(自动、原画、1080p、720p、整个屏幕)、CarPlay 屏幕宽度(125、200、250、300 mm,默认 200)、视频编码(自动、H.265、H.264,取代车机网页原来的“只用 H.264”选项)和帧率(自动或 30–60 fps),另有按 5 秒或 15 秒计算的视频统计。在管理页修改后,下次连接时生效;CarPlay 运行时可以点“重新连接”。
  • 车机网页:浏览器因倒车影像等原因退出全屏后,轻触一下即可恢复全屏,这一下不会点到 CarPlay。在 CarPlay 里点 OpenXPlay 图标可以打开网页设置。网页显示启动阶段和版本号,普通断开后会继续重连,中继更新后会自动刷新一次。
  • 车型与屏幕:按品牌、车型和年款从 Android 应用的车型目录选车(含极氪),屏幕参数按车保存。
  • “声音 → 通过车辆蓝牙播放 CarPlay 音频(实验性)”,默认开启:中继不向 iPhone 提供 CarPlay 音频,音乐、导航和通话改由 iPhone 自己与车辆的蓝牙连接播放。请保持 iPhone 与车辆配对,并将车辆音源设为蓝牙;如果声音改从 iPhone 播放,请关闭此选项。
  • “网卡与网络角色”:中继列出所有有线网卡和 Wi-Fi 网卡及其能力,并决定 iPhone、车机浏览器和 Carlink 各用哪一块。默认自动;也可以逐项指定,网卡无法同时承担的组合会给出提示。热点频段和信道按 Wi-Fi 硬件选择,另有“Wi-Fi 国家或地区”和“热点安全方式”设置(默认 WPA2,硬件支持时可选 WPA3,也可以开放)。
  • Carlink 使用第二块 Wi-Fi 网卡,连接车机时 CarPlay 热点保持开启。Carlink 会记住每辆车的连接方式,持续扫描直到找到车机,车机蓝牙地址变化后也能跟上,并把方向盘媒体按键传给 iPhone。车机要求且 iPhone 发送 H.265 时使用 H.265;另有画面尺寸、车机替换配对前的确认、“车辆信息”(默认关闭)、车机和网卡都支持时的 Wi-Fi 直连,以及开发者选项中的协议跟踪记录。
  • 管理热点(默认关闭),使用第二块 Wi-Fi 网卡:一个常开的热点,用 https://10.79.0.1:6975 打开管理页;Carlink 占用这块网卡时暂停。
  • 可信 HTTPS(默认关闭):中继用 DuckDNS 或 dynv6 的域名发布供车机访问的地址,并申请 Let's Encrypt 证书,车机浏览器打开页面时不再出现证书警告。每个服务商分别保存设置,可以导入配置文件,仍可用 IP 地址打开页面。
  • 特斯拉浏览器(默认关闭,车型为特斯拉时显示):中继在自己的热点上加一个特斯拉浏览器能打开的地址,模式与 Android 应用相同(推荐 TeslaMirror 方式),停止时移除。需要浏览器输出和这台中继的热点;可信域名模式需要可信 HTTPS。
  • 日志、配置文件和检查更新,与 Android 相同:导出已脱敏的日志 ZIP,可以保存,也可以上传到 logs.openxplay.org 获取日志 ID 和二维码;按 Android 应用的格式导出和导入用户配置和隐私配置;只有点“检查更新”时,才到 GitHub 查找较新的 Linux 稳定版或测试版。日志会写明中继在等待什么、为什么拒绝启动,以及上次运行是怎样结束的。
  • 身份与证书:导入或移除 Apple 配件身份(文件或 ZIP),可以使用远程 MFi 服务器,或通过 I2C、CH341 转接器连接的认证芯片;也可以为通过 IP 地址打开的车机网页安装自己的证书。更换证书(包括可信 HTTPS 续期)无需断开车机网页即可生效。
  • 需要硬件的选项,没有相应硬件时隐藏或不可用:有 V4L2 视频编码器时,Carlink 可以在浏览器输出的同时使用 H.265,可以使用“1280×720(补偿变形)”,并为浏览器转换 H.265;有 ALSA 声卡时,可以在中继上播放 CarPlay 音频和使用麦克风(默认关闭;播放需要 ffmpeg,麦克风需要 arecord)。
  • “实验性功能”默认全部打开:Android 中继的开关(画面会话处理、播放确认、启动状态和诊断、把这台中继的蓝牙地址发给车机);三个用于连接后一直没有画面的 iPhone(如 iOS 16)的开关(仅在 iPhone 提出时开启 iAP2 Wi-Fi 通道、按 iPhone 请求释放蓝牙、等待 iPhone 自行重连);以及“卡顿监测”,记录暂停和卡住的线程。如果连接比以前差,请关闭“使用实验功能”。
  • 每个版本都附带中继的 Debian 安装包和安装清单,OpenXPlay Flasher 用它们安装和更新中继。安装包和 install.sh 还会安装通用的主机调优:关闭 Wi-Fi 省电、扫描时不随机化 MAC 地址,以及一个时钟守护程序,在时钟同步后删除日期在未来的 TLS 状态。
  • 适配其他主机:主机配置文件 /etc/openxplay/host.json(也可用 --host-profile 指定)记录各主机不同的地方,例如型号、Wi-Fi 接口、热点信道和蓝牙适配器;“诊断”页显示主机的 Wi-Fi 和蓝牙能力。

变更

  • 只有一块 Wi-Fi 网卡时(例如 UFI003),中继只提供浏览器输出;Carlink(单独或与浏览器一起)需要第二块 Wi-Fi 网卡。设置向导和设置页会说明原因;已保存的 Carlink 输出会在首页显示一项提示,可以一键改用浏览器;出现第二块网卡后,无需重启即可恢复 Carlink。
  • 管理页按网络使用不同的名称:iPhone 所在的网络(这台中继的 CarPlay 热点,或车机的热点)上是 openxplay-car.local,其他网络(例如有线网络或管理热点)上是 openxplay-admin.local;openxplay-linux.local 仍可使用。用 http:// 访问管理端口时会跳转到 https://,所以不输入 https:// 也能打开管理页。
  • CarPlay 热点和管理热点的密码默认是 openxplay,除非你自己设置了别的密码,手机可以先连上,再打开管理页修改。旧版本自动生成的热点密码会在更新后改为 openxplay,热点名称不变;之前用旧密码连接的车机需要重新输入一次新密码。热点密码不再出现在命令行参数里。
  • 中继运行期间,CarPlay 热点一直开启,启动失败或点“停止”后也不关闭,在车上仍能打开管理页。“停止”会一直保持到设备重启;点“连接”恢复。
  • “自动连接”在一切就绪后才连接,先倒数五秒,点“暂不”可以取消。“开机启动”是单独的设置(新安装默认关闭;更新时两项都沿用原来的选择)。
  • 连上 iPhone 后启动失败会重试五次,然后停止并给出报告,蓝牙、Wi-Fi、Carlink 或 iPhone 恢复时会再试一次;附近没有 iPhone 时,中继继续等待。只用 Carlink 输出时,无论车机的 Carlink 多晚启动,CarPlay 都会等它;同时使用两种输出时,60 秒后先启动浏览器,车机就绪后再加入 Carlink。还不知道屏幕尺寸时,CarPlay 最多等待 20 秒;“现在开始”可以跳过等待。
  • 旧的 AirPlay 控制会话关闭时,新会话会保留屏幕;同一会话内重建画面时,车机网页的会话和声音会保留。视频编码为“自动”时,H.265 画面开始后 30 秒内断开两次,车机网页会改用 H.264。
  • Carlink 在蓝牙连接和会话中使用相同的身份,与 Android 一致,因此更新后车机会要求输入一次 Carlink 配对码。重连或调整尺寸只重启 Carlink,车机网页继续运行。
  • 中继显示真实的版本号(0.1.3 显示的是 0.1.2)。有两个蓝牙适配器时,中继使用配置的那个,没有配置时使用编号最小的 hciN。缺少 Wi-Fi 接口时中继不再退出:管理页仍可访问(例如通过有线网络),接口出现后 CarPlay 自动启动。
  • 软件包数据库被占用时,中继更新最多等待三分钟;更新失败时都会给出原因。从这个版本起,较新版本中继保存的设置不再导致较旧版本无法启动。

说明

  • 这是 0.1.3 之后的第一个 Linux 正式版,包含 Linux 0.1.5 和 0.1.6 各测试版的全部内容。相对 0.1.6-beta.3 新增:有线 CarPlay、单网卡和双网卡规则、按网络区分的名称和 HTTPS 跳转、保持开启的 CarPlay 热点、移除已配对设备、iOS 16 相关选项和“卡顿监测”,以及显示更准确的管理页。
  • GitHub 上标记为 Latest 的版本始终是 Android 应用;Linux 版本的标签以 linux-v 开头。
  • 从 0.1.3 更新后,请手动刷新一次车机网页;以后更新会自动刷新。
  • 回退到 0.1.3:0.1.3 无法用这个版本写入的设置启动。回退前请先放回更新前备份的 /var/lib/openxplay/settings.json,或删除这个文件。
  • 已在斐讯 N1 上测试,但没有 iPhone 和车机:中继保持运行并等待 iPhone;能加上和移除特斯拉地址;管理热点、openxplay-admin.local 和跳转到 HTTPS 正常;启动失败后和点“停止”后 CarPlay 热点保持开启;第二块 Wi-Fi 网卡消失时只提供浏览器,网卡恢复后 Carlink 也恢复;能移除一个用于测试的已配对蓝牙设备。在 0.1.5 测试版之前,一个测试构建曾通过 UFI003 把 iPhone 的 CarPlay 投到代替车机的手机浏览器上,并验证了显示区域、画面设置和轻触恢复全屏。
  • 尚未在设备上测试:这个版本与 iPhone 的 CarPlay、有线 CarPlay、移除后重新配对 iPhone、在 iPhone 上打开 openxplay-car.local、与车机的 Carlink(包括一次性的配对码请求)、iOS 16 相关选项、通过车辆蓝牙播放 CarPlay 音频、特斯拉、WPA3、可信 HTTPS 证书签发、硬件编码、Wi-Fi 直连、I2C、CH341 或远程 MFi,以及中继上的音频。
  • 已知问题:在部分车机浏览器上,网页实际显示的帧数少于收到的帧数,正在排查;“实验性功能 → 提示可用的连接方式”在 Linux 上暂时没有作用。
  • 可以用 OpenXPlay Flasher 安装,也可以用 Debian 安装包或压缩包手动安装。Apple 配件(MFi)身份需要你自己提供,任何安装包都不包含。

Built from OpenXPlay-Relay@40af815379e8 and OpenXPlay-Stream@bf1959648578.

  • openxplay-relay-0.1.6-linux-aarch64.tar.gz: the Linux relay for aarch64 (static musl binaries, web pages and rust/packaging/install.sh).
  • openxplay-relay_0.1.6_arm64.deb: the relay Debian package for OpenXPlay Flasher and other Debian-based hosts.
  • openxplay-relay_0.1.6_arm64.manifest.json: the relay flash-stage manifest (org.openxplay.flash-stage/1), including the package SHA-256.
  • SHA256SUMS: SHA-256 checksums of these files.

Setup: https://openxplay.org/en/quick-start · 设置:https://openxplay.org/quick-start. No build contains an Apple accessory (MFi) identity; supply your own.