Connection Status:Unreachable Address & WiFi problems

Related to the Portal
User avatar
Express Reef
Posts: 51
Joined: Thu Mar 21, 2013 2:19 am
Location: South Africa

Connection Status:Unreachable Address & WiFi problems

Post by Express Reef »

I'm still struggling to get my web portal to work :oops:
Upgraded to the plus board but now the LCD does not work, looks like the LCD screen is not compatable with the new Plus board?

Here is my new Code for the Plus Board (Don't know if there is a fault in my code maybe?)

#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 <Humidity.h>
#include <DCPump.h>
#include <ReefAngel.h>


void setup()
{
ReefAngel.Init();

InternalMemory.OverheatTemp_write( 260 );
InternalMemory.HeaterTempOn_write( 250 );
InternalMemory.HeaterTempOff_write( 255 );
InternalMemory.ChillerTempOn_write( 260 );
InternalMemory.ChillerTempOff_write( 255 );
InternalMemory.ATOExtendedTimeout_write( 100 );
InternalMemory.ATOHourInterval_write( 0 );
InternalMemory.WaterLevelLow_write( 10 );
InternalMemory.WaterLevelHigh_write( 15 );
InternalMemory.DP1RepeatInterval_write( 30 );
InternalMemory.DP1Timer_write( 30 );
InternalMemory.DP2RepeatInterval_write( 30 );
InternalMemory.DP2Timer_write( 120 );
InternalMemory.DelayedStart_write( 4 );
InternalMemory.PWMSlopeStartD_write( 0 );
InternalMemory.PWMSlopeEndD_write( 45 );
InternalMemory.PWMSlopeStartA_write( 5 );
InternalMemory.PWMSlopeEndA_write( 60 );
InternalMemory.PWMSlopeStart0_write( 0 );
InternalMemory.PWMSlopeEnd0_write( 45 );
InternalMemory.PWMSlopeStart1_write( 5 );
InternalMemory.PWMSlopeEnd1_write( 60 );
InternalMemory.PWMSlopeStart2_write( 10 );
InternalMemory.PWMSlopeEnd2_write( 45 );
InternalMemory.PWMSlopeStart3_write( 0 );
InternalMemory.PWMSlopeEnd3_write( 40 );
InternalMemory.IMCheck_write(0xCF06A31E);
ReefAngel.LCD.DrawText(COLOR_BLACK, COLOR_WHITE, MENU_START_COL+20, MENU_START_ROW*3, "Memory Updated");
ReefAngel.LCD.DrawText(COLOR_BLACK, COLOR_WHITE, MENU_START_COL+25, MENU_START_ROW*6, "You can now");
ReefAngel.LCD.DrawText(COLOR_BLACK, COLOR_WHITE, MENU_START_COL+25, MENU_START_ROW*7, "upload your");
ReefAngel.LCD.DrawText(COLOR_BLACK, COLOR_WHITE, MENU_START_COL+33, MENU_START_ROW*8, "INO code");
}

void loop()
{
wdt_reset();
}


I used this site, as mentioned in another thread: http://www.canyouseeme.org/
and its working
Success: I can see your service on 41.151.xxx.xxx on port (2000)
Your ISP is not blocking port 2000

Registered on no-ip.com
http://xxxxx.no-ip.org:2000/
and its working

Got a ZyXEL NBG4115 router
Port forwarding is setup and Dynamic DNS

I can access my RA through home and away function via the android App and the Reef Angle PC Client. But my web port gives Connection Status:Unreachable Address :!:

Any suggestions? What can possible be wrong???
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Connection Status:Unreachable Address & WiFi problems

Post by rimai »

This code is just internal memory code.
It doesn't do anything for your controller.
I recommend you generate another code with the wizard and choose hard coded settings to make it easy.
As far as your screen, you probably have a gen1 screen and the RA+ board is setup for gen3 screen.
http://forum.reefangel.com/viewtopic.php?f=2&t=3111
So, to set it up for gen1 screens, you need this in your code:

Code: Select all

  InternalMemory.LCDID_write(255);
Place it right above ReefAngel.Init();
Roberto.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Connection Status:Unreachable Address & WiFi problems

Post by rimai »

When you generate the new code, make sure you have this in there:

Code: Select all

ReefAngel.Portal("Express%20Reef");
This is what is going to enable the portal. The wizard is supposed to place it in there for you though.
Roberto.
User avatar
Express Reef
Posts: 51
Joined: Thu Mar 21, 2013 2:19 am
Location: South Africa

Re: Connection Status:Unreachable Address & WiFi problems

Post by Express Reef »

Thank you Roberto, Now the screen is working :-) Happy days!!!
This is my code now...

