> For the complete documentation index, see [llms.txt](https://notes.lcsrg.me/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://notes.lcsrg.me/home-setup/raspberry/wifi-usb.md).

# WiFi USB

For this step we need internet connection. Make sure that the raspberry is connected with an ethernet cable.

Check with `ifconfig` available connectons

```
$ ifconfig -a
...
wlan0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 
       ether b0:a7:b9:ce:d3:58 txqueuelen 1000 (Ethernet)
       RX packets 0 bytes 0 (0.0 B)
       RX errors 0 dropped 0 overruns 0 frame 0
       TX packets 0 bytes 0 (0.0 B)
       TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
```

We observe that there is no IP associated to `wlan0` interface. Let' change that. Run the following command and copy it to the clipboard.

```
$ wpa_passphrase [SSID] [SSID_PASSWORD]
```

where `SSID` and `SSID_PASSWORD` are the network name and password, respectively. Then open the file `wpa_supplicant.conf`&#x20;

```
$ sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
```

and paste the content at the end. Also, add four additonal fields. At the end you should have somethng like below:

{% code title="/etc/wpa\_supplicant/wpa\_supplicant.conf" %}

```
network={
        ssid=[SSID]
        psk=[SSID_PASSWORD_PSK]
        proto=RSN
        key_mgmt=WPA-PSK
        pairwise=CCMP
        group=CCMP
}
```

{% endcode %}

Finally, reboot the raspberry and it should connect to the network by default.

```
$ sudo reboot
```

{% hint style="info" %}
[*How to Set Up a USB Wi-Fi Adapter With the Raspberry Pi*](https://www.lifewire.com/usb-wifi-adapter-raspberry-pi-4058093)*,* lifewire.com, August 25th 2021
{% endhint %}

## Additionally

You can set a static IP this wirelessconnectin, just as you dit with the wire d connection in section [Set static IP](/home-setup/raspberry/untitled.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://notes.lcsrg.me/home-setup/raspberry/wifi-usb.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
