PC Logging
PC Logging
Hello:
I have the Client Suite 2.1 installed and attempting to have it connect to the RA. I note in the instructions for the Reef Client it refers to the following.
"If you are communicating with the USB Cable, you must enable PC Logging inside RAGen to work properly. "
yet I can find no mention of a PC Logging option in RAGen.
Thanks
I have the Client Suite 2.1 installed and attempting to have it connect to the RA. I note in the instructions for the Reef Client it refers to the following.
"If you are communicating with the USB Cable, you must enable PC Logging inside RAGen to work properly. "
yet I can find no mention of a PC Logging option in RAGen.
Thanks
-=Bryan=-
Re: PC Logging
Oops, okay i see PC logging is no longer supported. Have pin 5 (Tx) and pin 4 (Rx) hooked up to a scope and not seeing any activity, so not sure if it's the sketch that's the problem.
ReefAngel_features.h
The Sketch
ReefAngel_features.h
Code: Select all
/*
If you have the wifi module for your controller and wish to use it, you must uncomment this next line
to utilize the built-in webserver for the controller.
*/
#define wifi
Code: Select all
// Autogenerated file by RAGen (v1.0.4.93), (07/18/2011 23:01)
// RA_071811_2301.pde
//
// This version designed for v0.8.5 Beta 12 or later
/* The following features are enabled for this PDE File:
#define DisplayImages
#define SetupExtras
#define WavemakerSetup
#define DateTimeSetup
#define VersionMenu
#define ATOSetup
#define MetalHalideSetup
#define DirectTempSensor
#define DisplayLEDPWM
#define wifi
#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>
void setup()
{
ReefAngel.Init(); //Initialize controller
// Ports that are always on
ReefAngel.Relay.On(Port8);
}
void loop()
{
ReefAngel.ShowInterface();
// Specific functions
ReefAngel.StandardATO(Port1);
ReefAngel.StandardLights(Port2);
ReefAngel.MHLights(Port3);
ReefAngel.Wavemaker1(Port4);
ReefAngel.Wavemaker2(Port5);
ReefAngel.StandardFan(Port6);
ReefAngel.StandardHeater(Port7);
}
-=Bryan=-
Re: PC Logging
You're right, the PCLogging feature is now obsolete. For WiFi or USB, all you need is the wifi line in your features file and uploaded to the controller
After that, all you need to do is configure and start the Listener service. Are you connecting over WiFi or USB?
If wifi, make sure you are seeing a response from the built in web server by browsing to the ip address of your wifi adapter inside of a browser. Something like http://192.168.1.110:2000. If the browser displays "ReefAngel Web Server" you know you're good. Just plug in the ip address and port # in the configuration screen.
If you're connecting over USB, make sure the Listener is configured for it, and you have the correct COM and Baud rate chosen. It will be the same com/baud that you have configured in arduinio for uploading new sketches. The important thing to remember over USB is that only one process can communicate to the controller over usb at a time. So if you're running the listener, you will not be able to upload a new sketch until you stop it. If you have usb configured correctly, make sure you close the arduino IDE, and try stopping/restarting the Listener service.
Code: Select all
#define wifi
If wifi, make sure you are seeing a response from the built in web server by browsing to the ip address of your wifi adapter inside of a browser. Something like http://192.168.1.110:2000. If the browser displays "ReefAngel Web Server" you know you're good. Just plug in the ip address and port # in the configuration screen.
If you're connecting over USB, make sure the Listener is configured for it, and you have the correct COM and Baud rate chosen. It will be the same com/baud that you have configured in arduinio for uploading new sketches. The important thing to remember over USB is that only one process can communicate to the controller over usb at a time. So if you're running the listener, you will not be able to upload a new sketch until you stop it. If you have usb configured correctly, make sure you close the arduino IDE, and try stopping/restarting the Listener service.
Re: PC Logging
the controller no longer pushes the data to the client suite...it is all pull requests. this just means that the listener requests the data at a specified interval. the only thing that is a push from the controller is if you are having it update a web banner at reefangel.com. if you are doing this then you will not be able to run the client suite. the client suite does have the ability to send data to reefangel.com for a web banner.
curt
curt
Re: PC Logging
binder wrote:the controller no longer pushes the data to the client suite...it is all pull requests. this just means that the listener requests the data at a specified interval. the only thing that is a push from the controller is if you are having it update a web banner at reefangel.com. if you are doing this then you will not be able to run the client suite. the client suite does have the ability to send data to reefangel.com for a web banner.
curt
Thanks for the help folks. I don't have a USB TTL cable so was just trying a test. Can I not hook tx and rx to a MAX232 and then on to the serial port of the PC. The client suite listener should send a request to the controller as long as the correct com port is identified in the client suite?
Should not the pc be able to capture data in this fashion as well for the "Dump log to PC"
-=Bryan=-
Re: PC Logging
I'm not positive on this one. That would be more of a roberto question. I would think this would work but cannot say with 100% confidence.Bryan wrote: Thanks for the help folks. I don't have a USB TTL cable so was just trying a test. Can I not hook tx and rx to a MAX232 and then on to the serial port of the PC. The client suite listener should send a request to the controller as long as the correct com port is identified in the client suite?
I'm curious as to how you do not have a USB TTL cable. I didn't think you could buy a controller now without getting the cable. Anyways, not the point.
This sounds like you have been running the Simple/Demo Software that ships with the controller. If you plan on running the Client Suite you will need to upgrade to my development libraries in order for it to work. It sounds like you know this but I wanted to make sure.Should not the pc be able to capture data in this fashion as well for the "Dump log to PC"
I do not know the "Dump log to PC" option so I cannot comment on it.
curt
Re: PC Logging
The max232 works just the same, if your computer has a serial port.
Most computers nowadays only offer USB though.
If you open a serial monitor app, such as Tera Term or Putty, you can see exchange serial data with the controller.
If you plan on developing your own PC application, you can basically dump any kind of data that you want to the PC.
"Dump log to PC" was created only for the demo code and it was meant only for demonstration purposes.
I would also highly recommend upgrading the libraries to "Development". You will get much more from it.
Here is an easy way to upgrade:
http://forum.reefangel.com/viewtopic.php?f=8&t=2
Most computers nowadays only offer USB though.
If you open a serial monitor app, such as Tera Term or Putty, you can see exchange serial data with the controller.
If you plan on developing your own PC application, you can basically dump any kind of data that you want to the PC.
"Dump log to PC" was created only for the demo code and it was meant only for demonstration purposes.
I would also highly recommend upgrading the libraries to "Development". You will get much more from it.
Here is an easy way to upgrade:
http://forum.reefangel.com/viewtopic.php?f=8&t=2
Roberto.
Re: PC Logging
rimai wrote:The max232 works just the same, if your computer has a serial port.
Most computers nowadays only offer USB though.
If you open a serial monitor app, such as Tera Term or Putty, you can see exchange serial data with the controller.
If you plan on developing your own PC application, you can basically dump any kind of data that you want to the PC.
"Dump log to PC" was created only for the demo code and it was meant only for demonstration purposes.
I would also highly recommend upgrading the libraries to "Development". You will get much more from it.
Here is an easy way to upgrade:
http://forum.reefangel.com/viewtopic.php?f=8&t=2
Well, gettting there, problem was a miswired cap on the max232. With the preloaded code using the "Dump to PC", "dump Parameters to PC" I can transmit a bunch of garbage characters to the pc using Putty with 57600, 8,1,N,. Seems to follow a pattern so think the baud rate may be mismatched.
Using the development libraries and the RAgen I can not get anything on Putty or with ReefClient 2.1. Could see not getting anything with Putty because it needs to pull from the controller, although nothing on Putty when I click keys on the computer.
Getting close anyways.
-=Bryan=-
Re: PC Logging
"Dump to PC" uses 115200 baud
When sending requests to controller, use "GET /r99"
When sending requests to controller, use "GET /r99"
Roberto.
Re: PC Logging
rimai wrote:"Dump to PC" uses 115200 baud
When sending requests to controller, use "GET /r99"
Thanks, tried 115200, but still garbage, could be the wiring etc. Is the Reef Client 56700?. I don't think the com port is being opened up by the Reef Client as I can still open the same port with Putty. The reef client should have locked the port??. I do receive some garbage characters on Putty about every minute or so, which doesn't make sense unless the controller is sending it out?
-=Bryan=-
Re: PC Logging
Yes, the wifi will work on 57600 and since the Client uses the same wifi coding, it would use 57600 too.
On wifi mode, the Client will open tcp and immediatelly closes it. On serial mode, it keeps it open.
Make sure the listener service is running on the client dashboard and it is configured to use serial mode.
On wifi mode, the Client will open tcp and immediatelly closes it. On serial mode, it keeps it open.
Make sure the listener service is running on the client dashboard and it is configured to use serial mode.
Roberto.
Re: PC Logging
Hi Roberto:
When you refer to configure serial, do you mean from ReefClient Service Dashboard Wifi NOT selected. I have Port 16 open at 56700, as well as "Listener" and "Logger" service running.. As you can see from thr pic I can open up Putty at anytime on Port 16 56700,8,N,1, and some data comes through every minute or so. Seems the listener is not "listening" otherwise the port would not be available for Putty?
When you refer to configure serial, do you mean from ReefClient Service Dashboard Wifi NOT selected. I have Port 16 open at 56700, as well as "Listener" and "Logger" service running.. As you can see from thr pic I can open up Putty at anytime on Port 16 56700,8,N,1, and some data comes through every minute or so. Seems the listener is not "listening" otherwise the port would not be available for Putty?
-=Bryan=-
Re: PC Logging
What do you have on "COM Port" under menu "Settings->Modify" and tab "General"?
Roberto.
Re: PC Logging
No go, I have changed around with it so many times I must have typed it in wrong on the last go, changed to 57600, but still not working. Still can't explain why putty will open up when reef Client is open, the port should be locked. Strange. Wonder if it is my max232 setup is part of the problem. Think I best try a pic USART project to see if it can communicate correctly with putty at 57600. Perhaps the data is garbled and the controller doesn't recognize the sequence.
-=Bryan=-
Re: PC Logging
Load this to the controller and open putty at 57600. Can you see anything?
Code: Select all
void setup()
{
Serial.begin(57600);
}
void loop()
{
Serial.println("I'm here");
delay(1000);
}
Roberto.
Re: PC Logging
Bryan, it might be a timing issue.
If the Listener cannot open the serial port COM16 on 57600 right away, an internal timer will start for 30 seconds and then it will try again. It will repeat that process until it can lock the serial port and begin communicating.
In addition to that, when you make core changes to the listener settings, it will restart the service in order to actually apply them. It takes a bit to do that and you should probably see some red text at the bottom status bar of the Client saying "Unable to connect. Retrying in 2:00". After two minutes the Client will reconnect and begin displaying data.
I'm attaching a copy of the newest version of the "ReefAngel Serial Reader" application that comes bundled with the client suite installation. The older version that you have still relies on the controller to send out updates every 15 seconds which it no longer does. This new version uses the same Serial Port logic that the RA Listener uses to connect and send/receive data. So if this works for you, the Listener should also be doing its thing correctly.
To start with, just update your com port and baud rate and press the Open Serial Port button. It should say "Opened... Now Listening". If it does, just press the send button and see if you get a response similar to the one below. Make sure teraterm or putty is closed first and also stop the Listener Service from the dashboard.
If the Listener cannot open the serial port COM16 on 57600 right away, an internal timer will start for 30 seconds and then it will try again. It will repeat that process until it can lock the serial port and begin communicating.
In addition to that, when you make core changes to the listener settings, it will restart the service in order to actually apply them. It takes a bit to do that and you should probably see some red text at the bottom status bar of the Client saying "Unable to connect. Retrying in 2:00". After two minutes the Client will reconnect and begin displaying data.
I'm attaching a copy of the newest version of the "ReefAngel Serial Reader" application that comes bundled with the client suite installation. The older version that you have still relies on the controller to send out updates every 15 seconds which it no longer does. This new version uses the same Serial Port logic that the RA Listener uses to connect and send/receive data. So if this works for you, the Listener should also be doing its thing correctly.
To start with, just update your com port and baud rate and press the Open Serial Port button. It should say "Opened... Now Listening". If it does, just press the send button and see if you get a response similar to the one below. Make sure teraterm or putty is closed first and also stop the Listener Service from the dashboard.
- Attachments
-
- ReefAngelSerialReader.zip
- (27.57 KiB) Downloaded 559 times
Re: PC Logging
Success!!!.
Problem was twofold. I was getting the red text at the bottom, but while the listener was waiting to connect and turn green I would open Putty. This obviously locked the port for Reef Client so it could not receive anything from the listener. The garbage data on Putty was due to a cap on the MAX232 circuit not being fully seated. The SerialReader app worked like a charm, very helpful.
Picture speaks a thousand words. Thanks everyone, much appreciated.
Problem was twofold. I was getting the red text at the bottom, but while the listener was waiting to connect and turn green I would open Putty. This obviously locked the port for Reef Client so it could not receive anything from the listener. The garbage data on Putty was due to a cap on the MAX232 circuit not being fully seated. The SerialReader app worked like a charm, very helpful.
Picture speaks a thousand words. Thanks everyone, much appreciated.
-=Bryan=-
Re: PC Logging
Glad you got it working, Bryan.
Hate to do it to ya, but it might be a good time now to uninstall that version and have a go at my latest version that I just committed a few minutes ago. Looks like you're using celsius so the latest version might be a bit better for you. Have a look over here http://forum.reefangel.com/viewtopic.php?f=8&t=175
Hate to do it to ya, but it might be a good time now to uninstall that version and have a go at my latest version that I just committed a few minutes ago. Looks like you're using celsius so the latest version might be a bit better for you. Have a look over here http://forum.reefangel.com/viewtopic.php?f=8&t=175