How to setup your wifi attachment

New members questions
mason dixon
Posts: 26
Joined: Mon May 14, 2012 6:19 am

Re: How to setup your wifi attachment

Post by mason dixon »

How do I upload the wifi test code to the reef angel?

I have a 6 pin usb/ttl cable but the input on the reef angel is 8 pin?

I also have a ttl cable that is 6 pin female on one side and 8 pin female on the other?

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

Re: How to setup your wifi attachment

Post by rimai »

The USB-TTL cable can be used to upload codes to RA and also to setup the wifi attachment.
The 6pin-8pin is to be used when you want to connect RA to the wifi attachment.
Black wire is always to the right-most pin. Please check the manual for instructions on how to connect.
Roberto.
User avatar
cody.sheridan-2008
Posts: 31
Joined: Tue Feb 05, 2013 9:39 pm

Re: How to setup your wifi attachment

Post by cody.sheridan-2008 »

Hi there,

With the 2nd type of connection, will it work if there is no passphrase? I am not sure why it would but it does nothing once I click "setup wifi attachment" just leaves black. I have talked to my master (father) and it is all to hard to put one on to try :roll:

I am getting to this point and then nothing. :?:
wifi utility 1.png
wifi utility 1.png (63.35 KiB) Viewed 22121 times
Cheers
Cody
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: How to setup your wifi attachment

Post by rimai »

I don't think it would work with no password
Roberto.
User avatar
cody.sheridan-2008
Posts: 31
Joined: Tue Feb 05, 2013 9:39 pm

Re: How to setup your wifi attachment

Post by cody.sheridan-2008 »

yeah typed i a random bunch of letters and it did something but obviously didn't work. here comes the next 6 months battling to get one lol
Cheers
Cody
User avatar
cody.sheridan-2008
Posts: 31
Joined: Tue Feb 05, 2013 9:39 pm

Re: How to setup your wifi attachment

Post by cody.sheridan-2008 »

rimai wrote:I don't think it would work with no password
Hey roberto,

The wifi attachment will work if you have no password you just need to put a space in the box.
Cheers
Cody
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: How to setup your wifi attachment

Post by rimai »

Cool :)
Thanks for sharing.
Roberto.
cgonser
Posts: 45
Joined: Mon Feb 25, 2013 3:54 pm
Location: Savannah, GA

Re: How to setup your wifi attachment

Post by cgonser »

I so far have had a sucessful install until I go to type the IP in the address bar, then I get no connection. Set up went well, have only a green light blinking, but no connection. Any advice?
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

How to setup your wifi attachment

Post by lnevo »

If you have a green blinking light then it should be good. Check in your router and see what ip address was assigned.
cgonser
Posts: 45
Joined: Mon Feb 25, 2013 3:54 pm
Location: Savannah, GA

Re: How to setup your wifi attachment

Post by cgonser »

lnevo wrote:If you have a green blinking light then it should be good. Check in your router and see what ip address was assigned.
no clue how to do that! I copied the address the set up wizzard gave me...?
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

How to setup your wifi attachment

Post by lnevo »

What ip address? Can you ping it from the command prompt?

You just put the ip in the address bar? You need the port too... Like this

http://192.168.1.20:2000
cgonser
Posts: 45
Joined: Mon Feb 25, 2013 3:54 pm
Location: Savannah, GA

Re: How to setup your wifi attachment

Post by cgonser »

I tried that exact thing, but my address is obviously different.. I just get page can not be displayed
dbmet
Posts: 235
Joined: Thu Nov 10, 2011 11:49 am

Re: How to setup your wifi attachment

Post by dbmet »

What kind of router do you have?
Image
cgonser
Posts: 45
Joined: Mon Feb 25, 2013 3:54 pm
Location: Savannah, GA

Re: How to setup your wifi attachment

Post by cgonser »

dbmet wrote:What kind of router do you have?
Seems to be figured out now, but when I use the iphone app, I can only get my readings when my phone is hooked up to the in house wifi, not 3g
00Warpig00
Posts: 289
Joined: Wed May 16, 2012 9:52 pm

Re: How to setup your wifi attachment

Post by 00Warpig00 »

cgonser wrote:
dbmet wrote:What kind of router do you have?
Seems to be figured out now, but when I use the iphone app, I can only get my readings when my phone is hooked up to the in house wifi, not 3g

