Wifi setup

Expansion modules and attachments
Post Reply
barbianj
Posts: 56
Joined: Sat Jul 21, 2012 12:25 pm

Wifi setup

Post by barbianj »

I have the RA+, and just received the wifi attachment. Following the RA wifi attachment manual, the colors on my cable don't match the cable in the manual. How do I find the correct way to make the connections? Is this manual the right place to start? Thanks.
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Wifi setup

Post by rimai »

It should be the same.
Can you take a photo and post here?
Roberto.
barbianj
Posts: 56
Joined: Sat Jul 21, 2012 12:25 pm

Re: Wifi setup

Post by barbianj »

Image

Image
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Wifi setup

Post by rimai »

The first one is used to connect the controller to the wifi attachment after it has been configured.
The second one is the cable you need to use to program the wifi. You use the same USB-TTL cable that is used for programming RA, to program the wifi attachment.
Image
Roberto.
barbianj
Posts: 56
Joined: Sat Jul 21, 2012 12:25 pm

Re: Wifi setup

Post by barbianj »

Okay, I got it. The wires are not exactly the same, but they get connected the same in reference to the black wire. I knew it would be stupidly easy. :oops:

I did get the wifi running tonight. I had trouble initially, though, because I followed the manual v1.5, and got stuck at this point:

2. Open the wifi setup code by going to menu File->Sketchbook->Example Codes and selecting WifiSetup
3. Modify the settings to match your own wifi authentication

Things seemed like they didn't make sense, and seemed harder than they should be. I did a search, and found your thread "How to setup your wifi attachment" here:

http://forum.reefangel.com/viewtopic.ph ... fi+utility

From a complete noob point of view, it was difficult to find the most up to date information. Having the wifi thread in PDE/INO files was not obvious to me, I'm still trying to wrap my head around everything. Using the stickied thread literally took less than five minutes to get the wifi running, but I spent a couple of hours up to that point. Working great now, though, thanks Roberto. :D
Image
barbianj
Posts: 56
Joined: Sat Jul 21, 2012 12:25 pm

Re: Wifi setup

Post by barbianj »

Had everything working right, then got unreachable address in connection status. Buttons display properly, but don't work. Went into the router settings, and the IP was changed from 9 to 2. If I use the 2 with the /wifi setting, I can operate the controller through the web page, but if I use the 2 on the portal page, it doesn't work. How did this change after it was initially setup?
Image
barbianj
Posts: 56
Joined: Sat Jul 21, 2012 12:25 pm

Re: Wifi setup

Post by barbianj »

After I clear the Portal wifi address, it reports back my static IP address.
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Wifi setup

Post by rimai »

Your router can change ip addresses and the wifi attachment can also change ip addresses.
You can do a dhcp reservation on the router, so the wifi attachment will always use the same ip address.
The reason your portal ip address changes back is because the portal will log the ip address of your controller everytime it receives data. This way, you don't need to worry about dynamic dns setup. So, if your router changes ip address, the portal will know and change it by itself too.
Roberto.
barbianj
Posts: 56
Joined: Sat Jul 21, 2012 12:25 pm

Re: Wifi setup

Post by barbianj »

I guess I asked the wrong question. I know why the IP address changed, I don't understand why everything worked at one point, but now it doesn't.

I was able to control all of the switches through the Portal. Now, it displays everything correctly, but when I click on a button, it says that it's only available with a valid wifi address. The Portal states: Connection Status: Unreachable Address

When I run http://192.168.2.9:2000/wifi in the browser, all of the buttons function correctly. I can turn lights on and off.

I re-ran the wifi setup utility, and it gave the same IP address as yesterday. I went into the router settings and gave the wifi a reserved IP address of 192.168.2.9

If it helps, here is the utility log:


Opening Serial Port...
Verifying speed at 9600 baud
Connected to serial port COM3
> $$$
> set u b 57600
> set s p 0
> save
> reboot
Verifying speed at 57600 baud
Removing connection to COM3
Connected to serial port COM3
> $$$
< CMD
Wifi is communicating at 57600 baud rate

> reboot
< reboot
Removing connection to COM3
---------------------------------------------------------------------
Wifi Attachment Connected to COM3
---------------------------------------------------------------------

