# WiFi Client Scan & Connect - Error

**URL:** <https://forum.legato.io/t/wifi-client-scan-connect-error/2270>\
**Category:** Uncategorized\
**Created:** [November 25, 2016, 3:20pm UTC](https://forum.legato.io/t/wifi-client-scan-connect-error/2270 "2016-11-25T15:20:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![klewis](https://avatars.discourse-cdn.com/v4/letter/k/b4bc9f/32.png) [@klewis](https://forum.legato.io/u/klewis)\
**Post date:** [November 25, 2016, 3:20pm UTC](https://forum.legato.io/t/wifi-client-scan-connect-error/2270/1 "2016-11-25T15:20:10Z")

</div>

I am attempting to connect to a WiFi access point but I have been having issues. The first time I was able to set the security and the passphrase but could not connect. I would consistently get an error or -6.

root@swi-mdm9x15:~# wifi client connect 0x10000001  
ERROR: le\_wifiClient\_Connect returns error code -6  
root@swi-mdm9x15:~#

I moved to another access point as I thought the issue might be the passphrase had spaces in it. With the spaces I was not sure how to set up teh pass phrase, do you need quotes or not and will it eve work if there are spaces. I tried with and without quotes but still got the -6 error.

When attempting on the second access point all I got when attempting a scan was:

root@swi-mdm9x15:~# wifi client scan  
starting scan  
DEBUG: le\_wifiClient\_GetFirstAccessPoint ERRORroot@swi-mdm9x15:~#

If there are any suggestions as to what I may have changed or done incorrectly I would appreciate the help.

Thankfully  
Kas

 ![](https://us1.discourse-cdn.com/flex019/uploads/legato1/original/1X/021a1452414421f595203bbdec45866788b577ba.png)

---

<div class="post-metadata">

**Author:** ![JimmyHuang0904](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jimmyhuang0904/32/245_2.png) [@JimmyHuang0904](https://forum.legato.io/u/JimmyHuang0904)\
**Post date:** [October 14, 2017, 12:12am UTC](https://forum.legato.io/t/wifi-client-scan-connect-error/2270/2 "2017-10-14T00:12:49Z")

</div>

I have had this error before.

First, make sure any of your apps such as the one you have _timerLed_ does not use any of the IoT GPIOs where your wifi card is (typically IoT0).

Also, before you run $ **wifi client scan** , you should run

root@swi-mdm9x15:~# **wifi client start**

only once. I noticed that if you run that command more than once, sometimes the $ **wifi client scan** throws the error you have. If you accidentally do this, just reboot your target. If that doesn’t fix it, I suggest you update your firmware version first.