#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 <Humidity.h>
#include <DCPump.h>
#include <ReefAngel.h>

// Initialize Buzzer variables
byte buzzer=0;
byte overheatflag=0;
byte atoflag=0;

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


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


void setup()
{
// This must be the first line
InternalMemory.LCDID_write(255);
ReefAngel.Init(); //Initialize controller
ReefAngel.SetTemperatureUnit( Celsius ); // set to Celsius Temperature

ReefAngel.Use2014Screen(); // Let's use 2014 Screen
// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = Port6Bit;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port1Bit | Port6Bit;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = 0;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = Port2Bit;
// Use T1 probe as temperature and overheat functions
ReefAngel.TempProbe = T1_PROBE;
ReefAngel.OverheatProbe = T1_PROBE;
// Set the Overheat temperature setting
InternalMemory.OverheatTemp_write( 260 );


// Ports that are always on
ReefAngel.Relay.On( Port5 );
ReefAngel.Relay.On( Port7 );

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


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

void loop()
{
ReefAngel.SingleATO( true,Port1,100,0 );
ReefAngel.StandardHeater( Port2,250,255 );
ReefAngel.StandardFan( Port3,255,260 );
ReefAngel.DosingPumpRepeat( Port4,0,30,30 );
ReefAngel.Relay.DelayedOn( Port6,4 );
ReefAngel.DosingPumpRepeat( Port8,0,30,120 );
ReefAngel.PWM.SetDaylight( PWMParabola(7,0,20,0,0,45,0) );
ReefAngel.PWM.SetActinic( PWMParabola(6,0,21,0,5,60,5) );
ReefAngel.PWM.SetChannel( 0, PWMParabola(7,0,21,0,0,45,0) );
ReefAngel.PWM.SetChannel( 1, PWMParabola(6,0,21,0,5,60,5) );
ReefAngel.PWM.SetChannel( 2, PWMParabola(7,0,20,0,10,45,10) );
ReefAngel.PWM.SetChannel( 3, PWMParabola(7,0,20,0,0,40,0) );
overheatflag = InternalMemory.read( Overheat_Exceed_Flag );
atoflag = InternalMemory.read( ATO_Exceed_Flag );
buzzer = overheatflag + atoflag;
if ( buzzer >= 1 ) buzzer = 100;
ReefAngel.PWM.SetChannel( 4, buzzer );

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


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

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


But the web portal is still not working, but I see it says : Last Update:Monday, December 16, 2013 11:19:56 AM
So something tells me there is something wrong, but nothing majors???
Image
User avatar
Express Reef
Posts: 51
Joined: Thu Mar 21, 2013 2:19 am
Location: South Africa

Re: Connection Status:Unreachable Address & WiFi problems

Post by Express Reef »

Roberto where must I add this?

ReefAngel.Portal("Express%20Reef");
Image
User avatar
Express Reef
Posts: 51
Joined: Thu Mar 21, 2013 2:19 am
Location: South Africa

Re: Connection Status:Unreachable Address & WiFi problems

Post by Express Reef »

Ok changed ReefAngel.Portal( "Express Reef" ); to ReefAngel.Portal("Express%20Reef");

but it is still not working?
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Connection Status:Unreachable Address & WiFi problems

Post by rimai »

I can see updates.
Is it working now?
Roberto.
User avatar
Express Reef
Posts: 51
Joined: Thu Mar 21, 2013 2:19 am
Location: South Africa

Re: Connection Status:Unreachable Address & WiFi problems

Post by Express Reef »

It updated

My reefangelid:
Express Reef
Connection Status:
Unreachable Address

Last Update:
Monday, December 16, 2013 8:06:34 PM
Displaying data from:
Webbanner database

but it is not working still says Unreachable Address
Image
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Connection Status:Unreachable Address & WiFi problems

Post by lnevo »

That is the port forwarding part.
User avatar
Express Reef
Posts: 51
Joined: Thu Mar 21, 2013 2:19 am
Location: South Africa

Re: Connection Status:Unreachable Address & WiFi problems

Post by Express Reef »

@rimai, still not get it to work, last update was Monday, December 16, 2013 10:01:50 PM still get "Unreachable Address" :-(
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Connection Status:Unreachable Address & WiFi problems

Post by rimai »

Can you access you controller using your external ip?
Click on the link with your ipaddress in the portal. What do you get?
Roberto.
User avatar
Express Reef
Posts: 51
Joined: Thu Mar 21, 2013 2:19 am
Location: South Africa

Re: Connection Status:Unreachable Address & WiFi problems

Post by Express Reef »

rimai wrote:Can you access you controller using your external ip?
Click on the link with your ipaddress in the portal. What do you get?
I can access using the external IP. When I click on the link it give Reef Angel web portal will post a pic.
I notice my wifi is not working today, the wifi module is blinking blue and not green like yesterday. I keeps doing this then I need to setup the wifi module again but it keeps like "resetting" then I need to setup it again... What can be the problem?
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Connection Status:Unreachable Address & WiFi problems

Post by rimai »

If it work when you click that link, then your controller is good to go. It must be some other connection problem between the server and your controller.
Blue blinking means it is disconnected from the router.
Is your router far away?
What security are you using?
Try WPA2-PSK with AES encryption. Other people have had problems with other encryption and other security setting.
Roberto.
User avatar
Express Reef
Posts: 51
Joined: Thu Mar 21, 2013 2:19 am
Location: South Africa

Re: Connection Status:Unreachable Address & WiFi problems

Post by Express Reef »

rimai wrote:If it work when you click that link, then your controller is good to go. It must be some other connection problem between the server and your controller.
Blue blinking means it is disconnected from the router.
Is your router far away?
What security are you using?
Try WPA2-PSK with AES encryption. Other people have had problems with other encryption and other security setting.
The router is 1.5m away from the Wi-Fi module. I'm using WPA2-PSK encryption. The portal updates sometimes, last update was 16 December 2013 22:01:50. Still gets Unreachable Address.
Think I must try to update the Wi-Fi module?
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Connection Status:Unreachable Address & WiFi problems

Post by rimai »

What firmware version do you have?
Roberto.
User avatar
Express Reef
Posts: 51
Joined: Thu Mar 21, 2013 2:19 am
Location: South Africa

Re: Connection Status:Unreachable Address & WiFi problems

Post by Express Reef »

rimai wrote:What firmware version do you have?
Don't know. How can I see?
This is totally weird!!!
Connection Status: Unreachable Address
Last Update: 19 December 2013 08:58:35

It says Unreachable address but it updated today :oops: :twisted: :evil:
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Connection Status:Unreachable Address & WiFi problems

Post by rimai »

I can only think that it has to be some connection issue between your controller and the server.
As you can see, your controller does send data, but very sporadically.
I was also unable to connect directly to your controller from here and if I can't, the server will not be able to do either.
I can't even ping your ip address from here.
Can you pm me the latest ip address?
Roberto.
User avatar
Express Reef
Posts: 51
Joined: Thu Mar 21, 2013 2:19 am
Location: South Africa

Re: Connection Status:Unreachable Address & WiFi problems

Post by Express Reef »

@rimai, Just visited Francois, his WiFi module is also not working. He changed over to the Arduino Ethernet, going to get me one too, then hopefully problem solved!
Image
User avatar
Express Reef
Posts: 51
Joined: Thu Mar 21, 2013 2:19 am
Location: South Africa

Re: Connection Status:Unreachable Address & WiFi problems

Post by Express Reef »

@rimai, The portal updated today again, but still gives Unreachable Address! I don't know how I did it but the Android App is now working on Away mode with my cellphone network, where it preciously only worked on my WiFi when I connect to my local WiFi hot spot, so I'm making slow progress!! I must say I'm very impressed with your new agent in South Africa! You will not get better!!! Vernon is going out off his way to help everyone and is going the extra mile!!!
Here is the thread for the local forum in SA.
http://www.mysaltyreef.com/forum/showth ... post120658
Image
butcherman
Posts: 44
Joined: Thu Apr 05, 2012 11:14 am

Re: Connection Status:Unreachable Address & WiFi problems

Post by butcherman »

Express reef where are you located? If in jhb perhaps my self or toolboy can come around

Sent from my GT-I9500 using Tapatalk
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Connection Status:Unreachable Address & WiFi problems

Post by rimai »

It has to be a routing problem when the traffic reaches SA.
Here is a tracert of the packet from here to your RA:
Tracing route to xxxxxxx [197.228.xxx.xxx]
over a maximum of 30 hops:

1 1 ms <1 ms <1 ms 69.198.171.165
2 4 ms 5 ms 4 ms 172.28.141.148
3 6 ms * 6 ms 192.168.67.94
4 6 ms 6 ms 6 ms 209.49.249.93
5 26 ms 7 ms 7 ms ae1d0.mcr1.fremont-ca.us.xo.net [216.156.1.69]
6 12 ms 10 ms 11 ms vb1500.rar3.sanjose-ca.us.xo.net [216.156.0.137]
7 7 ms 7 ms 7 ms 207.88.14.226.ptr.us.xo.net [207.88.14.226]
8 7 ms 7 ms 7 ms 129.250.9.65
9 8 ms 7 ms 7 ms 129.250.5.52
10 81 ms 79 ms 79 ms 129.250.4.102
11 171 ms * 162 ms 129.250.2.145
12 164 ms 170 ms 163 ms 129.250.2.159
13 167 ms 166 ms 166 ms 81.20.67.226
14 372 ms 374 ms 372 ms tpr-ip-esr-6-pos-6-0-0.telkom-ipnet.co.za [196.43.26.46]
15 377 ms 370 ms 377 ms telkom-sa-mcnet-gw.telkom-ipnet.co.za [196.25.49.74]
16 * * * Request timed out.
17 * * * Request timed out.
18 * * * Request timed out.
19 * * * Request timed out.
20 2206 ms 594 ms 539 ms 8ta-228-32-06.telkomadsl.co.za [197.228.xxx.xxx]

Trace complete.
The packets start to get dropped when they reach SA, especially when it gets to your router.
I've seen this happening once in the past and it was related to 3G router connection.
The person was in Thailand, not SA though, but I think it is the same problem.
I think in his case, he confirmed the connection problem when he took his RA to someone's house and used a different internet provider and things started working.
Roberto.
butcherman
Posts: 44
Joined: Thu Apr 05, 2012 11:14 am

Re: Connection Status:Unreachable Address & WiFi problems

Post by butcherman »

Packet loss could be the isp shaping your line. Common practice in sa. I have noticed the internet very sliw the last few days.

Sent from my GT-I9500 using Tapatalk
User avatar
Express Reef
Posts: 51
Joined: Thu Mar 21, 2013 2:19 am
Location: South Africa

Re: Connection Status:Unreachable Address & WiFi problems

Post by Express Reef »

Roberto, I think there is a problem with my WiFi Module.
If I ping the mode I get time outs
Image
Image
User avatar
Express Reef
Posts: 51
Joined: Thu Mar 21, 2013 2:19 am
Location: South Africa

Re: Connection Status:Unreachable Address & WiFi problems

Post by Express Reef »

This is what I get when pinging the WiFi module...
Image
Image
User avatar
Express Reef
Posts: 51
Joined: Thu Mar 21, 2013 2:19 am
Location: South Africa

Re: Connection Status:Unreachable Address & WiFi problems

Post by Express Reef »

I don't get any packing lost when pinging other devices on my WiFi network... its only the WiFi model...?
I updated the WiFi module too but it still does the same...

Attached is the tera term macro file I use to update and program the chips.
To execute, open tera term and go to menu Control->Macro

Or manually, try these commands:
set ftp address 198.175.253.161
set dns name www.reefangel.com
ftp u
save
reboot

Connect again and use this:
set w j 1
set i r 80
set i f 0x06
set s t 0x10
set u m 2
set i p 2
set c s 1420
save
reboot
Image
User avatar
Express Reef
Posts: 51
Joined: Thu Mar 21, 2013 2:19 am
Location: South Africa

Re: Connection Status:Unreachable Address & WiFi problems

Post by Express Reef »

Image
Image
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Connection Status:Unreachable Address & WiFi problems

Post by lnevo »

Your picture links are all broken. The packetloss described was between you and your isp, not on your internal network.
User avatar
Express Reef
Posts: 51
Joined: Thu Mar 21, 2013 2:19 am
Location: South Africa

Re: Connection Status:Unreachable Address & WiFi problems

Post by Express Reef »

Weird I can see the pictures... I get packet-loss if I ping my RA WiFi module...
Image
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Connection Status:Unreachable Address & WiFi problems

Post by lnevo »

The images are from another forum and they only work if you are logged in to mysaltyforum.com

If you can't ping your module than the ip may have changed...is your module blinking green or blue. Blue is not good.
butcherman
Posts: 44
Joined: Thu Apr 05, 2012 11:14 am

Re: Connection Status:Unreachable Address & WiFi problems

Post by butcherman »

I can see the pictures.

Sent from my GT-I9500 using Tapatalk
Post Reply