OnionIoT / setup-wizard

Web interface to setup the Omega for the first time
GNU General Public License v3.0
8 stars 2 forks source link

Initial Setup Didn't Complete and Can't see Wifi nor is serial driver working? #1

Closed edglazer closed 9 years ago

edglazer commented 9 years ago

I started the setup procedure this morning (at home) and the onion omega couldn't connect to my home wifi (though it detected it fine). I tried twice, then came into work. I have it plugged into my work computer, tried the web gui 1st but am not seeing the onion's default wifi. I tried installing the Mac serial driver, and am not seeing the /dev/tty.SLAB* at all.

Both home and work computers were Macs on Yosemite 10.10.5, web gui setup on Chrome version 45.0.2454.99 (64-bit).

Is there a reset procedure? Also a different place to seek support?

greenbreakfast commented 9 years ago

Hi, You can seek support here or you can email us at support@onion.io

When you say it couldn't connect to your home wifi, could you describe what happens in the setup wizard? Also, do you still not see the Omega's default wifi?

As for the serial driver, please try plugging in the Omega, turning it on, waiting for a few minutes, and running the following command in the terminal: ls /dev/tty.*

Thanks, Lazar

edglazer commented 9 years ago

Hi Lazar, thanks for getting back with me! Oddly, I only had problems seeing the Omega's default wifi at work. When I tried it at home later, I could see the Omega's default wifi again. What happens is, after connecting to the wifi I go to the Omega's .local address and see the login. I login with the username root and pw onioneer. Interestingly, I'm almost positive that the username & pw combo always fails the first time.

When I do login, the second screen detects the wifi available, and I select mine from the drop down menu. It auto-detects the security type (wpa2, I believe) and puts the ssid name in automatically as well. I enter the pw, and it churns for several seconds (maybe 30 or more? I haven't timed it), before turning to an error message saying that it cannot connect to wifi, and try again. I try 2-3 more times to no avail.

I'll try the serial driver again later. I think in both cases (work and home) I had the onion turned on and plugged into USB when I tried installing the drivers, so I wonder if that caused any problems...?

greenbreakfast commented 9 years ago

Ah ok, so you get to the wifi connection step, attempt to connect to your network, and it doesn't end up connecting.

There are a few reasons why that might be happening:

Regarding the serial, I don't think it should matter that the Omega was connected and powered on during the installation. Let's try the following steps:

  1. Open a terminal
  2. Plug in the Omega and power it on
  3. Run the following command: screen /dev/tty.SLAB_USBtoUART 115200
  4. Hit the enter key

Assuming that everything is ok with the driver, you should see a bunch of messages that look something like this:

[   12.990000] usbcore: registered new interface driver ums-datafab
[   13.000000] usbcore: registered new interface driver ums-freecom
[   13.000000] usbcore: registered new interface driver ums-isd200
[   13.010000] usbcore: registered new interface driver ums-jumpshot
[   13.020000] usbcore: registered new interface driver ums-karma
[   13.030000] usbcore: registered new interface driver ums-sddr09
[   13.040000] usbcore: registered new interface driver ums-sddr55
[   13.040000] usbcore: registered new interface driver ums-usbat
[   13.060000] usbcore: registered new interface driver usbserial
[   13.060000] usbcore: registered new interface driver usbserial_generic
[   13.070000] usbserial: USB Serial support registered for generic
[   13.100000] xt_time: kernel timezone is -0000
[   13.140000] cfg80211: Calling CRDA to update world regulatory domain
[   13.210000] cfg80211: World regulatory domain updated:
[   13.210000] cfg80211:  DFS Master region: unset

Once those messages stop, press enter again, you will be greeted with this:

BusyBox v1.23.2 (2015-09-25 18:04:12 UTC) built-in shell (ash)

   ____       _             ____
  / __ \___  (_)__  ___    / __ \__ _  ___ ___ ____ _
 / /_/ / _ \/ / _ \/ _ \  / /_/ /  ' \/ -_) _ `/ _ `/
 \____/_//_/_/\___/_//_/  \____/_/_/_/\__/\_, /\_,_/
 W H A T  W I L L  Y O U  I N V E N T ? /___/
 -----------------------------------------------------
 CHAOS CALMER (Chaos Calmer, r47046)
 -----------------------------------------------------
root@Omega-0100:/# 

You will then be logged into the Omega and we can debug further.

Please let me know when you get to this step and we can go from there, or if you have issues with the driver and/or the serial connection.

edglazer commented 9 years ago

Tried the SiLabs driver on a mac 10.9 system and it works. I dug around the SiLabs driver forum and there seemed to be some issues with the driver relating to Yosemite, but with Mavericks the Omega showed up right away once the serial driver was installed.

I did not see any of the usbcore messages, or anything after, but when I hit enter the BusyBox shell appeard. I'm pasting that output below, though I edited out my password, my Omega's designation, and my Omega's wifi MAC address: BusyBox v1.23.2 (2015-09-13 17:56:41 UTC) built-in shell (ash)


/ __ () / __ _ / // / \/ / \/ \ / // / ' \/ -) `/ `/ _/////_//// **////**/, /,/ W H A T W I L L Y O U I N V E N T ? /_/


CHAOS CALMER (Chaos Calmer, r46849)


root@Omega-XXXX:/# wifisetup Onion Omega Wifi Setup

Select from the following: 1) Scan for Wifi networks 2) Type network info q) Exit