Opening Serial Port...
Connected to serial port COM3
> $$$
< CMD
> ls
< ls
<
< FL# SIZ FLAGS
< 2 20 3 WiFly_GSX-2.32
< 22 11 3 wps_app
< 33 1 10 config
< 34 20 3 WiFly_GSX-2.35
< 54 11 3 wps_app
< 65 1 10 user
<
< 190 Free, Boot=34, Backup=2
< <2.35>
> load user
< load user
< AOK
< <2.35>
> save
< save
< Storing in config
< <2.35>
> save
< save
< Storing in config
< <2.35>
> set o d ReefAngelWifi
< set o d ReefAngelWifi
< AOK
< <2.35>
> set w s BarbianHome$N+
< set w s BarbianHome$N+
< AOK
< <2.35>
> set w p 1343740090
< set w p 1343740090
< AOK
< <2.35>
> set w k 00000000000000000000000000
< set w k 00000000000000000000000000
< AOK
< <2.35>
> set ftp address 208.109.xxx
< set ftp address 208.109.xxx
< AOK
< <2.35>
> save
< save
< Storing in config
< <2.35>
> reboot
< reboot
> $$$
< CMD
< Disconn from BarbianHome N+,AUTH-ERR
< Auto-Assoc BarbianHome N+ chan=7 mode=WPA2 SCAN OK
< Joining BarbianHome N+ now..
< Associated!
< DHCP: Start
< DHCP in 827ms, lease=283824000s
< IF=UP
< DHCP=ON
< IP=192.168.2.9:2000
< NM=255.255.255.0
< GW=192.168.2.1
< Listen on 2000
> get i
< get i
< IF=UP
< DHCP=ON
< IP=192.168.2.9:2000
< NM=255.255.255.0
< GW=192.xxx
< HOST=198.xxx
< PROTO=TCP,
< MTU=1524
< FLAGS=0x6
< TCPMODE=0x0
< BACKUP=0.0.0.0
< <2.35>
> reboot
< reboot
Removing connection to COM3
---------------------------------------------------------------------
Your Reef Angel Wifi Attachment is now configured with the settings provided.
---------------------------------------------------------------------

If the blue LED is still blinking, it means that the Reef Angel Wifi Attachment could not connect to your wifi network.

Found router N Plus Wireless Router

Port 2000 is now being forwarded to 192.168.2.9
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Wifi setup

Post by rimai »

I don't think there is nothing wrong with the wifi settings.
I think you need to check your router port forwarding settings.
The wifi utility does setup uPnP for you as indicated by the line "Port 2000 is now being forwarded to 192.168.2.9", but uPnP is a temporary setting on the router. If/when your router gets rebooted, it will loose this temporary forwarding setting.
Roberto.
barbianj
Posts: 56
Joined: Sat Jul 21, 2012 12:25 pm

Re: Wifi setup

Post by barbianj »

Thanks for the late night reply, Roberto. Last night, I manually setup the port forwarding in the router, but could not confirm that the port was active, even with all firewalls off. Some of the info is getting through, because I can see data, but the control part is not functioning. I am going to try a different router this weekend.
Image
barbianj
Posts: 56
Joined: Sat Jul 21, 2012 12:25 pm

Re: Wifi setup

Post by barbianj »

Okay, apparently everything is working. The Portal had updated the wifi address on it's own at some point. I wrote it down, and tried that address in my phone, and it worked. Something like 65.30.xxx.xxx:2000, which is the address of my wireless router. I thought I had to put in the wifi attachment address, like 192.168.1.3:2000.

The weird thing is that I was stuck trying to get the port forwarding to work. I got the router updated with the port 2000, but with the Simple Port Forwarding program would only report a fail.

The Android Reef Angel Status app works, and I can use the Portal controls from my phone. I hope I wake up tomorrow and it still works. :lol:
Image
barbianj
Posts: 56
Joined: Sat Jul 21, 2012 12:25 pm

Re: Wifi setup

Post by barbianj »

Errr...except my banner is not correct. My return pump is on, and everything else off.
Image
barbianj
Posts: 56
Joined: Sat Jul 21, 2012 12:25 pm

Re: Wifi setup

Post by barbianj »

Nevermind, now that updated correctly. Aaarg.
Image
Post Reply