WiFi Attachment - Static IP on device

Basic / Standard Reef Angel hardware
Post Reply
aranax
Posts: 120
Joined: Thu Jun 02, 2011 11:54 pm

WiFi Attachment - Static IP on device

Post by aranax »

Hey guys,
I there a way to setup a static ip on the wifi attachment? I had everything working perfectly for years but I have recently updated my router to one that does not allow IP reservation via MAC address (u-verse : Motorola NVG510). All the passthrough and cascaded router instructions for the NVG510 don't work. However, the router can detect a static IP so I think the easiest route would be to assign an IP on the wifi attachment itself. I did not see this option in the setup utility.

Does any have any suggestions to get around the lack of IP reservation on my router? Thanks.

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

Re: WiFi Attachment - Static IP on device

Post by rimai »

You will need to use tera term.
The commands are:

Code: Select all

set ip address xxx.xxx.xxx.xxx
set ip gateway xxx.xxx.xxx.xxx
I think these 2 should do it for you.
This is the manufacturer's manual if you havee specific questions:
http://ww1.microchip.com/downloads/en/D ... 02230A.pdf
Roberto.
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: WiFi Attachment - Static IP on device

Post by binder »

You might also need the command to disable DHCP.

Code: Select all

set ip dhcp 0
fit
Posts: 28
Joined: Mon Dec 07, 2015 1:28 pm

Re: WiFi Attachment - Static IP on device

Post by fit »

I have the same Uverse NVG510. I am very new to Reef Angel and to this router thing.

I have used the WiFi Attachment Setup Utility, but the blue light keeps on blinking. The green also blinks. That program tells me that to access the Reef Angel from outside I need to do something with 192.168.1.1:2000

My Uverse is accessed through my browser at 192.168.1.254

Will using tera term and entering those commands solve my problem?
What do I insert instead of the x'es? What is my "gateway", is it shown in ths little bit of info I copied from my router?:

Home Network Status

Device IPv4 Address 192.168.1.254
DHCPv4 Netmask 255.255.255.0
DHCPv4 Start Address 192.168.1.1
DHCPv4 End Address 192.168.1.253
DHCP Leases Available 223
DHCP Leases Allocated 30
DHCP Primary Pool Private
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: WiFi Attachment - Static IP on device

Post by rimai »

If it is blinking blue, it did not connect to your router correctly.
Passphrases are case sensitive, so make sure you type it exactly as your router is setup.
Roberto.
fit
Posts: 28
Joined: Mon Dec 07, 2015 1:28 pm

Re: WiFi Attachment - Static IP on device

Post by fit »

You appear to be spot on the money. I must have input that incorrectly. I can't believe it. Now I am getting no blue light at all, just a slow blinking green light. Once a second approximately. And I am connecting with the built in wifi demo server, or my cell phone using "Reef Angel Status". However, that "Reef Angel Status" only works when I am connected to my wifi on my phone. What's he next step please? Here is the Utilit dump:

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

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

Opening Serial Port...
Connected to serial port COM4
> $$$
< CMD
> ls
< ls
<
< FL# SIZ FLAGS
< 2 88548 3 wifly-GSX-441-r1057
< 5 74684 3 web_app-GSX-112
< 8 46812 3 wps_app-GSX-131
< 10 66749 3 eap_app-GSX-105
< 12 51053 0 web_config.html
< 25 512 0 link.html
< 26 7268 0 logo.png
< 28 1052 10 config
< 29 1052 10 user
<
< 164 Free, Boot=2, Backup=2
< <4.41>
> load user
< load user
< AOK
< <4.41>
> save
< save
< Storing in config
> save
< <4.41>
< Disconn from ATT360,AUTH-ERR
< Auto-Assoc ATT360 chan=10 mode=MIXED SCAN OK
< Joining ATT360 now..
< save
< Storing in config
< <4.41>
> set o d ReefAngelWifi
< set o d ReefAngelWifi
< AOK
< <4.41>
> set w l 5
< set w l 5
< AOK
< <4.41>
> set w s ATT360
< set w s ATT360
< AOK
< <4.41>
< Disconn from ATT360,1:7
< Disconn from ATT360,AUTH-ERR
< Disconn from ATT360,AUTH-ERR
< Auto-Assoc ATT360 chan=10 mode=MIXED SCAN OK
< Joining ATT360 now..
> set w p 4517805080
< set w p 4517805080
< AOK
< <4.41>
> set w k 00000000000000000000000000
< set w k 00000000000000000000000000
< AOK
< <4.41>
> set ftp address 198.175.253.161
< set ftp address 198.175.253.161
< AOK
< <4.41>
> save
< save
< Storing in config
< <4.41>
> reboot
< reboot
> $$$
< CMD
> show n
< show n
< SSid=ATT360
< Chan=10
< Assoc=OK
< Rate=12, 24Mb
< Auth=OK
< Mode=MIXED
< DHCP=OK,renew=64796
< Boot=2064
< Time=FAIL
< Links=1
< <4.41>
> get i
< get i
< IF=UP
< DHCP=ON
< IP=192.168.1.166:2000
< NM=255.255.255.0
< GW=192.168.1.254
< HOST=198.171.134.6:80
< PROTO=TCP,
< MTU=1524
< FLAGS=0x6
< TCPMODE=0x0
< BACKUP=0.0.0.0
< <4.41>
> reboot
< reboot
Removing connection to COM4
---------------------------------------------------------------------
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.
Image
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: WiFi Attachment - Static IP on device