Selection: 1 Scanning for wifi networks... [ 53.330000] random: nonblocking pool is initialized

Select Wifi network: 1) K Squared 2) [hidden] 3) HOME-1972 4) joshua 5) xfinitywifi 6) xfinitywifi 7) xfinitywifi

Selection: 1 Network: K Squared Authentication type: psk2 Enter password: xxxxxxxx

Connecting to K Squared network using intf 1... [ 64.560000] wlan0: deauthenticating from bc:xx:xx:xx:xx:xx by local choice (Reason: 3=DEAUTH_LEAVING) [ 65.780000] IPv6: ADDRCONF(NETDEV_UP): wlan0-1: link is not ready [ 66.020000] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready [ 67.460000] wlan0: authenticate with bc:xx:xx:xx:xx:xx [ 67.480000] wlan0: send auth to bc:xx:xx:xx:xx:xx (try 1/3) [ 67.490000] wlan0: authenticated [ 67.510000] wlan0: associate with bc:xx:xx:xx:xx:xx (try 1/3) [ 67.510000] wlan0: RX AssocResp from bc:xx:xx:xx:xx:xx (capab=0x411 status=0 aid=4) [ 67.520000] wlan0: associated [ 67.520000] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready [ 67.550000] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0-1: link becomes ready Checking wwan device status... wwan is up Checking internet connection... ERROR: request timeout, internet connection not successful Done! root@Omega-XXXX:/#

greenbreakfast commented 9 years ago

Ok so it looks like the connection check is unable to reach our servers and it assumes that there is no internet connectivity. So it disables the new network so the AP will still work. (We're still trying to figure out why the AP doesn't work if the other network is wonky).

Not to fear, there's a work around. Enter your wifi info like this:

wifisetup -ssid <your SSID> -password <your password> -auth psk2 

This way, the connection check is skipped and you will for sure be connected to your network.

If the SSID or password have any spaces, you'll have to wrap them with quotes like so:

wifisetup -ssid "My Network" -password "My Password" -auth psk2 

It's a little odd though that it can't connect to our servers. Can you try using the internet with the Omega? Let me know how it goes Also, please run this command:

wifisetup -checkconnection

And paste the output back here. I'd really like to get to the bottom of this issue.

We tested this over and over again but testing is one thing and the field is another. Thank you for your patience.

edglazer commented 9 years ago

