RAL(4)

πŸ’– RAL πŸ’–

hey bestie!! so this is the ral page from the Kernel Interfaces Manual β€” yes, the section-4 one, the kernel interfaces girlies. it's about a wireless driver and it's honestly a whole personality. grab a snack, we're going through everything. πŸ“


✨ NAME ✨

ral β€” the Ralink Technology IEEE 802.11a/g/n wireless network device driver. that's it, that's the name, no notes. πŸ’…


πŸ› οΈ SYNOPSIS πŸ› οΈ

okay so first things first, bestie: you wanna bake this driver into your kernel? then you're gonna drop these lines into your kernel configuration file:

device ral
device ralfw
device wlan
device wlan_amrr
device firmware

five lines. all of them. don't skip any.

orrrrr β€” if you'd rather load it as a module at boot time (lowkey easier), you put this one line in loader.conf(5):

if_ral_load="YES"

and that's the whole vibe check. ✨


🌸 DESCRIPTION 🌸

so the ral driver is out here supporting PCI/PCIe/CardBus wireless adapters based on the Ralink RT2500, RT2501, RT2600, RT2700, RT2800, RT3090 and RT3900E chipsets. that's seven chipsets, bestie, and we're gonna meet all of them. 🫢

  • the RT2500 chipset β€” the first generation of 802.11b/g adapters from Ralink. it's two integrated chips: an RT2560 MAC/BBP and an RT2525 radio transceiver. vintage. iconic. πŸŽ€
  • the RT2501 chipset β€” second generation of 802.11a/b/g adapters from Ralink. two integrated chips again: an RT2561 MAC/BBP and an RT2527 radio transceiver. this one's got support for the IEEE 802.11e standard with multiple hardware transmission queues, and it allows scatter/gather for efficient DMA operations. the way it just... queues. πŸ”₯
  • the RT2600 chipset β€” two integrated chips, an RT2661 MAC/BBP and an RT2529 radio transceiver. this one uses MIMO (multiple-input multiple-output) technology with multiple radio transceivers to extend the operating range of the adapter and to achieve higher throughput. BUT. the RT2600 chipset does not support any of the 802.11n features. we said what we said. πŸ’€
  • the RT2700 chipset β€” a low-cost version of the RT2800 chipset. it supports a single transmit path and two receiver paths (1T2R). two integrated chips: an RT2760 or RT2790 (PCIe) MAC/BBP and an RT2720 (2.4GHz) or RT2750 (2.4GHz/5GHz) radio transceiver.
  • the RT2800 chipset β€” the first generation of 802.11n adapters from Ralink. two integrated chips: an RT2860 or RT2890 (PCIe) MAC/BBP and an RT2820 (2.4GHz) or RT2850 (2.4GHz/5GHz) radio transceiver. it supports two transmit paths and up to three receiver paths (2T2R/2T3R), and it can achieve speeds up to 144Mbps (20MHz bandwidth) and 300Mbps (40MHz bandwidth.) numbers!! slay!! ✨
  • the RT3090 chipset β€” the first generation of single-chip 802.11n adapters from Ralink. ral supports station, adhoc, hostap, mesh, wds, and monitor mode operation. only one hostap or mesh virtual interface may be configured at a time. any number of wds virtual interfaces may be configured together with a hostap interface. multiple station interfaces may be operated together with a hostap interface to construct a wireless repeater device. main character repeater energy fr fr. πŸ‘‘
  • the RT3900E chipset β€” a single-chip 802.11n adapter from Ralink. the MAC/Baseband Processor can be an RT5390 or RT5392. the RT5390 chip operates in the 2GHz spectrum and supports 1 transmit path and 1 receiver path (1T1R). the RT5392 chip operates in the 2GHz spectrum and supports up to 2 transmit paths and 2 receiver paths (2T2R).

and okay, the transmit speed? it's user-selectable or the driver can adapt it automatically depending on the number of hardware transmission retries. for more info on configuring this device, see ifconfig(8). iykyk. πŸ’…


πŸ”₯ HARDWARE πŸ”₯

