--- title: "Connecting to unencrypted WiFi networks" weight: 40 --- # Connecting to unencrypted WiFi networks Remember that using an unencrypted WiFi network means anyone in range can read your communication. Hence, we strongly recommend [using TLS for accessing the gokrazy web interface and doing updates](/userguide/tls-for-untrusted-networks/). To make gokrazy connect to a WiFi network, first include the `github.com/gokrazy/wifi` package in your `gokr-packer` command line, e.g.: ```shell gokr-packer \ -tls=self-signed \ -update=yes \ github.com/gokrazy/hello \ github.com/gokrazy/breakglass \ github.com/gokrazy/serial-busybox \ github.com/gokrazy/wifi ``` Then, configure the `wifi` program by creating the file `wifi.json` on the permanent data partition: ```shell # The following assumes you already created a file system # on the permanent data partition. Otherwise, please use: # sudo mkfs.ext4 /dev/disk/by-partuuid/2e18c40c-04 sudo mount /dev/disk/by-partuuid/2e18c40c-04 /mnt echo '{"ssid": "I/O Tee"}' | sudo tee /mnt/wifi.json sudo umount /mnt ``` After starting gokrazy, the `wifi` program will connect to the WiFi network `I/O Tee`: ## For debugging: known-working WiFi router setup In case you have trouble getting your Raspberry Pi to connect to your network, this is how I set up my [TP-LINK TL-WDR4300](https://openwrt.org/toh/tp-link/tl-wdr4300) with [OpenWrt 19.07](https://openwrt.org/): The MAC address filter isn’t a security measure, but prevents others from accidentally joining this open network.