Hey, not a problem, I know you all are working on getting something beautiful out into the world, and it aint always easy! I ran the wifisetup with my network info and seemed to connect fine. I tried connecting to the local ip that my wireless router showed for the Omega, but it timed out (maybe that's normal?). Here is the out put of the commands:


CHAOS CALMER (Chaos Calmer, r46849)


root@Omega-XXXX:/# wifisetup -ssid "K Squared" -password "xxxxxxxxxx" -auth psk2

Connecting to K Squared network using intf 1... [ 387.020000] wlan0: deauthenticating from bc:xx:xx:xx:xx:xx by local choice (Reason: 3=DEAUTH_LEAVING) [ 388.230000] IPv6: ADDRCONF(NETDEV_UP): wlan0-1: link is not ready [ 388.490000] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready [ 389.930000] wlan0: authenticate with bc:xx:xx:xx:xx:xx [ 389.950000] wlan0: send auth to bc:xx:xx:xx:xx:xx (try 1/3) [ 389.960000] wlan0: authenticated [ 389.970000] wlan0: associate with bc:xx:xx:xx:xx:xx (try 1/3) [ 389.970000] wlan0: RX AssocResp from bc:xx:xx:xx:xx:xx (capab=0x411 status=0 aid=2) [ 389.980000] wlan0: associated [ 389.980000] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready [ 390.220000] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0-1: link becomes ready Checking wwan device status... wwan is up Done! root@Omega-XXXX:/# wifisetup -checkconnection Checking internet connection... ERROR: request timeout, internet connection not successful Done!

edglazer commented 9 years ago

Just goofing around and looked at the /bin directory to see what is installed, and I noticed something called ipcalc.sh so I ran that with this output: IP=0.0.0.0 NETMASK=0.0.0.0 BROADCAST=255.255.255.255 NETWORK=0.0.0.0 PREFIX=0

if it helps?

greenbreakfast commented 9 years ago

Can you try running ifconfig?

That should show your wifi interfaces and all the associated info:

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:1588 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1588 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:98750 (96.4 KiB)  TX bytes:98750 (96.4 KiB)

wlan0     Link encap:Ethernet  HWaddr 00:23:CD:05:01:01  
          inet addr:192.168.2.19  Bcast:192.168.2.255  Mask:255.255.255.0
          inet6 addr: fe80::223:cdff:fe05:101/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:146 errors:0 dropped:0 overruns:0 frame:0
          TX packets:104 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:18882 (18.4 KiB)  TX bytes:15419 (15.0 KiB)

wlan0-1   Link encap:Ethernet  HWaddr 02:23:CD:05:01:01  
          inet addr:192.168.3.1  Bcast:192.168.3.255  Mask:255.255.255.0
          inet6 addr: fe80::23:cdff:fe05:101/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:34 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:7277 (7.1 KiB)

The lo section should be common to all Omegas, wlan0-1 shows info on Omega's default AP, and wlan0 will show the info for the network to which you are connected.

edglazer commented 9 years ago

Here is the output: lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:12264 errors:0 dropped:0 overruns:0 frame:0 TX packets:12264 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:737760 (720.4 KiB) TX bytes:737760 (720.4 KiB)

wlan0 Link encap:Ethernet HWaddr 40:xx:xx:xx:xx:xx inet addr:192.168.3.57 Bcast:192.168.3.255 Mask:255.255.255.0 inet6 addr: xxxx::xxxx:xxxx:xxxx:472/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:46 errors:0 dropped:0 overruns:0 frame:0 TX packets:39 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:8056 (7.8 KiB) TX bytes:9354 (9.1 KiB)

wlan0-1 Link encap:Ethernet HWaddr 42:xx:xx:xx:xx:xx inet addr:192.168.3.1 Bcast:192.168.3.255 Mask:255.255.255.0 inet6 addr: xxxx::xxxx:xxxx:xxxx:472/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:38 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:7815 (7.6 KiB)

greenbreakfast commented 9 years ago

It looks like the issue is that the Omega's default AP network and your home wifi network are both on the same 192.168.3.x subnet. This causes collisions and is likely why the Omega cannot connect to the internet.

There are two possible solutions:

Disable the Omega's AP

Run the following command:

wifisetup -killap

The Omega AP will be disabled, no more collisions.

Change the subnet of Omega's AP

Run the following commands:

uci set network.wlan.ipaddr='192.168.4.1'
uci commit network
/etc/init.d/network restart

Wait a little and the subnet should be changed, no more collisions. Run ifconfig again and ensure the inet addr field for wlan0-1 matches the uci set command above. Note that for the IP address used in uci set above, any valid IP address will work.

Either of these solutions should fix the issue. Please let me know if the issue still persists.

edglazer commented 9 years ago

Changing the subnet of Omega's AP seemed to do the trick! Thanks!

greenbreakfast commented 9 years ago

no prob, glad it worked out!