Page 1 of 1

Wifi attachment and static ip

Posted: Sun Jan 15, 2012 12:36 pm
by jallan258
I am having a tough time trying to get the wifi attachment to have a static ip address. Is there a way to set a static ip on the device itself?

Re: Wifi attachment and static ip

Posted: Sun Jan 15, 2012 2:09 pm
by binder
jallan258 wrote:I am having a tough time trying to get the wifi attachment to have a static ip address. Is there a way to set a static ip on the device itself?
Yes, there is. If you are trying to set the IP address using a terminal program (teraterm) and doing it manually, you will need to do this:

Open up the command prompt on the wifi module and enter the programming mode (not covered here, it is assumed that you have followed the instructions in the Wifi Module manual).
These are the commands that you will want to use along with what they do:

Code: Select all

set ip a IP				Sets static ip address, IP is in dotted quad format
set ip g IP				Sets the gateway address, IP is in dotted quad format
set ip n IP				Sets the netmask, IP is in dotted quad format
set dns address			Sets dns server address
set ip dhcp VALUE		Sets dhcp mode
							0 - disables	1 - enabled		3 - enabled & attempts to reuse ip
So to set a static IP address, you would do this:

Code: Select all

set ip a 192.168.1.50
set ip g 192.168.1.1
set ip n 255.255.255.0
set ip dhcp 0
save
reboot
That will set the IP address to 192.168.1.50 and the gateway to 192.168.1.1 and also disable DHCP.

Then you will just disconnect from the wifi module and connect it back to your controller and boot up the controller.

Re: Wifi attachment and static ip

Posted: Sun Jan 15, 2012 7:52 pm
by jallan258
Ok that would be a big help if I could get teraterm to connect to my wifi attachment. I actually used your program to originally setup my wifi controller. The wifi controller works however when my router resets it changes the ip address of the controller. Since I access my reef angel from my iphone outside my home, this could be problemsome. Everytime I try to connect the controller to the teraterm, the program doesn't do anything. It connects but I can't type anything and I don't recieve anything from the wifi module. The green light blinks steady so it is connecting to my wifi. Maybe I have to reset my wifi attachment? If so how do I do this?

Re: Wifi attachment and static ip

Posted: Sun Jan 15, 2012 7:59 pm
by rimai
Have you tried setting up your router to always give the wifi attachment the same ip address?
For the solution Curt posted above, you have to connect the wifi attachment into the USB-TTL cable.
You can find more information on how to do this here: http://www.reefangel.com/files/Reef%20A ... 20v1.3.pdf

Re: Wifi attachment and static ip

Posted: Sun Jan 15, 2012 8:03 pm
by jallan258
Yeah I actually have tried that. The problem is the Belkin n750 doesn't have any setting to allow for this. I couldn't believe it really since it is a new router. Also I am connecting my wifi module to the computer via the USB cable on the same COM I use to communicate with the Reefangel which is COM 8.

Re: Wifi attachment and static ip

Posted: Sun Jan 15, 2012 8:09 pm
by rimai
Ok.
Yes, you have to use the same COM port.
Since you already have the wifi configured, you can start on step 24 to connect to the attachment.
Once connected, you have to make sure to type the "$$$" within less than a second.
The wifi will respond with the word CMD.
You can now type the commands that Curt posted above.

Re: Wifi attachment and static ip

Posted: Sun Jan 15, 2012 9:00 pm
by jallan258
Ok it worked I set my static IP and everything is working. I didn't read anything about the $$$ within a second which was key to this whole thing. Thanks a lot guys once again great support as always.