Sounds like your router is either not allowing traffic in from the internet on port 2000 OR your iphone does not know your home network's public IP address, or BOTH.

You can use http://www.whatismyip.com to determine your public IP address on your home network and you can use http://www.canyouseeme.org/ to probe your home network's port 2000 from the internet for a response. Also note if your ISP is connecting you to the internet via dynamic IP address you may also need to use a dynamic DNS service like DYNDNS.ORG

Nick
180G FOWLR
20GH QT#1
29G QT#2

Image
cgonser
Posts: 45
Joined: Mon Feb 25, 2013 3:54 pm
Location: Savannah, GA

Re: How to setup your wifi attachment

Post by cgonser »

I'm guessing its the iPhone that's the problem? I went to both sites and everything seems good. Port 2000 is open and communicating.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

How to setup your wifi attachment

Post by lnevo »

You need to set your iPhone to use the public ip...not the internal one you got when you setup the module... Then you can use a dynamic dns service to give that ip a name so if your provider changes your ip your RA will still work.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

How to setup your wifi attachment

Post by lnevo »

And from inside the outside address should work with most routers...
Elevatorguy1
Posts: 42
Joined: Wed Apr 17, 2013 6:21 pm

Re: How to setup your wifi attachment

Post by Elevatorguy1 »

Ok, I'm confused. So if I load the wifi test code won't that erase the code I'm using now to run my tank?
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: How to setup your wifi attachment

Post by lnevo »

You should have your older code saved and just reload it after the test. You can also modify it so that the ports you need are on while testing.
Elevatorguy1
Posts: 42
Joined: Wed Apr 17, 2013 6:21 pm

Re: How to setup your wifi attachment

Post by Elevatorguy1 »

Don't I need to add something to the code I currently have running the tank to enable wifi?
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: How to setup your wifi attachment

Post by lnevo »

Yes

ReefAngel.Portal("username");
Elevatorguy1
Posts: 42
Joined: Wed Apr 17, 2013 6:21 pm

Re: How to setup your wifi attachment

Post by Elevatorguy1 »

Ok, I got nothing on the portal or the iPad app. Went through the wifi setup utility and set the wifi module set up, everything went fine there. Added the ReefAngel.Portal("username"); must be still missing something
dbmet
Posts: 235
Joined: Thu Nov 10, 2011 11:49 am

Re: How to setup your wifi attachment

Post by dbmet »

Have you turned on port forwarding in your router for port 2000 to your reef angel ip address?
Image
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: How to setup your wifi attachment

Post by lnevo »

Can you ping the ip? Have you tried it from your browser? Lets start at the basics..
Elevatorguy1
Posts: 42
Joined: Wed Apr 17, 2013 6:21 pm

Re: How to setup your wifi attachment

Post by Elevatorguy1 »

Not sure how to ping the ip. Yes, tried it in Firefox and got to the reef angel controller web server. Added the wifi to the end of the address and got to the t1 t2 t3 ph page with the temp and ph being displayed.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: How to setup your wifi attachment

Post by lnevo »

Cool. So the ip is working you dont need to worry about ping.

Now for ipad/iphone...make sure they are on same network as your reefangel and put the ip you used in your browser in the settings.

Make sure direct connect is turned on..

Also can you post your code.
Elevatorguy1
Posts: 42
Joined: Wed Apr 17, 2013 6:21 pm

Re: How to setup your wifi attachment

Post by Elevatorguy1 »

ok, i have the same address in the setting on the ipad app. just noticed that when I switch to controls it looks like i can see which relays are on and off. Changed the setting to direct connect and get nothing. just says updating. On the portal it says unreachable address. I'm using a linksys E1550 router.

Here's what I have coded

#include <ReefAngel_Features.h>
#include <Globals.h>
#include <RA_Wifi.h>
#include <Wire.h>
#include <OneWire.h>
#include <Time.h>
#include <DS1307RTC.h>
#include <InternalEEPROM.h>
#include <RA_NokiaLCD.h>
#include <RA_ATO.h>
#include <RA_Joystick.h>
#include <LED.h>
#include <RA_TempSensor.h>
#include <Relay.h>
#include <RA_PWM.h>
#include <Timer.h>
#include <Memory.h>
#include <InternalEEPROM.h>
#include <RA_Colors.h>
#include <RA_CustomColors.h>
#include <Salinity.h>
#include <RF.h>
#include <IO.h>
#include <ORP.h>
#include <AI.h>
#include <PH.h>
#include <WaterLevel.h>
#include <ReefAngel.h>

