Wifi Setup Question

Expansion modules and attachments
Post Reply
chase
Posts: 101
Joined: Fri Sep 16, 2011 8:26 am

Wifi Setup Question

Post by chase »

I ran the setup code under the downloads section and it seemed to work fine. My IP was assigned, I can ping it, and also http to it (Reef Angel Controller Web Server). Problem I currently have is no internet access (slow green blink only). Is there a way to telnet to the device over the LAN to check/edit config settings? I tried using the manual teraterm method as well, but nothing displays during step 16 for the teraterm readout. Not sure what I'm missing...here's my pde and mem config. #define wifi is also in my RA_Features.h file.

Thanks in advance!

PDE:

Code: Select all

// Autogenerated file by RAGen (v1.0.4.92), (09/08/2011 09:54)
// RA_090811_0954.pde
//
// This version designed for v0.8.5 Beta 12 or later

/* The following features are enabled for this PDE File: 
#define DisplayImages
#define WavemakerSetup
#define DateTimeSetup
#define VersionMenu
#define DirectTempSensor
#define DisplayLEDPWM
#define StandardLightSetup
*/

#include <ReefAngel_Features.h>
#include <ReefAngel_Globals.h>
#include <ReefAngel_Wifi.h>
#include <Wire.h>
#include <OneWire.h>
#include <Time.h>
#include <DS1307RTC.h>
#include <ReefAngel_EEPROM.h>
#include <ReefAngel_NokiaLCD.h>
#include <ReefAngel_ATO.h>
#include <ReefAngel_Joystick.h>
#include <ReefAngel_LED.h>
#include <ReefAngel_TempSensor.h>
#include <ReefAngel_Relay.h>
#include <ReefAngel_PWM.h>
#include <ReefAngel_Timer.h>
#include <ReefAngel_Memory.h>
#include <ReefAngel.h>

#define Daylight            1
#define Chiller             2
#define Heater              3
#define Return              4
#define WavemakerL          5
#define WavemakerR          6
#define LED                 7
//#define ATO                 7 
#define Refugium            8

void setup()
{
   randomSeed(analogRead(0)); //wm stuff  
    ReefAngel.Init();  //Initialize controller   
    ReefAngel.FeedingModePorts = B00001000;
    ReefAngel.WaterChangePorts = B00000000;
    ReefAngel.OverheatShutoffPorts = B00000101;
    ReefAngel.LightsOnPorts = B00000001;
    // Ports that are always on
    ReefAngel.Relay.On(Return); //port 4
   //wm stuff
    ReefAngel.Timer[1].SetInterval(random(15,35));
    ReefAngel.Timer[1].Start();  
    ReefAngel.Relay.On(WavemakerL);
}

void loop()
{
    ReefAngel.ShowInterface();
    // Specific functions
    ReefAngel.StandardFan(Chiller,775,783);
    ReefAngel.StandardHeater(Heater,768,775);
    ReefAngel.StandardLights(Daylight,8,45,19,30);  //Daylight schedule 9:00am - 7:30pm
    ReefAngel.StandardLights(Refugium,21,0,9,0);  //Refugium schedule 9:00pm - 9:00am
    ReefAngel.StandardLights(LED,8,30,22,0);  //LED schedule 8:45am - 10:00pm   
    //Wavemaker stuff
    if ( ReefAngel.Timer[1].IsTriggered() )
      {
        ReefAngel.Timer[1].SetInterval(random(15,35));
        ReefAngel.Timer[1].Start();
        ReefAngel.Relay.Toggle(WavemakerL); //port 5
        ReefAngel.Relay.Toggle(WavemakerR); //port 6
       }   
/*    ATO stuff
     if(ReefAngel.LowATO.IsActive())
        {
            ReefAngel.Relay.On(ATO); //port 7
        }
        else
        {
            ReefAngel.Relay.Off(ATO);
        }    
*/
}
MEMORY:

Code: Select all

// Autogenerated file by RAGen (v1.0.4.92), (09/08/2011 09:59)
// Memory_090811_0959.pde
//
// This file sets the default values to the Internal Memory
//


#include <ReefAngel_Features.h>
#include <ReefAngel_Globals.h>
#include <Time.h>
#include <OneWire.h>
#include <Phillips6610LCDInv.h>
#include <avr/pgmspace.h>
#include <ReefAngel_EEPROM.h>