the ral driver supports PCI/PCIe/CardBus wireless adapters based on Ralink Technology chipsets, including all of these. i'm listing every single one, no skips, because i love you:

  • A-Link WL54H β€” RT2560, PCI
  • A-Link WL54PC β€” RT2560, CardBus
  • AirLink101 AWLC5025 β€” RT2661, CardBus
  • AirLink101 AWLH5025 β€” RT2661, PCI
  • Amigo AWI-914W β€” RT2560, CardBus
  • Amigo AWI-922W β€” RT2560, mini-PCI
  • Amigo AWI-926W β€” RT2560, PCI
  • AMIT WL531C β€” RT2560, CardBus
  • AMIT WL531P β€” RT2560, PCI
  • AOpen AOI-831 β€” RT2560, PCI
  • ASUS WL-107G β€” RT2560, CardBus
  • ASUS WL-130g β€” RT2560, PCI
  • Atlantis Land A02-PCI-W54 β€” RT2560, PCI
  • Atlantis Land A02-PCM-W54 β€” RT2560, CardBus
  • Belkin F5D7000 v3 β€” RT2560, PCI
  • Belkin F5D7010 v2 β€” RT2560, CardBus
  • Billionton MIWLGRL β€” RT2560, mini-PCI
  • Canyon CN-WF511 β€” RT2560, PCI
  • Canyon CN-WF513 β€” RT2560, CardBus
  • CC&C WL-2102 β€” RT2560, CardBus
  • CNet CWC-854 β€” RT2560, CardBus
  • CNet CWP-854 β€” RT2560, PCI
  • Compex WL54G β€” RT2560, CardBus
  • Compex WLP54G β€” RT2560, PCI
  • Conceptronic C54RC β€” RT2560, CardBus
  • Conceptronic C54Ri β€” RT2560, PCI
  • D-Link DWA-525 rev A2 β€” RT5392, PCI
  • Digitus DN-7001G-RA β€” RT2560, CardBus
  • Digitus DN-7006G-RA β€” RT2560, PCI
  • E-Tech WGPC02 β€” RT2560, CardBus
  • E-Tech WGPI02 β€” RT2560, PCI
  • Edimax EW-7108PCg β€” RT2560, CardBus
  • Edimax EW-7128g β€” RT2560, PCI
  • Eminent EM3036 β€” RT2560, CardBus
  • Eminent EM3037 β€” RT2560, PCI
  • Encore ENLWI-G-RLAM β€” RT2560, PCI
  • Encore ENPWI-G-RLAM β€” RT2560, CardBus
  • Fiberline WL-400P β€” RT2560, PCI
  • Fibreline WL-400X β€” RT2560, CardBus
  • Gigabyte GN-WI01GS β€” RT2561S, mini-PCI
  • Gigabyte GN-WIKG β€” RT2560, mini-PCI
  • Gigabyte GN-WMKG β€” RT2560, CardBus
  • Gigabyte GN-WP01GS β€” RT2561S, PCI
  • Gigabyte GN-WPKG β€” RT2560, PCI
  • Hawking HWC54GR β€” RT2560, CardBus
  • Hawking HWP54GR β€” RT2560, PCI
  • iNexQ CR054g-009 (R03) β€” RT2560, PCI
  • JAHT WN-4054P β€” RT2560, CardBus
  • JAHT WN-4054PCI β€” RT2560, PCI
  • LevelOne WNC-0301 v2 β€” RT2560, PCI
  • LevelOne WPC-0301 v2 β€” RT2560, CardBus
  • Linksys WMP54G v4 β€” RT2560, PCI
  • Micronet SP906GK β€” RT2560, PCI
  • Micronet SP908GK V3 β€” RT2560, CardBus
  • Minitar MN54GCB-R β€” RT2560, CardBus
  • Minitar MN54GPC-R β€” RT2560, PCI
  • MSI CB54G2 β€” RT2560, CardBus
  • MSI MP54G2 β€” RT2560, mini-PCI
  • MSI PC54G2 β€” RT2560, PCI
  • OvisLink EVO-W54PCI β€” RT2560, PCI
  • PheeNet HWL-PCIG/RA β€” RT2560, PCI
  • Planex GW-NS300N β€” RT2860, CardBus
  • Pro-Nets CB80211G β€” RT2560, CardBus
  • Pro-Nets PC80211G β€” RT2560, PCI
  • Repotec RP-WB7108 β€” RT2560, CardBus
  • Repotec RP-WP0854 β€” RT2560, PCI
  • SATech SN-54C β€” RT2560, CardBus
  • SATech SN-54P β€” RT2560, PCI
  • Sitecom WL-112 β€” RT2560, CardBus
  • Sitecom WL-115 β€” RT2560, PCI
  • SMC SMCWCB-GM β€” RT2661, CardBus
  • SMC SMCWPCI-GM β€” RT2661, PCI
  • SparkLAN WL-685R β€” RT2560, CardBus
  • Surecom EP-9321-g β€” RT2560, PCI
  • Surecom EP-9321-g1 β€” RT2560, PCI
  • Surecom EP-9428-g β€” RT2560, CardBus
  • Sweex LC500050 β€” RT2560, CardBus
  • Sweex LC700030 β€” RT2560, PCI
  • TekComm NE-9321-g β€” RT2560, PCI
  • TekComm NE-9428-g β€” RT2560, CardBus
  • Unex CR054g-R02 β€” RT2560, PCI
  • Unex MR054g-R02 β€” RT2560, CardBus
  • Zinwell ZWX-G160 β€” RT2560, CardBus
  • Zinwell ZWX-G360 β€” RT2560, mini-PCI
  • Zinwell ZWX-G361 β€” RT2560, PCI
  • Zonet ZEW1500 β€” RT2560, CardBus
  • Zonet ZEW1600 β€” RT2560, PCI

