Wifi issue

Expansion modules and attachments
Post Reply
ecam
Posts: 229
Joined: Thu Nov 15, 2012 11:27 am

Wifi issue

Post by ecam »

Can someone please help. From what i can tell i've followed everything to the T using the WPS option for connecting the wifi and then running the wizard to setup the controller. And its still not work . Im at my wits end... Please advise. Here is my code and my Router is an Airport extreme (on the PC side)

#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
ReefAngel.Init(); //Initialize controller
ReefAngel.AddStandardMenu();

ReefAngel.AddDateTimeMenu();

// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = Port6Bit;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port1Bit;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = Port3Bit | Port4Bit| Port5Bit;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = Port2Bit | Port3Bit | Port4Bit | Port7Bit;
// Use T1 probe as temperature and overheat functions
ReefAngel.TempProbe = T3_PROBE;
ReefAngel.OverheatProbe = T3_PROBE;
// Set the Overheat temperature setting
InternalMemory.OverheatTemp_write( 820 );

// Setup ATO Port for AI communication
ReefAngel.AI.SetPort( lowATOPin );


// Ports that are always on
ReefAngel.Relay.On( Port1 );
ReefAngel.Relay.On( Port6 );


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

// Hardcode PH calibrations
ReefAngel.PHMin=544; // PH7.0
ReefAngel.PHMax=830; // PH10.0

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

void loop()
{


ReefAngel.Relay.Set( Port2, !ReefAngel.Relay.Status( Port3 ) );
ReefAngel.StandardLights( Port3,7,0,19,0 );
ReefAngel.StandardLights( Port4,9,0,15,0 );
ReefAngel.StandardLights( Port5,7,0,19,0 );
ReefAngel.StandardHeater( Port7,765,800 );
ReefAngel.Relay.DelayedOn( Port8,2 ); //Skimmer
ReefAngel.AI.SetChannel( White, PWMParabola(9,0,20,0,0,60,0) );
ReefAngel.AI.SetChannel( Blue, PWMParabola(9,0,20,0,15,100,15) );
ReefAngel.AI.SetChannel( RoyalBlue, MoonPhase() );
ReefAngel.RF.UseMemory = false;
ReefAngel.RF.SetMode( NutrientTransport,85,10 );
ReefAngel.RF.SetChannel( Radion_White, PWMParabola(9,0,20,0,0,60,0) );
ReefAngel.RF.SetChannel( Radion_RoyalBlue, PWMParabola(9,0,20,0,15,100,15) );
ReefAngel.RF.SetChannel( Radion_Red, PWMParabola(9,0,20,0,15,65,15) );
ReefAngel.RF.SetChannel( Radion_Green, PWMParabola(9,0,20,0,15,50,15) );
ReefAngel.RF.SetChannel( Radion_Blue, MoonPhase() );
ReefAngel.RF.SetChannel( Radion_Intensity, PWMParabola(9,0,20,0,15,100,15) );
if ( second()==0 ) ReefAngel.RF.RadionWrite();

////// Place your custom code below here


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

// This should always be the last line
ReefAngel.Portal( "ecam" );
ReefAngel.ShowInterface();
}

void DrawCustomMain()
{
int x,y;
char text[10];
// Aqua Illumination
x = 10;
y = 20;
ReefAngel.LCD.DrawText( COLOR_DODGERBLUE,DefaultBGColor,x,y,"WH:" );
ReefAngel.LCD.DrawText( COLOR_DODGERBLUE,DefaultBGColor,x+38,y,"BL:" );
ReefAngel.LCD.DrawText( COLOR_DODGERBLUE,DefaultBGColor,x+76,y,"RB:" );
for ( int a=0;a<3;a++ )
{
ReefAngel.LCD.DrawText( COLOR_DODGERBLUE,DefaultBGColor,x+18,y,ReefAngel.AI.GetChannel(a) );
x += 38;
}
pingSerial();

// Parameters
#if defined DisplayLEDPWM && ! defined RemoveAllLights
ReefAngel.LCD.DrawMonitor( 15, 48, ReefAngel.Params,
ReefAngel.PWM.GetDaylightValue(), ReefAngel.PWM.GetActinicValue() );
#else // defined DisplayLEDPWM && ! defined RemoveAllLights
ReefAngel.LCD.DrawMonitor( 15, 48, ReefAngel.Params );
#endif // defined DisplayLEDPWM && ! defined RemoveAllLights
pingSerial();

// Main Relay Box
byte TempRelay = ReefAngel.Relay.RelayData;
TempRelay &= ReefAngel.Relay.RelayMaskOff;
TempRelay |= ReefAngel.Relay.RelayMaskOn;
ReefAngel.LCD.DrawOutletBox( 12, 94, TempRelay );
pingSerial();

// Date and Time
ReefAngel.LCD.DrawDate( 6, 122 );
pingSerial();
}