Phillips6610LCDInv e;

void setup()
{
    e.lcd_init();
    e.lcd_clear(COLOR_WHITE,0,0,132,132);
    e.lcd_BacklightOn();

    InternalMemory.MHOnHour_write(8);
    InternalMemory.MHOnMinute_write(0);
    InternalMemory.MHOffHour_write(15);
    InternalMemory.MHOffMinute_write(0);
    InternalMemory.MHDelay_write(5);
    InternalMemory.StdLightsOnHour_write(9);
    InternalMemory.StdLightsOnMinute_write(0);
    InternalMemory.StdLightsOffHour_write(21);
    InternalMemory.StdLightsOffMinute_write(0);
    InternalMemory.DP1OnHour_write(4);
    InternalMemory.DP1OnMinute_write(0);
    InternalMemory.DP2OnHour_write(22);
    InternalMemory.DP2OnMinute_write(30);
    InternalMemory.DP1Timer_write(0);
    InternalMemory.DP2Timer_write(0);
    InternalMemory.DP1RepeatInterval_write(60);
    InternalMemory.DP2RepeatInterval_write(60);
    InternalMemory.ATOTimeout_write(60);
    InternalMemory.ATOHighTimeout_write(60);
    InternalMemory.ATOHourInterval_write(0);
    InternalMemory.ATOHighHourInterval_write(0);
    InternalMemory.FeedingTimer_write(150);
    InternalMemory.LCDTimer_write(600);
    InternalMemory.LEDPWMActinic_write(50);
    InternalMemory.LEDPWMDaylight_write(50);
    InternalMemory.WM1Timer_write(30);
    InternalMemory.WM2Timer_write(30);
    InternalMemory.HeaterTempOn_write(767);
    InternalMemory.HeaterTempOff_write(770);
    InternalMemory.ChillerTempOn_write(780);
    InternalMemory.ChillerTempOff_write(770);
    InternalMemory.OverheatTemp_write(1500);
    InternalMemory.PHMax_write(840);
    InternalMemory.PHMin_write(550);
}