eighty-seven of them. we counted. that's dedication. 🫑


🌈 EXAMPLES 🌈

okay bestie, this is the part you actually came for. join an existing BSS network (i.e., connect to an access point):

ifconfig wlan create wlandev ral0 inet 192.168.0.20 netmask
0xffffff00

join a specific BSS network with network name β€œmy_net”:

ifconfig wlan create wlandev ral0 inet 192.168.0.20 \
    netmask 0xffffff00 ssid my_net

join a specific BSS network with 40-bit WEP encryption:

ifconfig wlan create wlandev ral0 inet 192.168.0.20 \
    netmask 0xffffff00 ssid my_net \
    wepmode on wepkey 0x1234567890 weptxkey 1

join a specific BSS network with 104-bit WEP encryption:

ifconfig wlan create wlandev ral0 inet 192.168.0.20 \
    netmask 0xffffff00 ssid my_net \
    wepmode on wepkey 0x01020304050607080910111213 weptxkey 1
notice the backslashes?? those are line continuations, bestie. keep them. if you paste it as one line, also fine, but don't go deleting them mid-block, that's a crime. 🚨

😭 DIAGNOSTICS 😭

when things go wrong, the driver tells you like this:

  • ral%d: could not load 8051 microcode β€” an error occurred while attempting to upload the microcode to the onboard 8051 microcontroller unit. the 8051 said no. πŸ’€
  • ral%d: timeout waiting for MCU to initialize β€” the onboard 8051 microcontroller unit failed to initialize in time. it was late to the group chat. πŸ™ˆ
  • ral%d: device timeout β€” a frame dispatched to the hardware for transmission did not complete in time. the driver will reset the hardware. and per the original: this should not happen. so if you see it... girl. 🫠

πŸ‘€ SEE ALSO πŸ‘€

the whole friend group: cardbus(4), intro(4), wlan(4), wlan_ccmp(4), wlan_tkip(4), wlan_wep(4), wlan_xauth(4), hostapd(8), ifconfig(8), wpa_supplicant(8)

and also, Ralink Technology, http://www.ralinktech.com/. ✨


πŸ¦‹ HISTORY πŸ¦‹

a little lore drop for you:

  • the ral driver first appeared in OpenBSD 3.7.
  • support for the RT2501 and RT2600 chipsets was added in OpenBSD 3.9.
  • support for the RT2800 chipset was added in OpenBSD 4.3.
  • support for the RT2700 chipset was added in OpenBSD 4.4.
  • support for the RT3090 chipset was added in OpenBSD 4.9.

growth!! evolution!! we love a glow-up arc. πŸ‘‘


πŸ’œ AUTHORS πŸ’œ

the original ral driver was written by Damien Bergamini <damien@openbsd.org>. king behavior, honestly. 🫢


⚠️ CAVEATS ⚠️

okay bestie, sit down, this is the serious part and i'm not sugarcoating it:

  • the ral driver does not make use of the hardware cryptographic engine. no hardware crypto. none. it's just not happening.
  • the ral driver does not support any of the 802.11n capabilities offered by the RT2700 and RT2800 chipsets. additional work is required in before those features can be supported. (that's a direct quote, typo and all, don't @ me.) so yes, the chip can do it and the driver can't. tragic. 🫠
  • Host AP mode does not support power saving. clients attempting to use power saving mode may experience significant packet loss. (disabling power saving on the client will fix this.) so like... just turn it off, bestie.
  • some PCI ral adapters strictly require a system supporting PCI 2.2 or greater. check the board's PCI version before purchasing the card β€” it is likely these adapters will not work in systems based on older revisions of the PCI specification. read before you buy. please. πŸ™

and that's the whole page!! every chipset, every card, every caveat, every %d, all of it. πŸ’–

this lil number came from the Debian crew, dated April 4, 2017, and it lives in section 4 of the manual. mwah, go configure something cute, bestie πŸ’…βœ¨

πŸ“¦ where this page comes from