v0.4.0 (2026-11-28)
Video statistics include bitstream copy, writer queue and pipe timings, capture age at the VM, and encoded keyframe/delta burst sizes
Video timestamps preserve capture frame intervals through pipe and VM delays. The port protocol now carries a 64-bit capture timestamp; rebuild the C program and Elixir library together
Keyframes default to on demand. A stalled subscriber stops receiving frames until it drains its backlog, then requests one recovery keyframe
NanoKVMGo.Video: the stream's statistics each second, as{NanoKVMGo.Video, {:stats, stats}}to subscribers and fromstats/1: frames captured, encoded and skipped while the encoder was still on the one before, the time a frame takes through the encoder, the bytes and the QPThe video program keeps up with 2560×1440 at 90 Hz: a frame that comes while the encoder is busy waits for it instead of being dropped, encoded frames go out on a thread of their own while the encoder takes the next, the pipe to Elixir holds 1 MB and the program runs at real-time priority. Every frame is encoded, about 9 ms from the end of a frame to its encoding (
stats/1's:ready_ms), where a third were dropped beforeThe video program asks the encoder for cached bitstream buffers (
V4L2_MEMORY_FLAG_NON_COHERENT), which a driver that syncs only the bytes written makes about ten times cheaper to read than uncached onesNanoKVMGo.Video.subscribe/2takestimestamps: true: each access unit then comes with its capture timestamp, preserving frame intervals through encoder, pipe and VM scheduling delaysNanoKVMGo.Bluetooth: BlueZ for the controller in the AIC8800 Wi-Fi chip, with the system's D-Bus and bluetoothd started under MuonTrap (the Nerves system with BlueZ): the controller's state, the devices it knows, pairing that other devices get only while it is open, and scanning, pairing, connecting and forgetting devices. It talks to BlueZ through a D-Bus client of its own, in ElixirNanoKVMGo.Bluetooth.HID: the board as a Bluetooth LE HID device (HID over GATT), whatever its report map says; a host that pairs gets its input reports, which need an encrypted link to be read or subscribed toNanoKVMGo.Video.snapshot/3: a region of the next captured picture, or all of it, as RGB in the colours the streams declare, for reading the text in it and the likeThe encoding's
:color_matrixand:color_rangeset the colour the HDMI bridge turns the picture into, where the capture can convert it (the system's bridge driver from linux-ax620e 4bd74a0 on), instead of only labelling the samples;:autokeeps the bridge's own, BT.709 at full range.:bt601shows the MJPEG stream's strongest colours right, as JPEG decoders assume BT.601. The H.264 and H.265 streams declare BT.709 primaries whatever the matrix (BT.601 declared SMPTE 170M's)
v0.3.0 (2026-11-27)
- H.265 from
NanoKVMGo.Videoas well as H.264: the encoding's:codec,:autoby default, takes H.265 while every subscriber decodes it.subscribe/2takes the codecs the caller decodes,[:h264]by default, andcodec/1tells the stream's. A subscriber's messages are{NanoKVMGo.Video, {codec, :key | :delta, data}}; when the codec changes, the next access unit is a keyframe of the new one. The encoder device is:encoderin:devices, instead of:h264 - The stream declares its colour: BT.709 at full range, as the HDMI bridge
hands the samples over, instead of nothing, which decoders took for
limited range. The encoding's
:color_matrixand:color_rangelabel them otherwise NanoKVMGo.Videotakes its:encodingfrom a{module, function, args}too, called each time the process starts: a restart by its supervisor takes the encoding saved last- The NanoKVM-Go with 256 MiB:
NanoKVMGo.Videoholds three capture buffers with a video CMA pool under 176 MiB, as the Go's 128 MiB, and four otherwise (the:capture_buffersoption);NanoKVMGo.CMAtakes pools that leave Linux 96 MiB of the DRAM, as the system's U-Boot does, instead of half of it, and:defaultstands for the board's sizes, 128 MiB for video on the Go - The encoders' output buffers hold a picture of one byte a pixel for JPEG and half a byte for H.264 and H.265, instead of the driver's two: at 4K, 41 MB less of the video pool, which on the Go left the video encoder no room for its references. A bigger picture is dropped
- A
nano_kvm_go_videothat keeps exiting starts again after 2 s, then twice as long each time up to a minute, instead of every 2 s - H.264 rate control in
NanoKVMGo.Video: the:encodingoption, andset_encoding/2, which changes it while the capture runs. A constant QP, a constant bitrate, or VBR: a QP, with a higher one where the bitrate would go over a cap; a keyframe interval, and a frame rate cap. VBR of up to 8 Mbit/s at QP 24 by default, instead of a constant QP of 30; the:h264_qpoption is gone - Needs Elixir 1.20, the version it is tested with
NanoKVMGo.Metricstakes the clock it measures the traffic against,:clockNanoKVMGo.VideoandNanoKVMGo.Microphonecarry on when a keyframe request or samples come as their program exits, instead of crashingNanoKVMGo.Display.show/2keeps the framebuffer open after a picture of the wrong size, instead of opening it again for eachNanoKVMGo.VideoandNanoKVMGo.Audiosend to subscribers on other nodes, instead of crashing on their first messageNanoKVMGo.Expansionleaves a persisted mode the kernel does not offer, instead of writing the modenilNanoKVMGo.Expansiongives its GPIOs and PWM channels back when its supervisor stops it, stopping the PWM outputsNanoKVMGo.EDID.decode/1skips a detailed timing without a size, instead of raisingArithmeticErrorNanoKVMGo.Display.Canvas.text_width/2counts code points, asNanoKVMGo.Display.Canvas.text/6draws them, not graphemesNanoKVMGo.TouchandNanoKVMGo.Buttonread their devices with a port program,nano_kvm_go_input, instead of a read that held one of the VM's dirty I/O schedulers each;:programnames another- Options are checked in the caller: an unknown option or a wrong value
raises
ArgumentError, instead of being left out or stopping the process NanoKVMGo.DisplayandNanoKVMGo.Metricstake:root, the root of the file system they read, asNanoKVMGo.HardwareandNanoKVMGo.CMAdo; the port programs (:program), the video devices (:devices,:video_device),NanoKVMGo.Expansion's GPIO library (:gpio) andNanoKVMGo.Hardware.storage/1'sdf(:df) are documented optionsNanoKVMGo.Backlightis functions with no process, each with the:backlightoption instead of a server: take it out of the supervision tree.set_frequency/2raises for a frequency without a period of whole nanoseconds, instead of returning{:error, :invalid_frequency}NanoKVMGo.Expansion.set_mode/3takes the server first, as the other functions do:set_mode(mode),set_mode(server, mode)orset_mode(server, mode, persist: false), no longerset_mode(mode, persist: false). A mode that is none of the modes raisesFunctionClauseError, instead of returning{:error, {:unknown_mode, mode}}, which now means one the kernel does not offerNanoKVMGo.EDID.valid?/1tells an EDID thatNanoKVMGo.Video.set_edid/2takes;set_edid/2raisesArgumentErrorfor another, instead of returning{:error, :invalid_edid}NanoKVMGo.Video.edid/1andNanoKVMGo.Video.set_edid/2take the:deviceand the:programas options, and tell a failure of the EDID program as{:error, {:exit_status, status, output}}instead of a string- The input's type is
NanoKVMGo.Video.input/0, instead oft:NanoKVMGo.Video.Input.t/0 NanoKVMGo.Audio's messages are{NanoKVMGo.Audio, {:format, source, format}}and{NanoKVMGo.Audio, {:pcm, source, data}}, a module and an event as the other processes send, instead of{NanoKVMGo.Audio, source, event}; each process that sends messages has their type,message()NanoKVMGo.Videotells a subscriber the input once it knows it, instead of{NanoKVMGo.Video, {:input, nil}}- One verb for the U-Boot environment, as in
persist: false:NanoKVMGo.CMA.persist_sizes/2andNanoKVMGo.CMA.persisted_sizes/1instead ofput_sizes/2andsaved_sizes/1, andNanoKVMGo.USB.persist_network_addresses/2, with the:kvoption, instead ofkeep_network_addresses/2with the module as its second argument NanoKVMGo.CMA.persist_sizes/2takes a map, and raisesArgumentErrorfor a pool other than:videoand:npuor a size of another kind, instead of returning{:error, {:unknown_pool, pool}}or{:error, {:invalid_size, pool, size}}nerves_runtimeis an optional dependency, andNerves.Runtime.KVis called as it is: without it,{:error, {:undefined, kv}}and the fallbacks are gone, andNanoKVMGo.Expansiondoes not startNanoKVMGo.Display.Canvas.text/6andNanoKVMGo.Display.Canvas.render/2check their options: a:scalethat is not a positive integer, a:rotateother than 0 and 180, or an unknown option raiseArgumentErrorNanoKVMGo.Displaytells a framebuffer attribute it cannot read as{:error, {:invalid_attribute, name, value}}, instead of raising
v0.2.1 (2026-11-23)
NanoKVMGo.USB.gadget_options/1gives the device controller's endpoints, seven IN and seven OUT, forKuroneko.Gadgetto count functions against
v0.2.0 (2026-11-21)
- Renamed from
nano_kvm(NanoKVM) tonano_kvm_go(NanoKVMGo): the library is for the NanoKVM-Go boards. The port programs arenano_kvm_go_video,nano_kvm_go_audio,nano_kvm_go_playbackandnano_kvm_go_edid - The USB gadget's functions, the keyboard and mouse input and the mass
storage moved to
kuroneko_gadget(Kuroneko.Gadget,Kuroneko.Gadget.HID,Kuroneko.Gadget.Storage).NanoKVMGo.USBgives it the board's settings (NanoKVMGo.USB.gadget_options/1), with the network addresses made from the serial number and kept in the U-Boot environment (NanoKVMGo.USB.keep_network_addresses/2) NanoKVMGo.Expansion: the two lines of the auxiliary USB-C port as a UART, GPIOs, PWM outputs or an I2C bus, through the NanoKVM-Go system'snanokvm-go-expansiondriver; the mode is kept in the U-Boot environment, GPIO edges come as messages. Needscircuits_gpioNanoKVMGo.Video.edid/0andNanoKVMGo.Video.set_edid/1: the EDID of the input, kept in the bridge's flash;NanoKVMGo.EDID.decode/1for its name and modesNanoKVMGo.Audiotakes the sample rate from the bridge, through the video capture driver, and measures it only where the driver does not report itNanoKVMGo.temperature/0: the SoC temperature- Two-way USB audio, with the
:microphoneand:speakerfunctions of the USB gadget:NanoKVMGo.Microphoneto play to the target's microphone, andsource: :usbforNanoKVMGo.Audioto capture what the target plays to the speaker NanoKVMGo.Audiomessages name their source:{NanoKVMGo.Audio, :hdmi, ...}or{NanoKVMGo.Audio, :usb, ...}NanoKVMGo.Microphoneand the USB speaker follow the rate the target chooses and apply its volume and mute; formats name their samples (:sample_format), andNanoKVMGo.Microphone.subscribe/1tells the format to play inNanoKVMGo.DisplayandNanoKVMGo.Display.Canvas: pictures and text on the LCD, writing only the rows that change and carrying on when the panel's driver loads late or probes again;NanoKVMGo.Touch: its touch panel;NanoKVMGo.Button: the BOOT buttonNanoKVMGo.Backlight: the LCD's brightness on a lightness curve, and the frequency of the PWM that dims it, 25 kHz by defaultNanoKVMGo.Hardware: the board, its SoC, CPU and memory, its parts with the Linux device and driver of each, and the microSD card with its partitions and their useNanoKVMGo.Metrics: CPU, memory, temperature, network traffic, load and uptime each second, with five minutes of history, for subscribersNanoKVMGo.CMA: the sizes of the contiguous memory pools of video and the NPU, kept in the U-Boot environment for the next boots, and an opt-in trial that the boots after it revert unless the firmware is validated
v0.1.0
First version, as nano_kvm, moved out of the NanoKVM-Go test application:
NanoKVM.Video: capture with H.264 and MJPEGNanoKVM.Audio: HDMI/DisplayPort audio as PCMNanoKVM.USB: keyboard, mouse and mass storage functions on the gadget the Nerves system sets upNanoKVM.HID: keyboard and absolute mouse inputNanoKVM.Storage: disk images as a removable drive or a CD-ROM