void loop()
{
    // display the values
    char buf[128];
    sprintf(buf, "MH %2d:%02d-%2d:%02d,%d", InternalMemory.MHOnHour_read(), InternalMemory.MHOnMinute_read(),
                                         InternalMemory.MHOffHour_read(), InternalMemory.MHOffMinute_read(),
                                         InternalMemory.MHDelay_read());
    e.lcd_draw_text(COLOR_BLACK, COLOR_WHITE, MENU_START_COL, MENU_START_ROW, buf);
    sprintf(buf, "Std %2d:%02d-%2d:%02d", InternalMemory.StdLightsOnHour_read(), InternalMemory.StdLightsOnMinute_read(),
                                          InternalMemory.StdLightsOffHour_read(), InternalMemory.StdLightsOffMinute_read());
    e.lcd_draw_text(COLOR_BLACK, COLOR_WHITE, MENU_START_COL, MENU_START_ROW*2, buf);
    sprintf(buf, "LED A: %d%% D: %d%%", InternalMemory.LEDPWMActinic_read(), InternalMemory.LEDPWMDaylight_read());
    e.lcd_draw_text(COLOR_BLACK, COLOR_WHITE, MENU_START_COL, MENU_START_ROW*3, buf);
    sprintf(buf, "WM1: %ds", InternalMemory.WM1Timer_read());
    e.lcd_draw_text(COLOR_BLACK, COLOR_WHITE, MENU_START_COL, MENU_START_ROW*4, buf);
    sprintf(buf, "WM2: %ds", InternalMemory.WM2Timer_read());
    e.lcd_draw_text(COLOR_BLACK, COLOR_WHITE, MENU_START_COL, MENU_START_ROW*5, buf);
    sprintf(buf, "F: %ds", InternalMemory.FeedingTimer_read());
    e.lcd_draw_text(COLOR_BLACK, COLOR_WHITE, MENU_START_COL, MENU_START_ROW*6, buf);
    sprintf(buf, "S: %ds", InternalMemory.LCDTimer_read());
    e.lcd_draw_text(COLOR_BLACK, COLOR_WHITE, MENU_START_COL, MENU_START_ROW*7, buf);
    sprintf(buf, "H On: %d -> %d", InternalMemory.HeaterTempOn_read(), InternalMemory.HeaterTempOff_read());
    e.lcd_draw_text(COLOR_BLACK, COLOR_WHITE, MENU_START_COL, MENU_START_ROW*9, buf);
    sprintf(buf, "C On: %d -> %d", InternalMemory.ChillerTempOn_read(), InternalMemory.ChillerTempOff_read());
    e.lcd_draw_text(COLOR_BLACK, COLOR_WHITE, MENU_START_COL, MENU_START_ROW*10, buf);
    sprintf(buf, "PH %d - %d", InternalMemory.PHMax_read(), InternalMemory.PHMin_read());
    e.lcd_draw_text(COLOR_BLACK, COLOR_WHITE, MENU_START_COL, MENU_START_ROW*11, buf);

    delay(10000);
    e.lcd_clear(COLOR_WHITE,0,0,132,132);

    sprintf(buf, "OH: %dF", InternalMemory.OverheatTemp_read());
    e.lcd_draw_text(COLOR_BLACK, COLOR_WHITE, MENU_START_COL, MENU_START_ROW, buf);
    sprintf(buf, "ATO L: %ds (%dh)", InternalMemory.ATOTimeout_read(), InternalMemory.ATOHourInterval_read());
    e.lcd_draw_text(COLOR_BLACK, COLOR_WHITE, MENU_START_COL, MENU_START_ROW*2, buf);
    sprintf(buf, "ATO H: %ds (%dh)", InternalMemory.ATOHighTimeout_read(), InternalMemory.ATOHighHourInterval_read());
    e.lcd_draw_text(COLOR_BLACK, COLOR_WHITE, MENU_START_COL, MENU_START_ROW*3, buf);

    sprintf(buf, "DP1: %2d:%02d", InternalMemory.DP1OnHour_read(), InternalMemory.DP1OnMinute_read());
    e.lcd_draw_text(COLOR_BLACK, COLOR_WHITE, MENU_START_COL, MENU_START_ROW*5, buf);
    sprintf(buf, "     %ds", InternalMemory.DP1Timer_read());
    e.lcd_draw_text(COLOR_BLACK, COLOR_WHITE, MENU_START_COL, MENU_START_ROW*6, buf);
    sprintf(buf, "DP2: %2d:%02d", InternalMemory.DP2OnHour_read(), InternalMemory.DP2OnMinute_read());
    e.lcd_draw_text(COLOR_BLACK, COLOR_WHITE, MENU_START_COL, MENU_START_ROW*7, buf);
    sprintf(buf, "     %ds", InternalMemory.DP2Timer_read());
    e.lcd_draw_text(COLOR_BLACK, COLOR_WHITE, MENU_START_COL, MENU_START_ROW*8, buf);

    delay(10000);
    e.lcd_clear(COLOR_WHITE,0,0,132,132);
}
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Wifi Setup Question

Post by rimai »

Slow green blink is good.
It means you got it connected to your network.
What do you mean by no internet access?
Roberto.
chase
Posts: 101
Joined: Fri Sep 16, 2011 8:26 am

Re: Wifi Setup Question

Post by chase »

I was misinterpreting the table wrt the internet access question, based on what you said I think I got it.

Guess I thought after running setup the nominal connection indication should be solid green light indicating connection over TCP. Or does that just mean there is something accessing it over TCP like a webserver connection? If a slow blinking green light is the goal, I guess I'm set.

Only other question was when I try to run the setup for enabling connection timeout and I try to connect over serial (step 15-16) nothing happens. Maybe I'm over thinking it and I should just be using teraterm to access it via IP (instead of serial) to complete the enable connection timeout stuff?
Image
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Wifi Setup Question

Post by binder »

chase wrote:Only other question was when I try to run the setup for enabling connection timeout and I try to connect over serial (step 15-16) nothing happens. Maybe I'm over thinking it and I should just be using teraterm to access it via IP (instead of serial) to complete the enable connection timeout stuff?
Yes, when issuing the commands to program it, you should use teraterm and have the wifi module plugged directly into the controller. It's much simpler that way. I think you can do it via the wifi interface but I'm not 100% positive.

curt
Post Reply