Skip to content

Streams: name the wired Ethernet link when a start is refused - #990

Merged
chrisgleissner merged 5 commits into
GideonZ:masterfrom
chrisgleissner:fix/989-stream-ethernet-error
Oct 15, 2026
Merged

chrisgleissner merged 5 commits into
GideonZ:masterfrom
chrisgleissner:fix/989-stream-ethernet-error

Conversation

@chrisgleissner

@chrisgleissner chrisgleissner commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #989.

Summary

PUT /v1/streams/{stream}:start reported "No Operational Network Interface" when the wired Ethernet port had no link or no IP address, even while WiFi was up and carrying the request. The call now fails with "Wired Ethernet link is down or has no IP address", and the route description says that the streams leave through the wired port only. Two other statements in the stream and info route documentation that do not match the firmware are corrected.

Verified on an Ultimate 64 Elite with Ethernet and WiFi on one subnet. The new manual suite stream-wired-link fails on master with the old message and passes on this branch.

Testing found two further defects. They are tracked separately and are not changed here:

Error message when the wired port has no address

The FPGA stream generators send only through interface 0, the RMII port. On every target that builds data_streamer.cc, the RMII interface is registered before the WiFi interface (init priority 51 against 52), so interface 0 is always the wired port. DataStreamer::startStream refuses when that interface has no link or no IP address. It returned SSRET_NO_NETWORK, whose text is "No Operational Network Interface". That text is wrong whenever WiFi is up.

A new result code, SSRET_NO_ETHERNET_LINK, carries the text "Wired Ethernet link is down or has no IP address". It keeps HTTP 500, so a client that tests the status code sees no change. SSRET_NO_NETWORK stays for the case where no network interface exists at all. Changing the text of SSRET_NO_NETWORK instead was rejected because that code still reports that case.

Two places are left unchanged on purpose:

  • The menu popup "No (valid) link" does not claim that no interface exists, so it is not misleading.
  • debug_streamer_u2p.cc makes the same check. The U2+ and U2+L start that stream from the menu only, and the result code is never shown there, so changing it would have no observable effect.

Documentation corrections

Each of these was checked against the firmware on the device.

  • streams:start said that any multicast group is accepted. The firmware treats only 232.0.0.0 to 239.255.255.255 as multicast. A group from 224 to 231 is answered with 200, but the stream is addressed to the gateway, and a listener that joined the group receives nothing. The description now gives the range. Add runtime VIC palette stream metadata #871 widens the range in the firmware, so this sentence needs updating if Add runtime VIC palette stream metadata #871 is merged after this PR.
  • GET /v1/info said that the Ident Service on UDP port 64 returns the same information. The Ident answer has no git_commit_hash and no MAC addresses, and its product string includes the versions. The sentence now says "most of this information".

Test

tests/e2e/network/stream_wired_link_test.py, registered as the manual suite stream-wired-link:

  1. Finds the wired address from the sender of a video start to the multicast group, on a port only the suite listens on. Packets from other devices that stream to the same group therefore cannot be mistaken for this device's.
  2. Finds the WiFi address. It is the address the suite was given if that is not the wired one; otherwise it is taken from an Ident broadcast.
  3. Over WiFi, sets the Ethernet port to a static 0.0.0.0 and starts video. It requires HTTP 500 with exactly "Wired Ethernet link is down or has no IP address", and no packets.
  4. Restores the settings one item at a time, with the address last, and requires video to start again over Ethernet.

The suite also handles three other cases:

The settings are changed in memory only. The suite is manual because three effects last until the device restarts, and its description says to power-cycle afterwards:

Results on an Ultimate 64 Elite (FPGA 126, core 1.50), with Ethernet 192.168.1.13 and WiFi 192.168.1.70 on one subnet. Each build was loaded over JTAG.

Build stream-wired-link
master 125da1f fails: expected HTTP 500 'Wired Ethernet link is down or has no IP address', got HTTP 500 ['No Operational Network Interface']
this branch (firmware 312e86f) 2 of 2 pass

Builds: u64 and u64ii build completely. The u2, u2pl and u2plus applications compile and link; their updater steps stop on prebuilt files that a software-only build does not produce. make openapi_check and make openapi_test pass.

Not verified on hardware: the U64 Elite II and the C64 Ultimate, which run the same data_streamer.cc.

Commit history

The first commit also contained the unicast fix. A later commit moves that fix to #993, so the branch adds that fix and then removes it. Squashing on merge keeps that pair out of master.

@chrisgleissner chrisgleissner added bug Existing behavior is incorrect, broken, or regressed; includes supported documentation defects. test Test suites, harnesses, coverage, and infrastructure; not tests supplied to reproduce firmware bugs. network Networking and remote services: REST, Socket DMA, FTP, Telnet, and online access. documentation Manuals, specifications, examples, and contributor documentation are the requested deliverable. labels Oct 14, 2026
@chrisgleissner chrisgleissner changed the title Streams: name the wired Ethernet link when a start is refused, and resolve unicast destinations on the wired port Streams: name the wired Ethernet link when a start is refused Oct 14, 2026
@chrisgleissner
chrisgleissner marked this pull request as ready for review October 14, 2026 19:21
@chrisgleissner
chrisgleissner merged commit 47c62b3 into GideonZ:master Oct 15, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Existing behavior is incorrect, broken, or regressed; includes supported documentation defects. documentation Manuals, specifications, examples, and contributor documentation are the requested deliverable. network Networking and remote services: REST, Socket DMA, FTP, Telnet, and online access. test Test suites, harnesses, coverage, and infrastructure; not tests supplied to reproduce firmware bugs.

Projects

None yet

1 participant