Post by lnevo »

The next step is to configure the IP forwarding. You will need to then use your external ip address to connect to your reefangel.
fit
Posts: 28
Joined: Mon Dec 07, 2015 1:28 pm

Re: WiFi Attachment - Static IP on device

Post by fit »

What does that even mean? Passthrough my cable modem/ wirelss router from ATT to my WiFi device on the Reef Angel? If so, then can you tell by the information above what ip address and port needs to be passed through to what address? And is this all set up in my ATT router, or is it set up through the terminal program to set the WiFi device? don't understand this technology. It's very daunting.
Image
fit
Posts: 28
Joined: Mon Dec 07, 2015 1:28 pm

Re: WiFi Attachment - Static IP on device

Post by fit »

Please look at the first post to this thread where it explains something about the router I am using. I don't understand it though.
Image
fit
Posts: 28
Joined: Mon Dec 07, 2015 1:28 pm

Re: WiFi Attachment - Static IP on device

Post by fit »

This is how my Reefangel shows up on my router home network devices

192.168.1.166 / ReefAngelWifi 00:06:66:36:b9:9a on Wireless dhcp
Image
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: WiFi Attachment - Static IP on device

Post by lnevo »

You need to setup the pass thru. Technically it's called IP forwarding. If you search on google you should be able to find instructions for your router. I'm sure someone else may chime in who has ATT UVerse.
fit
Posts: 28
Joined: Mon Dec 07, 2015 1:28 pm

Re: WiFi Attachment - Static IP on device

Post by fit »

This is too hard for me to figure out. Can someone please help me some more? Preferably get me on the phone or connect direct to m computer. Do I have to tell my RA WiFi adapter to use a static address and tell my router to accept that? I have no idea what to do at all. This controller is not going to be worth it if I cant connect it through my router.

The first post to this thread says that it is ot possible to do a traditional passthrough. "Binder" in another thread says that he had the same router as I and this is possible.

I am not going to be able to do this without more help. So please, somebody, I am not altogether tech unsavy, actually I am pretty tech savvy, but this is a bit too much for me.
Image
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: WiFi Attachment - Static IP on device

Post by binder »

Since you have not had much success getting this taken care of, I have taken some screenshots of my setup for you. I finally had a chance to sit down to do this.

My setup is slightly different because I have a router sitting behind this modem/router that handles everything for me. I just use this ATT device as a passthrough. I forward all incoming traffic to my other router and it handles the NAT/Port Forwarding. I have it this way because I despise using router/modem combo’s and I run DDWRT on my routers….but I digress. This is described below.

Port Forwarding
There will be some small things that you will have to figure out yourself because I just cannot show them to you due to my setup. They should be pretty straight forward though and you will understand when we get to those parts.

First off, open up your modem/router’s webpage, typically this is 192.168.1.254. Once there, you will need to navigate to the “Firewall” tab/section of the device.
0_main.png
0_main.png (151.77 KiB) Viewed 4757 times
Once on the Firewall page, choose the “NAT/Gaming” sub-tab.
1_nat.png
1_nat.png (167.16 KiB) Viewed 4757 times
This page is where we will be doing all the port forwarding. It is confusing and took me some time to get it figured out. This is not the same as your typical router. Your typical router is going to allow you to specify everything manually. This router just gives you a pre-defined list of “services” that are already configured (so you don’t have to configure them, you just have to select them) to choose from. Since we are doing our own for ReefAngel, we need to create our own service to be displayed in the list.

Here’s how to do that. Click on the “Custom Services” button. It takes you to a Custom Services page and displays the services that you have created.
2_custom_services.png
2_custom_services.png (169.1 KiB) Viewed 4757 times
As you can see on my router, I have created 2 services: ReefAngel and VPN.

We will create the ReefAngel service for you to use. Under the Service Entry section, you will need to input this information:

Service Name: ReefAngel

Global Port Range: 2000 - 2000
(I chose 2010 for my setup because that’s how I wanted it setup. This is the public port that you will be using when communicating OUTSIDE your network into your network.
Some people do not want to use the default port to connect to their network. If you wish to use a different port other than the default to connect to your network, this is where you change it…not anywhere else. If you do not understand what I am talking about, then just ignore what I said and enter what I put down.)


Base Host Port: 2000
(This it the port on the INSIDE of your network. This MUST be set to 2000. This is how your wifi adapter is configured.)

Protocol: Both
(This can be set to only TCP but it will not hurt anything. It is safest to just leave it to BOTH.)

Now, you will click the “Add” button and it will create the service and add it to the list of Services. Once it shows up, you can then click the “Return to NAT/Gaming” button. This will take you to the previous screen.

The last thing you must do is to add the application (service) to the list of Hosted Applications. All this means does is tell the router/modem to allow data for the specified service to pass through the firewall (aka, open up a port on the firewall and allow it to goto a specific device).

