# Issue with WiFi Networks that have an SSID with Spaces



## The Bird Dog (Nov 28, 2022)

Not sure if this is already a known issue, but I discovered a problem with identifying and connecting to WiFi networks that have a space character in the network SSID. This was specifically a problem with FreeBSD unable to connect an iPhone hot spot which uses the device's name as the SSID for the wireless network that it projects. 

For example, if my phone's name is "Frank's iPhone" and the hot spot feature is enabled, FreeBSD would detect that the wireless network exists but couldn't capture the SSID of the network. It would instead represent the network using what appeared to be a hexadecimal address. Attempting to connect to the network would fail. 

The issue could be replicated by running the following command: `ifconfig wlan0 up scan`

Likewise, the commonly used tool "WiFi Networks Manager", version 1.23, would produce the same result within it's graphical user interface.

Using the above example, if the phone was renamed to "Frank" and the hot spot feature remained enabled, FreeBSD could then detect that the wireless network exists, print out the SSID ("Frank"), and successfully connect to the network.

This is an issue within the following FreeBSD operating system: FreeBSD 13.1-RELEASE-p2 amd64


----------



## T-Daemon (Nov 28, 2022)

Have you enclosed the SSID with space in quote marks?

wpa_supplicant.conf(5)

```
GLOBAL PARAMETERS
     Default parameters used by wpa_supplicant(8) may be overridden by
     specifying

           parameter=value

     in the configuration file (note no spaces are allowed).  *Values with
     embedded spaces must be enclosed in quote marks.*
```


```
network={
    ssid="Frank's iPhone"
```

Works with Android, with the above ssid set.


----------



## The Bird Dog (Nov 29, 2022)

T-Daemon said:


> Have you enclosed the SSID with space in quote marks?
> 
> wpa_supplicant.conf(5)
> 
> ...


Seems like manually editing the wpa_supplicant.conf file will solve the problem as a workaround. 

However, I'm curious as to whether the underlying issue could somehow be resolved when the network is first detected via a scan?


----------



## T-Daemon (Nov 30, 2022)

The Bird Dog said:


> However, I'm curious as to whether the underlying issue could somehow be resolved when the network is first detected via a scan?





The Bird Dog said:


> Likewise, the commonly used tool "WiFi Networks Manager", version 1.23, would produce the same result within it's graphical user interface.


Just checked net-mgmt/wifimgr. It encloses SSIDs with space in quote marks. Not sure why it didn't work for you.


----------