////// Place global variable code below here


////// Place global variable code above here


void setup()
{
// This must be the first line
InternalMemory.LCDID_write(0);
ReefAngel.Init(); //Initialize controller
ReefAngel.AddStandardMenu(); // Add Standard Menu
ReefAngel.Portal("elevatorguy1");
// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = 0;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = 0;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = Port1Bit;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = 0;
// Use T1 probe as temperature and overheat functions
ReefAngel.TempProbe = T1_PROBE;
ReefAngel.OverheatProbe = T1_PROBE;
// Set the Overheat temperature setting
InternalMemory.OverheatTemp_write( 869 );


// Ports that are always on

////// Place additional initialization code below here


////// Place additional initialization code above here
}

void loop()
{
ReefAngel.StandardLights( Port1,22,30,13,30 ); //*sump fuge light
ReefAngel.StandardLights( Port2,13,30,22,30 ); //*top fuge light
ReefAngel.StandardLights( Port3,13,30,22,30 ); //*Actinic
ReefAngel.StandardLights( Port4,13,30,22,30 ); //*Daylight
ReefAngel.DosingPumpRepeat( Port5,0,480,60 ); //*kalk reactor
ReefAngel.StandardATO( Port6,6000 ); //*Fresh water solenoid
ReefAngel.StandardHeater( Port7,775,785 );
ReefAngel.StandardLights( Port8,13,30,22,30 ); //*Light fan
ReefAngel.PWM.SetDaylight( PWMSlope(13,30,22,30,5,60,30,5) );
ReefAngel.PWM.SetActinic( PWMSlope(13,30,22,30,5,70,30,5) );
////// Place your custom code below here


////// Place your custom code above here

// This should always be the last line
ReefAngel.ShowInterface();
}
void DrawCustomMain()
{
byte x;
byte y = 2;
char text[7];



ReefAngel.LCD.DrawText(DefaultFGColor, DefaultBGColor, 30, 2, "Gonzo's Reef"); // Put a banner at the top
ReefAngel.LCD.DrawDate(6, 119); // Put the date and time at the bottom
ReefAngel.LCD.Clear(COLOR_BLACK, 1, 11, 132, 11); // Draw a black line under the banner
x = 12;
y += MENU_START_ROW+1; // MENU_START_ROW is 10, according to globals.h, so y=2+10+1=13
ReefAngel.LCD.DrawText(COLOR_BLUE, COLOR_WHITE, x, y+6, "Tank Temp pH");
ConvertNumToString(text, ReefAngel.Params.PH, 100); // Get pH reading and convert
ReefAngel.LCD.DrawLargeText(PHColor, DefaultBGColor, x+75, y+18, text, Font8x16); // Put pH on the screen
ConvertNumToString(text, ReefAngel.Params.Temp[T1_PROBE], 10); // Get T1 temp and convert
y += MENU_START_ROW*2;
x = 10;
ReefAngel.LCD.DrawHugeNumbers(COLOR_WHITE, COLOR_BLACK, x, y, text); // Draw the temperature, white numbers on a colored background
x += (16*4) + 8;
ReefAngel.LCD.DrawText(DPColor,DefaultBGColor,8,y+25,"White %");
ReefAngel.LCD.DrawSingleMonitor(ReefAngel.PWM.GetDaylightValue(), DPColor, 24, y+35, 1); // Draw the white light %
ReefAngel.LCD.DrawText(APColor,DefaultBGColor,x+8,y+25,"Blue %");
ReefAngel.LCD.DrawSingleMonitor(ReefAngel.PWM.GetActinicValue(), APColor, x+24, y+35, 1); // Draw the blue light %

// Code for drawing the relay box
byte TempRelay = ReefAngel.Relay.RelayData;
TempRelay &= ReefAngel.Relay.RelayMaskOff;
TempRelay |= ReefAngel.Relay.RelayMaskOn;
ReefAngel.LCD.DrawOutletBox(12, 92, TempRelay);
}

void DrawCustomGraph()
{
}
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: How to setup your wifi attachment

Post by lnevo »

I do not see the ReefAngel.Portal command in your code. It should be right before the ShowInterface() in the loop function. Without that wifi is not enabled
Post Reply