# Problem connecting to wifi network

**URL:** <https://forums.balena.io/t/problem-connecting-to-wifi-network/132107>\
**Category:** Product support\
**Tags:** wifi\
**Created:** [June 13, 2020, 3:49am UTC](https://forums.balena.io/t/problem-connecting-to-wifi-network/132107 "2020-06-13T03:49:01Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![thomas.cullen](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/thomas.cullen/32/3985_2.png) [@thomas.cullen](https://forums.balena.io/u/thomas.cullen)\
**Post date:** [June 13, 2020, 3:49am UTC](https://forums.balena.io/t/problem-connecting-to-wifi-network/132107/1 "2020-06-13T03:49:01Z")

</div>

Hi, so I entered the proper credentials for my 5Ghz WiFi network into Balena cloud the first time around, and my raspberry pi 4 would not connect to wifi during its boot process. I tried redoing the image by entering in the proper credentials for my 2.4Ghz network. That did not work either, but everything works just fine when I plug the Rpi4 in via ethernet. When I look at the troubleshoot page, I see that I could look at the “system-connections/resin-wifi” in the SD image to see what is there that could be causing an issue. I got this as a result, can you help me figure out what the issue is with connectivity?  
Thanks.

 ![Screen Shot 2020-06-12 at 11.43.38 PM](https://global.discourse-cdn.com/balena/original/2X/d/d14d929e4e511ae198aeb453c5790d1ed7d82fc4.png)

---

<div class="post-metadata">

**Author:** ![srlowe](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/srlowe/32/2638_2.png) [@srlowe](https://forums.balena.io/u/srlowe)\
**Post date:** [June 15, 2020, 11:25am UTC](https://forums.balena.io/t/problem-connecting-to-wifi-network/132107/6 "2020-06-15T11:25:55Z")

</div>

Hello, Are you sure that’s the contents of the file? There’s a sample of what it should contain here:  
[https://www.balena.io/docs/reference/OS/network/2.x/#wifi-setup](https://www.balena.io/docs/reference/OS/network/2.x/#wifi-setup)  
There’s also a template file resin-sample.ignore in the system-connections directory.  
Would you also be able to paste the directory listing of the files you see in system-connections?  
Thank you

---

<div class="post-metadata">

**Author:** ![thomas.cullen](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/thomas.cullen/32/3985_2.png) [@thomas.cullen](https://forums.balena.io/u/thomas.cullen)\
**Post date:** [June 15, 2020, 4:56pm UTC](https://forums.balena.io/t/problem-connecting-to-wifi-network/132107/8 "2020-06-15T16:56:22Z")

</div>

Here is a screenshot of the resin-sample.ignore template looks like.

 ![Screen Shot 2020-06-15 at 12.54.23 PM](https://global.discourse-cdn.com/balena/original/2X/1/14730c982de37ecfdfed4c96de1b42cf0b58dd4d.png)

---

<div class="post-metadata">

**Author:** ![pipex](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/pipex/32/4840_2.png) [@pipex](https://forums.balena.io/u/pipex)\
**Post date:** [June 15, 2020, 6:01pm UTC](https://forums.balena.io/t/problem-connecting-to-wifi-network/132107/11 "2020-06-15T18:01:13Z")

</div>

Hi, indeed the resin-wifi file in the system connections should have that structure. Could you log into your device and share the listing on the directory `/mnt/boot/system-connections` to see if it matches the one on the volume?

You can log to the device using the web dashboard on the device summary \> Terminal \> Host OS or by using the CLI as in [these instructions](https://www.balena.io/docs/learn/manage/ssh-access/#using-balena-ssh-from-the-cli)

Once in there, you can use the command `ls /mnt/boot/system-connections` to see the configuration files actually loaded into the device.

---

<div class="post-metadata">

**Author:** ![thomas.cullen](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/thomas.cullen/32/3985_2.png) [@thomas.cullen](https://forums.balena.io/u/thomas.cullen)\
**Post date:** [June 15, 2020, 7:33pm UTC](https://forums.balena.io/t/problem-connecting-to-wifi-network/132107/13 "2020-06-15T19:33:56Z")

</div>

Yes, the data seems to be loaded onto the SD card successfully. I tried reflashing the SD card as a new device, but I still got the same error that there was no network connection. I plugged the device in via ethernet and that allowed me to access it via the dashboard. I know that my Rpi4’s wireless radios work b.c I used to have raspbian os running on it for a different project and I had no issues there.

 ![Screen Shot 2020-06-15 at 3.30.39 PM](https://global.discourse-cdn.com/balena/original/2X/c/c82f4bed896b951a89c3f9abeeb81cac544ab205.png)

---

<div class="post-metadata">

**Author:** ![tmigone](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/tmigone/32/2814_2.png) [@tmigone](https://forums.balena.io/u/tmigone)\
**Post date:** [June 15, 2020, 7:43pm UTC](https://forums.balena.io/t/problem-connecting-to-wifi-network/132107/14 "2020-06-15T19:43:07Z")

</div>

Hey, can you verify that the OS is seeing the pi radios? Try running `ifconfig` on the HostOS as described before and look for `wlan` entries.

---

<div class="post-metadata">

**Author:** ![tmigone](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/tmigone/32/2814_2.png) [@tmigone](https://forums.balena.io/u/tmigone)\
**Post date:** [June 15, 2020, 7:43pm UTC](https://forums.balena.io/t/problem-connecting-to-wifi-network/132107/15 "2020-06-15T19:43:42Z")

</div>

Also, we created a project to change wifi settings easily, perhaps it could be of use: [https://github.com/balena-io/wifi-connect/](https://github.com/balena-io/wifi-connect/)

---

<div class="post-metadata">

**Author:** ![floion](https://avatars.discourse-cdn.com/v4/letter/f/45deac/32.png) [@floion](https://forums.balena.io/u/floion)\
**Post date:** [June 15, 2020, 7:47pm UTC](https://forums.balena.io/t/problem-connecting-to-wifi-network/132107/18 "2020-06-15T19:47:11Z")

</div>

Hi, also please make sure the connections file does not contain erroneous new line chars due to bad pasting.

---

<div class="post-metadata">

**Author:** ![thomas.cullen](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/thomas.cullen/32/3985_2.png) [@thomas.cullen](https://forums.balena.io/u/thomas.cullen)\
**Post date:** [June 15, 2020, 8:26pm UTC](https://forums.balena.io/t/problem-connecting-to-wifi-network/132107/19 "2020-06-15T20:26:27Z")

</div>

I see a wlan0 entry at the very bottom, does the attached image reveal any new information that I am not seeing? It seems that the fact that a wlan entry came up means that balenaOS is seeing the wifi radios, correct?

 ![Screen Shot 2020-06-15 at 4.25.25 PM](https://global.discourse-cdn.com/balena/original/2X/4/429ff733826722e7895a5b9dc0fb1b3dafb58f12.png)

---

<div class="post-metadata">

**Author:** ![thomas.cullen](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/thomas.cullen/32/3985_2.png) [@thomas.cullen](https://forums.balena.io/u/thomas.cullen)\
**Post date:** [June 15, 2020, 8:27pm UTC](https://forums.balena.io/t/problem-connecting-to-wifi-network/132107/20 "2020-06-15T20:27:39Z")

</div>

I will take a look at that posting. thanks!

---

<div class="post-metadata">

**Author:** ![thomas.cullen](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/thomas.cullen/32/3985_2.png) [@thomas.cullen](https://forums.balena.io/u/thomas.cullen)\
**Post date:** [June 15, 2020, 8:33pm UTC](https://forums.balena.io/t/problem-connecting-to-wifi-network/132107/21 "2020-06-15T20:33:22Z")

</div>

When I did the reflashing of the SD card, I did not manually edit the connection file, so im assuming that there should be no issues with it since it would have been automatically generated.

---

<div class="post-metadata">

**Author:** ![floion](https://avatars.discourse-cdn.com/v4/letter/f/45deac/32.png) [@floion](https://forums.balena.io/u/floion)\
**Post date:** [June 15, 2020, 8:49pm UTC](https://forums.balena.io/t/problem-connecting-to-wifi-network/132107/22 "2020-06-15T20:49:13Z")

</div>

Can you also share the uuid of the device, share it with us and enable support access for that device so we can login remotely and try to diagnose?

---

<div class="post-metadata">

**Author:** ![thomas.cullen](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/thomas.cullen/32/3985_2.png) [@thomas.cullen](https://forums.balena.io/u/thomas.cullen)\
**Post date:** [June 15, 2020, 10:41pm UTC](https://forums.balena.io/t/problem-connecting-to-wifi-network/132107/24 "2020-06-15T22:41:21Z")

</div>

UUID: 74999731ecd3e3b79940fdebd9e2f23a  
1 week support access granted.

---

<div class="post-metadata">

**Author:** ![floion](https://avatars.discourse-cdn.com/v4/letter/f/45deac/32.png) [@floion](https://forums.balena.io/u/floion)\
**Post date:** [June 15, 2020, 10:54pm UTC](https://forums.balena.io/t/problem-connecting-to-wifi-network/132107/25 "2020-06-15T22:54:35Z")

</div>

Hi, just checked your device and saw you had the credentials there for the 5 GHz network. I believe you need to set the requlatory domain as described here: [https://www.balena.io/docs/reference/OS/network/2.x/#regulatory-domain](https://www.balena.io/docs/reference/OS/network/2.x/#regulatory-domain)  
Give that a test and let us know

---

<div class="post-metadata">

**Author:** ![thomas.cullen](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/thomas.cullen/32/3985_2.png) [@thomas.cullen](https://forums.balena.io/u/thomas.cullen)\
**Post date:** [June 16, 2020, 2:39am UTC](https://forums.balena.io/t/problem-connecting-to-wifi-network/132107/27 "2020-06-16T02:39:29Z")

</div>

I looked in the config.json file and I see nothing there that allows me to specify a country. All I see is…

```auto
{"apiEndpoint":"https://api.balena-cloud.com","appUpdatePollInterval":900000,"applicationId":" ****","deltaEndpoint":"https://delta.balena-cloud.com","deviceApiKey":"****","deviceApiKeys":{"api.balena-cloud.com":" ****"},"deviceType":"raspberrypi4-64","listenPort":"48484","mixpanelToken":"9ef939ea64cb6cd8bbc96af72345d70d","registryEndpoint":"registry2.balena-cloud.com","userId":"****","vpnEndpoint":"vpn.balena-cloud.com","vpnPort":"443","uuid":"74999731ecd3e3b79940fdebd9e2f23a","registered_at":1592249331413,"deviceId": **** }

```

---

<div class="post-metadata">

**Author:** ![dfunckt](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/dfunckt/32/56_2.png) [@dfunckt](https://forums.balena.io/u/dfunckt)\
**Post date:** [June 16, 2020, 8:41am UTC](https://forums.balena.io/t/problem-connecting-to-wifi-network/132107/29 "2020-06-16T08:41:37Z")

</div>

Hey @thomas.cullen, _never_ blindly paste text on public forums. The config.json you pasted above contained the device API key, among other stuff, which I’ve edited out.

---

<div class="post-metadata">

**Author:** ![shaunmulligan](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/shaunmulligan/32/34_2.png) [@shaunmulligan](https://forums.balena.io/u/shaunmulligan)\
**Post date:** [June 16, 2020, 9:04am UTC](https://forums.balena.io/t/problem-connecting-to-wifi-network/132107/30 "2020-06-16T09:04:35Z")

</div>

hey @thomas.cullen you should just be able to add it to the end of the `json` file so just include it inside the last `}` as `"country":"GB"` and that should work.

---

<div class="post-metadata">

**Author:** ![thomas.cullen](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/thomas.cullen/32/3985_2.png) [@thomas.cullen](https://forums.balena.io/u/thomas.cullen)\
**Post date:** [June 16, 2020, 9:54pm UTC](https://forums.balena.io/t/problem-connecting-to-wifi-network/132107/32 "2020-06-16T21:54:22Z")

</div>

Thank you! it seems to have fixed the problem.