void DrawCustomGraph()
{
}
805reefer
Posts: 72
Joined: Wed Feb 27, 2013 10:38 pm

Wifi issue

Post by 805reefer »

Had the same problem ended up being my IP address... When the wifi wizard completes it's upload does it say successful?
ecam
Posts: 229
Joined: Thu Nov 15, 2012 11:27 am

Re: Wifi issue

Post by ecam »

No. it just sits on Trying to connect to router. and the light is a slow green
Attachments
Capture.PNG
Capture.PNG (20.84 KiB) Viewed 5395 times
805reefer
Posts: 72
Joined: Wed Feb 27, 2013 10:38 pm

Wifi issue

Post by 805reefer »

What kind of router do you have
ecam
Posts: 229
Joined: Thu Nov 15, 2012 11:27 am

Re: Wifi issue

Post by ecam »

I have an airport extreme
dbmet
Posts: 235
Joined: Thu Nov 10, 2011 11:49 am

Wifi issue

Post by dbmet »

Looks like the wifi setup has received and IP address from your router. It's the 10.whatever:2000.

It may not me able to setup port forwarding which you may have to do yourself.
Image
805reefer
Posts: 72
Joined: Wed Feb 27, 2013 10:38 pm

Wifi issue

Post by 805reefer »

So what I had to do is set up a port forwarding in your router use the IP address that the wizard gave you make sure your port is 2000 in your port forwarding then rerun the wifi wizard again
ecam
Posts: 229
Joined: Thu Nov 15, 2012 11:27 am

Re: Wifi issue

Post by ecam »

I did that and I ran the utility that Robert gave and it says my port is open.
805reefer
Posts: 72
Joined: Wed Feb 27, 2013 10:38 pm

Wifi issue

Post by 805reefer »

When you run that utility he gave you right where you put in your IP address in blue it says use current IP address click that and it will give you your current IP address what ever it gives you put that IP in your phone or in the portal for your IP and leave the port as 2000
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Re: Wifi issue

Post by lnevo »

it looks good.... try going to http://10.0.1.3:2000 in your web browser
ecam
Posts: 229
Joined: Thu Nov 15, 2012 11:27 am

Re: Wifi issue

Post by ecam »

lnevo wrote:it looks good.... try going to http://10.0.1.3:2000 in your web browser

Not working... says no connection
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Wifi issue

Post by lnevo »

Can you ping the IP address? Everything else looks good. Wizard was good...port forwarding check is good...slow green light is good...code looks good.
dbmet
Posts: 235
Joined: Thu Nov 10, 2011 11:49 am

Wifi issue

Post by dbmet »

Yup everything looks good. You might unplug the black connector from the wifi module-- wait a few seconds and then plug it back in and see if it connects and you get a slow green blinking light.
Image
ecam
Posts: 229
Joined: Thu Nov 15, 2012 11:27 am

Re: Wifi issue

Post by ecam »

Disconnected and reconnected and still no connection. I'm out of ideas here

dbmet wrote:Yup everything looks good. You might unplug the black connector from the wifi module-- wait a few seconds and then plug it back in and see if it connects and you get a slow green blinking light.
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Wifi issue

Post by rimai »

Are you sure you are in the same network?
Can you ping the module?
Roberto.
ecam
Posts: 229
Joined: Thu Nov 15, 2012 11:27 am

Re: Wifi issue

Post by ecam »

rimai wrote:Are you sure you are in the same network?
Can you ping the module?

Roberto, yes i can ping it....
and the portal still says an unreachable port, and the forwarding wizard says its open...
Attachments
Capture1.PNG
Capture1.PNG (18.32 KiB) Viewed 5486 times
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Wifi issue

Post by lnevo »

Maybe an ip conflict? May need to check the port settings on the module. All i can think of...
ecam
Posts: 229
Joined: Thu Nov 15, 2012 11:27 am

Re: Wifi issue

Post by ecam »

lnevo wrote:Maybe an ip conflict? May need to check the port settings on the module. All i can think of...
How do i do that?
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Wifi issue

Post by lnevo »

Serial terminal program.. Command is 'get e' the manual should have details on setting up the session. For an ip conflict. Disconnect the module and try pinging again.
805reefer
Posts: 72
Joined: Wed Feb 27, 2013 10:38 pm

Re: Wifi issue

Post by 805reefer »

Did you do what I told you go here http://www.yougetsignal.com/tools/open-ports/
Then click on the blue label that says use current ip click on that when the ip comes up change only the port number to 2000 then run the check if. It says port open use the ip address that's on the screen for you phone or portal
Post Reply