Posts

Showing posts from December, 2025

Plan 9: Share Media Content with TV via UPnP

Image
  Share media content with UPnP / DLNA capable players. This is a proof-of-concept of network programming  (TCP and UDP)  in Plan 9. For information, man udp is a useful place to get started.   Device Quirks VLC VLC looks for "urn:schemas-upnp-org:service:ContentDirectory:1" instead of "urn:schemas-upnp-org:device:MediaServer:1" during M-SEARCH.   LG WebOS TV   LG WebOS TV needs the services "urn:schemas-upnp-org:service:ConnectionManager:1" and "urn:microsoft.com:service:X_MS_MediaReceiverRegistrar:1" in addition to "urn:schemas-upnp-org:service:ContentDirectory:1" in device.xml.   It also seems to remember the UUIDs for a particular IP address. If you change the UUID of our application and it doesn't appear in the TV, restarting the TV might help.  Code https://gitlab.com/atamariya/plan9front/-/blob/dev/sys/src/cmd/upnp/server.c  

Plan 9: Password Management

 An authentication server manages users credentials in a Plan 9 grid. However, if you are just getting started, probably it would be a better idea to directly use factotum for managing credentials for various services. Create a file keys  with the following content.  key proto=pass        service= ftp server=10.0.2.2 user=anand !password=<password> key proto= wpapsk service= wpa essid=Tomato24 !password=<password>   Load the keys in factotum.  read -m keys > /mnt/factotum/ctl   # Verify cat  /mnt/factotum/ctl   Now you can log into the services without manually entering the password. ftpfs 10.0.2.2 aux/wpa -s Tomato24 /net/ether1  Finally, you can add the command to $home/lib/profile so that it will be executed automatically during bootup. If you have the authentication server configured, you can use the following commands to manage your credentials. (Secstore files are stored at "/adm/secstore/use...

Plan 9: Intel Wireless 3165

Intel Wireless 3165 internal PCI card works with Plan 9. You'll need firmware blob /lib/firmware/ iwlwifi-7265D-29 .ucode from Linux as /lib/firmware/ iwlwifi-7265D-29  in Plan 9. Detect hardware on Linux  lspci -nn 02:00.0 Network controller [0280]: Intel Corporation Wireless 3165 [ 8086:3165 ] (rev 81)      # slot_info=0000:02:00.0 # vendor_id=8086 # device_code=3165   Detect firmware on Linux  sudo dmesg | grep -i iwlwifi | grep -i firmware [    6.062085] iwlwifi 0000:02:00.0: loaded firmware version 29.f2390aa8.0 7265D-29.ucode op_mode iwlmvm Apply the following patch to etheriwl.c and rebuild kernel (cd  /sys/src/9/pc64 && mk install). The kernel should be copied to /n/9fat (9fat partition - use 9fs 9fat ) . @@ -4509,6 +4512,10 @@ iwlpci(void)              family = 9000;              fwname = "iwm-9260-34";           ...

Plan 9: Quick Boot with UEFI

Image
 UEFI ( Unified Extensible Firmware Interface) provides a quick way to set up a Plan 9 terminal  on modern hardware .  EFI System Partition (ESP) is a FAT32 partition. You should be able to modify it in most of the operating systems.     Run mk in \sys\src\boot\efi . aux/aout2efi converts an a.out file to an EFI executable. Copy over the files bootx64.efi, 9pc64, plan9.ini  (for x86_64 hardware) to \EFI\plan9\ directory in the ESP. If you want it be the default OS , you can create a symlink \EFI\boot to \EFI\plan9. Remember to include the full path to the kernel in plan9.ini. bootfile=\EFI\plan9\9pc64       When bootx64.efi fails to find the bootfile (e.g. kernel is missing, plan9.ini is missing or path is incorrect), you can provide the arguments at > prompt   followed by a boot command . You can use EFI shell or efibootmgr on Linux to modify the EFI entries that are displayed during boot.   Test in QEMU Before running ...