Under the Application Hosting Entry section, choose the *ReefAngel service from the dropdown menu next to Service. There will be an asterisk next to ReefAngel indicating that it is a custom service that you created.
Next, for Needed by Device, choose your reef angel device. This is where you will have to do some checking on your own. There is a drop down list that gets filled with all the available devices on your network. So every device connected to the router will be listed. I do not recall how it is listed. It may be by MAC address, it could be by host name or simply IP address. You will just have to see what your list displays and go from there. I believe the hostname for the wifi adapter is WiFly or something along those lines.
3_application.png
3_application.png (167.38 KiB) Viewed 4757 times
Once you have entered the information and chosen the device, you will click the “Add” button. Then the application will be displayed in the Hosted Applications section to show that it is active.

Now you should be set to have the router forward the traffic to your ReefAngel (provided you chose the correct device).


——
Cascaded Router
If you wanted to do the cascaded router option (like I have setup), here’s how you would do it. Ignore all the information above. You will also have to configure the cascaded router to allow for the Port Forwarding. So if you had your previous router setup and working, you could put it behind this ATT modem/router and everything should work as before.

One caveat is that your internal network range should be different than the one on the ATT device. The ATT modem/router uses the 192.168.1.X network scheme. So your cascaded router should use something different. I use 192.168.2.X on one of my networks and 192.168.3.X on another.

Browse to the router’s web page (192.168.1.254).
Once there you will need to goto the Firewall tab.
Goto the IP Passthrough sub-tab.
You will need the MAC address for your cascaded router’s WAN port. You will be plugging in your cascaded router to one of the network ports on the ATT router and then that cable connects to the WAN port on your cascaded router.
Use the following settings:

Allocation Mode: Passthrough
Default Server Internal Address <ignore this>
Passthrough Mode: DHCPS-fixed
Passthrough Fixed MAC Address: <ENTER YOUR CASCADED ROUTERS MAC ADDRESS HERE>
Passthrough DHCP Lease:
(I have 10 minutes here but you can leave it be 1 day, which is typically the default for DHCP. I have it set to 10 minutes because I have had issues in the past with my setup where my router would lose its connection to the ATT modem and it would not get the public IP pushed through to it and I would not be able to connect into it. My internet would still work but I would not be able to remote in. So I set the lease to be a short time frame.)
4_passthrough.png
4_passthrough.png (221.51 KiB) Viewed 4757 times
You can then press the “SAVE” button. This will save the settings. Make sure your cascaded router is plugged into the ATT router and then reboot the ATT router. Your cascaded router should pick up the IP address and start doing its job.
Lastly, you will want to disable the WIFI on the ATT router so you do not have any issues.

By doing all this, you essentially bypass the router portion of the ATT modem/router and use it strictly as a modem. You can still get to the device by using its ip address if you ever had to change anything on it.



You can use either of the 2 scenarios I described above. Both options work. I have used them both. I prefer the cascaded router setup simply because I prefer my own router with DDWRT code (like I mentioned previously). I also have my router do static dhcp ip leases for my device so I do not have to manually setup the IP address on my devices. It's just simpler for me this way. I've changed the IP scheme on my network too many times along with the IP of devices and have been annoyed by having to manually configure each device that has a static IP address. So I prefer my DHCP server to do all the hard work for me.
You just use what you feel most comfortable with. Hopefully all of this makes sense and is a little easier to follow with screenshots.
Let me know if you need additional help.
fit
Posts: 28
Joined: Mon Dec 07, 2015 1:28 pm

Re: WiFi Attachment - Static IP on device

Post by fit »

you are amazing Curt! Thank you so much. I can't believe how much must have gone into getting this out with such clarity. I so much appreciate it.

I have litterally just got something working on the Portal on my own, and it seems to work on your program, as well as the UApp, and was going to let people on this topic know that I thought I had it going perhaps, when I see this write-up.

This is what I have right now that seems to be working. I got this working seemingly by pure chance. I was really flailing about. I don't know if it's correct w of doing this, or if it's dangerous perhaps. So please let me know if this is acceptable.

I found an IP on canyouseeme. It just poped up there without me having to populate that.
In my router settings, I went to Firewall -- Packet Filter and set up a Filter Rule as follows:
Action : Pass
Source IP : The IP identified for me by canyouseeme
Dest IP : The IP that my WiFi router says is connected to m ReefAngel controller, which is the same that the RA WiFi wizard reported it had used and loaded to m WiFi attachment.
Source Port : 80
Dest Port :2000

I had previously loaded very haphazard generated arduino code generated through the Reef Angel Wizard (This code will have to be redone as I just rushed through and it's not what I want b an means), followed by the WiFi Wizard to setup my WiFi attachment.

And it all works even when I turn my WiFi off on my phone. It did cut off for about a minute at some point, but it seemed to come back after I refreshed the Portal page on the ReefAngel site. The refresh may or may not have been needed.

Let me know if you see a problem with this method, or if ou think I should go with your method instead please. I wil update this topic if this prooves to be robust or not.
Image
Post Reply