Giter Club home page Giter Club logo

urtwm's Introduction

urtwm

FreeBSD driver for RTL8812AU/RTL8821AU

How-to-build:

  1. Clone / download this repository.
  2. Apply 'patch-usbdevs.diff' to your source tree checkout; e.g.
    cd /usr/src/ && svn patch <patch-usbdevs.diff location>
  3. Build and install firmware:
    cd <repository location>/sys/modules/urtwmfw && make && make install
  4. Build and install driver:
    cd ../urtwm && make && make install

How-to-test:

  1. Load the driver:
    kldload if_urtwm
    In case if device was recognized successfully driver will report about that:

urtwm0: <802.11n WLAN Adapter> on usbus4
urtwm0: MAC/BB RTL8821AU, RF 6052 1T1R

or

urtwm0: MAC/BB RTL8812AU, RF 6052 2T2R

  1. Load necessary modules (if not already loaded):
    kldload wlan_amrr wlan_ccmp wlan_tkip wlan_wep
  2. Create wlan(4) interface:
    ifconfig wlan1 create wlandev urtwm0
  3. Start wpa_supplicant(8):
    wpa_supplicant -i wlan1 -c /etc/wpa_supplicant.conf
  4. Start dhclient(8) after association / 4-Way handshake:
    dhclient wlan1

urtwm's People

Contributors

s3erios avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

urtwm's Issues

openbsd

hi,
the alfa AWUS036ACH has the chipset Realtek RTL8812AU,
can i build the driver in openbsd?

Is b/g/n/ac standard available?

Hi s3erios!

I am appreciate that someone is working on freebsd wireless drivers for modern wifi adapters. Thank you so much!

Would you kindly tell me, is ac available? Or you have any plans to implement it?

I'd like to achieve >500 Mbps via Netis WF2190 under FreeBSD :)

Best wishes, Xdevelnet.

No luck with Noname 1200AC wifi

I recently got a no-name usb wireless interface and tried to get it to work with this driver.

ugen1.3: <Realtek USB3.0 802.11ac 1200M Adapter> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA)

bLength = 0x0012
bDescriptorType = 0x0001
bcdUSB = 0x0210
bDeviceClass = 0x0000
bDeviceSubClass = 0x0000
bDeviceProtocol = 0x0000
bMaxPacketSize0 = 0x0040
idVendor = 0x0bda
idProduct = 0xb812
bcdDevice = 0x0210
iManufacturer = 0x0001
iProduct = 0x0002 <USB3.0 802.11ac 1200M Adapter>
iSerialNumber = 0x0003 <123456>
bNumConfigurations = 0x0001

In linux's rtl8812au driver I found the following lines so I decided to give urtwm a try:
#ifdef CONFIG_RTL8822B
/=== Realtek demoboard ===/
{USB_DEVICE_AND_INTERFACE_INFO(USB_VENDER_ID_REALTEK, 0xB82C, 0xff, 0xff, 0xff), .driver_info = RTL8822B}, /* Default ID for USB multi-function /
{USB_DEVICE_AND_INTERFACE_INFO(USB_VENDER_ID_REALTEK, 0xB812, 0xff, 0xff, 0xff), .driver_info = RTL8822B}, /
Default ID for USB Single-function, WiFi only /
#endif /
CONFIG_RTL8822B */

At first it was not recognized by the driver that was quickly fixed this way:
in sys/modules/urtwm/usbdevs.h:
#define USB_PRODUCT_REALTEK_8812AU 0xB812 /* AmazonNoName */
in if_urtwm.c line 134:
URTWM_RTL8812A_DEV(REALTEK, 8812AU),
and finally in /usr/src/sys/dev/usb/usbdevs:
product REALTEK 8812AU 0xB812 AmazonNoName

The driver compiles and sees the adapter but it looks like it is not enough:
root@tirpitz:~ # kldload if_urtwm
-> I get in /var/log/messages
Nov 16 21:47:54 tirpitz kernel: urtwm0: <USB3.0 802.11ac 1200M Adapter> on usbus1
Nov 16 21:47:54 tirpitz kernel: urtwm0: MAC/BB RTL8812AU, RF 6052 2T2R

Then:
root@tirpitz:~ # ifconfig wlan1 create wlandev urtwm0

However there is no mac address shown in ifconfig
wlan1: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=200001<RXCSUM,RXCSUM_IPV6>
ether ff:ff:ff:ff:ff:ff
hwaddr ff:ff:ff:ff:ff:ff
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
status: no carrier
ssid "" channel 1 (2412 MHz 11b)
regdomain FCC country US authmode OPEN privacy OFF txpower 30 bmiss 7
scanvalid 60 wme bintval 0
groups: wlan

And in /var/log/messages
Nov 16 21:49:00 tirpitz kernel: wlan1: Ethernet address: ff:ff:ff:ff:ff:ff
Nov 16 21:52:59 tirpitz kernel: urtwm0: urtwm_r12a_power_off: failed to block Tx queues

Of course I can't associate it with any essid or do anaything useful past that point.
Obviously if Linux has a specific #define it is there for a good reason, these noname realtek adapters are best sellers on amazon I think it would be great to have support for them of FreeBSD.

IDK what I can do to help however.

Build breaks with 12

/usr/home/sw/urtwm/sys/modules/urtwm/../../dev/urtwm/if_urtwm.c:6513:4: error: no member named 'tqh_first' in 'struct ifmultihead'; did you mean 'cstqh_first'?
                        TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
                        ^
/usr/src/sys/sys/queue.h:724:15: note: expanded from macro 'TAILQ_FOREACH'
        for ((var) = TAILQ_FIRST((head));                               \
                     ^
/usr/home/sw/urtwm/sys/modules/urtwm/../../dev/urtwm/if_urtwm.c:6513:4: error: no member named 'tqe_next' in 'struct ifmultiaddr::(anonymous at
      /usr/src/sys/net/if_var.h:548:2)'; did you mean 'cstqe_next'?
                        TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
                        ^

Compile the drivers for Pfsense

Hello, I am a French user, more used to Linux, but I got started with Freebsd, following the installation of a Firewall (Pfsense).

I bought a usb wifi dongle, with a rtl 8811 chipset, but Pfsense is supplied with no compilation tool, then I compliler on another machine equipped with Freebsd, could you guide me a little?

thank you in advance

Manu

in french

Bonjour, je suis un utilisateur français, plus habitué à Linux, mais je me suis mis à Freebsd, suite à la mise en place d'un Firewall (Pfsense).

J'ai acheté un dongle wifi usb, avec un chipset rtl 8811, mais Pfsense est fournit avec aucun outil de compilation, puis je compliler sur une autre machine équipé de Freebsd, pourriez vous me guider un peu ?

Merci d'avance

Manu

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.