yodebu / currentcostgui

Automatically exported from code.google.com/p/currentcostgui
GNU General Public License v3.0
0 stars 0 forks source link

Classic connection problem #8

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I have Classic Cost Monitor but I am unable to download information from 
it to CurrentCost GUI. My computer is running XP3.

When I try to connect via COM1 I get a message "waiting for data from 
current cost meter 1 update remaining"  My computer then hangs and also 
the information on the Cost Monitor goes blank.

I see a similar problem was posted about the new CC128 Monitor but the 
solution given only made my problem worse....I had to pair the Transmitter 
and Monitor again and start again!

Original issue reported on code.google.com by ronn...@aol.com on 9 Jul 2009 at 5:33

GoogleCodeExporter commented 8 years ago
Does the live tab work?

Original comment by dale.l...@gmail.com on 9 Jul 2009 at 11:13

GoogleCodeExporter commented 8 years ago
What is the live tab? 

Original comment by ronn...@aol.com on 10 Jul 2009 at 5:35

GoogleCodeExporter commented 8 years ago
If you connect using: 
Show live data -> Connect via serial port

Does that open a new tab in the GUI, labelled 'Live', showing live data?

Original comment by dale.l...@gmail.com on 12 Jul 2009 at 10:09

GoogleCodeExporter commented 8 years ago
Thanks for your reply.

It automatically goes to that 'Live' page but then displays "waiting for data 
from 
current cost meter 1 update remaining". No data has been downloaded and the 
process 
just hangs.

I see drivers are needed when a USB connection is used. Do you need drivers for 
ethernet connections? 

Original comment by ronn...@aol.com on 12 Jul 2009 at 11:22

GoogleCodeExporter commented 8 years ago
Ethernet connection? How would you make an ethernet connection?

What settings have you been using when you tried to make a serial connection? 
(i.e.
what COM port did you specify? How did you identify the COM port to use?)

Original comment by dale.l...@gmail.com on 12 Jul 2009 at 12:49

GoogleCodeExporter commented 8 years ago
My computer is running XP-sp3. Device Manager shows Ports (COM+LPT) The 
communications port shows COM1.

In Current Cost I have therefore specified COM1 as the port to connect to. I 
then 
connected one end of the ethernet cable to the meter and the other end to the 
port 
at the back of my computer.

Original comment by ronn...@aol.com on 12 Jul 2009 at 5:03

GoogleCodeExporter commented 8 years ago
Ah - now I see where the confusion is!

CurrentCost devices do not have an ethernet connection. They provide a serial
connection only.

It is logically and electronically a RS-232 serial connection, that they 
connected to
a physical ethernet port. 

The first range of cables that CurrentCost made available had an ethernet-type 
plug
at one end, and a serial port at the other. And the cable internally mapped the 
pins
across, so that you could plug it into your computer's COM port and treat like 
the
regular serial device that it really is. 

Some people, like Alexis Birkhill, worked out how to do this for themselves - 
his
blog (e.inst.in) shows how to wire such a cable together for yourself if you are
electrically minded. 

My app was written back then, which is why it assumes that users will provide a 
COM
port (if they use Windows) or a /dev/ serial device (if they use Linux).

It turned out that the majority of users plugged the CurrentCost-provided 
serial plug
into a serial-to-USB converter, such as the one that I bought from Maplins. 
This is a
cable with a serial socket at one end, and a USB plug at the other. It has a 
chip in
it to perform the conversion, and requires the use of a software driver 
installed in
either Windows or Linux to enable the computer to make a serial connection 
through a
USB socket.

Fortunately, my software carried on working regardless - it didn't notice any
difference between people using the serial cable, or the converter USB cables. 
(In
the config for the serial-to-USB driver, you specify the COM port that the 
converter
driver software should make available to Windows as the virtual serial port. If 
you
give that COM port to my software, it is "fooled" into thinking it is talking 
to a
regular COM port).

This became so widespread that, at some later point, CurrentCost apparently 
started
distributing combined serial and serial-to-USB cables. This means you have a 
cable
which does:
RJ-45 ethernet socket -> (physical mapping of wires) -> RS-232 serial cable -> 
(chip
converting to) -> USB plug

This still requires the use of a serial-to-USB driver as before - as it is the 
same
approach as before... just giving a bundle of two cables in one.

This is all a long-winded way of saying that you can't just plug a regular 
ethernet
cable in and hope that it will work. As I said at the start, CurrentCost 
devices are
serial devices and need a serial cable and connection in order to communicate 
with
them. Or you can't just pick an available COM port on your machine for the 
combined
cable to be able to work - you need to choose the COM port that a converter 
driver is
using to 'fake' a serial virtual connection.

I hope this has been helpful. And please accept my apologies for not spotting 
the
confusion at the start - I didn't realise that you weren't aware what the 
socket on
CurrentCost devices were.

(Finally - please note that I do not work for CurrentCost. I assume that the 
use of
an RJ-45 socket was done for reasons of reducing production costs, but this is a
guess, and I cannot comment on the rationale or merits of using an ethernet 
socket to
make a serial connection.)

Original comment by dale.l...@gmail.com on 12 Jul 2009 at 9:28

GoogleCodeExporter commented 8 years ago
Thank you for your very helpful reply. 

I will have a go at wiring a cable myself and if I don't succeed I will buy one.

Your software looks great. It's a shame the meter, cable and your software are 
not 
packaged together!

Original comment by ronn...@aol.com on 13 Jul 2009 at 6:03

GoogleCodeExporter commented 8 years ago
Update: The link I gave for a blog post outlining how to make the cable was 
wrong. I
should've wrote:

http://e.inste.in/2008/06/15/interfacing-the-currentcost-meter-to-your-pc/

Thanks for your reply - best of luck with getting it to work!

Original comment by dale.l...@gmail.com on 13 Jul 2009 at 7:30

GoogleCodeExporter commented 8 years ago
closing - as there doesn't appear to be a code problem here

Original comment by dale.l...@gmail.com on 10 Aug 2009 at 10:00

GoogleCodeExporter commented 8 years ago
This software does not work with Windows 7 RC1
And RS-232 serial cable ports are not available on new machines. 
This also misleads: "RJ45 to USB(A) 'active' cables allow the download of data 
from 
the Current Cost display to a PC"; taken from 
(http://www.currentcost.com/product-
datacable.html)into ones thinking that ethernet connections may be used

Original comment by charlesp...@gmail.com on 30 Aug 2009 at 2:00

GoogleCodeExporter commented 8 years ago
@charlesprattuk

Many thanks for your comment re: Windows 7 - this isn't something that I've had 
the
chance to try.

It's true that most new computers don't have serial ports - I don't have any
computers with serial ports myself. Which is why most people use the USB cable 
instead.

Finally, I agree that there is some confusion about the RJ45 socket on 
CurrentCost
meters - it's something I've written about several times, including on this 
page!
(Scroll up to my comment at
http://code.google.com/p/currentcostgui/issues/detail?id=8&can=1#c7 ). However, 
it
might be more useful to talk to CurrentCost themselves rather than me if you 
have
feedback about their website.

Kind regards

D 

Original comment by dale.l...@gmail.com on 30 Aug 2009 at 9:40