Wifi setup fail

Expansion modules and attachments
Post Reply
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Wifi setup fail

Post by rimai »

Can you post your code?
Roberto.
Hibb304
Posts: 22
Joined: Sun May 19, 2013 7:27 am

Re: Wifi setup fail

Post by Hibb304 »

Sorry guys I'm coming from a ACjr to this.
This the code? I didn't save the one from the utility.

#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
// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = Port5Bit;
ReefAngel.FeedingModePortsE[0] = 0;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port3Bit | Port4Bit | Port6Bit | Port8Bit;
ReefAngel.WaterChangePortsE[0] = 0;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = 0;
ReefAngel.LightsOnPortsE[0] = 0;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = Port2Bit;
ReefAngel.OverheatShutoffPortsE[0] = 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( 830 );


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

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


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

void loop()
{
ReefAngel.StandardHeater( Port2,776,780 );
ReefAngel.Relay.DelayedOn( Port4,10 );
ReefAngel.Relay.DelayedOn( Port7,10 );
ReefAngel.Relay.DelayedOn( Port8,10 );
////// Place your custom code below here


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

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

void DrawCustomMain()
{
int x,y;
char text[10];
// Parameters
#if defined DisplayLEDPWM && ! defined RemoveAllLights
ReefAngel.LCD.DrawMonitor( 15, 14, ReefAngel.Params,
ReefAngel.PWM.GetDaylightValue(), ReefAngel.PWM.GetActinicValue() );
#else // defined DisplayLEDPWM && ! defined RemoveAllLights
ReefAngel.LCD.DrawMonitor( 15, 14, ReefAngel.Params );
#endif // defined DisplayLEDPWM && ! defined RemoveAllLights
pingSerial();

// pH Expansion
ReefAngel.LCD.DrawText( COLOR_MEDIUMSEAGREEN,DefaultBGColor,15,54, "PHE:" );
ReefAngel.LCD.DrawSingleMonitor( ReefAngel.Params.PHExp,COLOR_DARKKHAKI,39,54, 100 );
pingSerial();

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

// Relay Expansion
TempRelay = ReefAngel.Relay.RelayDataE[0];
TempRelay &= ReefAngel.Relay.RelayMaskOffE[0];
TempRelay |= ReefAngel.Relay.RelayMaskOnE[0];
ReefAngel.LCD.DrawOutletBox( 12, 97, TempRelay );
pingSerial();

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

void DrawCustomGraph()
{
ReefAngel.LCD.DrawGraph( 5, 5 );
}
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Wifi setup fail

Post by rimai »

Yes, that's code.
Make sure you uploaded it to the controller and that you have the wifi attachment connected to the controller.
Roberto.
Hibb304
Posts: 22
Joined: Sun May 19, 2013 7:27 am

Re: Wifi setup fail

Post by Hibb304 »

I finally got guys. Had to re upload to the controller re hooked up the wifi to it, and boom it works.
Thanks again, y'all been great.
Image
Hibb304
Posts: 22
Joined: Sun May 19, 2013 7:27 am

Re: Wifi setup fail

Post by Hibb304 »

Ok it still works I did a no IP address, but still cant use the app on my wifi. I got t turn it to 3g to use. Any ideas?
Image
dbmet
Posts: 235
Joined: Thu Nov 10, 2011 11:49 am

Re: Wifi setup fail

Post by dbmet »

What type of router are you using?
Image
Hibb304
Posts: 22
Joined: Sun May 19, 2013 7:27 am

Re: Wifi setup fail

Post by Hibb304 »

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

Re: Wifi setup fail

Post by rimai »

Could it be because your router doesn't implement NAT loopback?
I seem to see this happening now and then.
I have this same problem myself, because my router doesn't do it either.
Roberto.
Hibb304
Posts: 22
Joined: Sun May 19, 2013 7:27 am

Re: Wifi setup fail

Post by Hibb304 »

Really damn. Anyone recommend a router modem combo. I do have another wireless router. Can that be hooked up to a router/modem too?
Image
Post Reply