Skip to content

Build the radio model, and build it for Windows - #4

Merged
A13xB0 merged 2 commits into
mainfrom
radioserver-portable
Aug 14, 2026
Merged

A13xB0 merged 2 commits into
mainfrom
radioserver-portable

Conversation

@A13xB0

@A13xB0 A13xB0 commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

Every emulated node — ESP32 or nRF52, on any platform — starts by looking up radioserver. Nothing built it: build.sh compiled bridge/main.cpp into each role and never touched bridge/radioserver.cpp, no release published it, and no MeshBench bundle staged it. Unpacking the 0.0.3 artifacts confirms it: zero radioserver entries in the Linux tarball or the Windows zip, beside a QEMU and a Renode that therefore cannot be driven.

bridge/radioserver.cpp — builds for Windows now. It included <sys/un.h> unconditionally and used read/write/poll on socket handles, none of which mingw has. Confined to the same compat block bridge/main.cpp already uses, plus WSAPoll. Windows gets the TCP half only: its AF_UNIX is unreachable without <sys/un.h>, and the simulator already asks for :0 there for both emulators, so the missing half was never going to be used. It says so rather than listening nowhere.

build.sh — a radioserver target. Two objects and a link: it needs neither MeshCore nor Crypto, so this target no longer demands those checkouts, which is what lets a packaging job build it from this repo alone.

This includes the TCP transport and the console-message fix from #3, so #3 can be closed in favour of this.

Verified here:

  • builds and links for Linux (g++) and Windows (mingw, static, -lws2_32), through build.sh for both
  • Linux binary run end to end: announces listening on 127.0.0.1:<port> — the line the simulator parses back — accepts a connection, serves CS assert / transfer / BUSY / IRQ / CS release, and exits 0 reporting its transaction count
  • a real role still refuses to build without MESHCORE, and still reports an unknown role

Not verified: the Windows binary has not been run on Windows, only cross-compiled and linked.

A13xB0 added 2 commits August 14, 2026 20:31
The radio model sits between an emulated MCU and the engine, and every
emulated node needs one - so a bundle without it ships two emulators
that cannot be driven. This file could not be built for Windows: it
included <sys/un.h> unconditionally and used read/write/poll on socket
handles, none of which mingw has.

Confined to the same five-line compat block bridge/main.cpp already
uses, plus WSAPoll for waiting on two sockets. Windows takes the TCP
half only - its AF_UNIX is unreachable without <sys/un.h>, and the
simulator already asks for ":0" there for both emulators - and says so
rather than listening nowhere.

Includes the TCP transport and the console-message fix from #3, which
this supersedes.
Nothing built the radio model. build.sh compiled bridge/main.cpp into
every role and left bridge/radioserver.cpp alone, so the one binary an
emulated node cannot start without was built by hand or not at all -
and every shipped bundle so far has been the latter.

It needs neither MeshCore nor Crypto, only the chip model beside it, so
those two checkouts are no longer demanded for this target. Built from
this tree rather than from the simulator so a native node and an
emulated one keep the same VirtualSX1262.
A13xB0 pushed a commit to MeshBench/meshbench that referenced this pull request Aug 14, 2026
Every emulated node looks up radioserver before it looks up either
emulator, and no bundle has ever contained one: nothing built it,
no release published it, and no packaging job staged it. 0.0.1
through 0.0.3 shipped a QEMU and a Renode that nothing could drive,
with a README saying emulated boards worked out of the box.

All three jobs now build it from meshcore-native - the repository the
chip model lives in, so a native node and an emulated one stay the
same VirtualSX1262 - and a failure is fatal rather than a warning.
The way this stayed hidden for three releases was a green build.

lookupTool also learns the versioned renode_*-portable layout by
glob. Linux and macOS bridge that with a symlink; a zip cannot carry
one, so Windows shipped a Renode two directories from anywhere the
search looked.

Needs MeshBench/meshcore-native#4, which is what builds radioserver
and what makes it compile for Windows at all.
@A13xB0
A13xB0 merged commit 199c5f2 into main Aug 14, 2026
@A13xB0
A13xB0 deleted the radioserver-portable branch August 14, 2026 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant