Primary Navigation

Bad data with USB/serial adapter

I ve written some (free) software to read data from WS23xx stations, using the information on the Open2300 site, for which I am very grateful. While I don t

Message 1 of 4
, Mar 3, 2009

0 Attachment

I've written some (free) software to read data from WS23xx stations, using
the information on the Open2300 site, for which I am very grateful. While I
don't own one of these stations myself, a number of people are using the
software, with varying degrees of success.

The ones having problems are almost invariably using USB/serial adapters,
the problem being 'bad' data values. I know that there are issues with these
stations an USB adapters, but I don't really understand what I'm seeing. the
checksums are always correct. If the problem is that the data is being
corrupted, how is that the checksums are correct? Doesn't the station
calculate the checksum?

I'm reading the data every five seconds. I've tried monitoring the
'countdown' at address 54F to avoid reading when the station is contacting
the sensors, but that hasn't helped; the data corruptions appear at any
time.

Any thoughts or suggestions?

Steve

Marco-Luis SALCEDO TOVAR

HEllo Steve, I dont know where is your data corrupted, but maybe this tool will be usefull for you: SysInternals Port Monitor

Message 2 of 4
, Mar 3, 2009

0 Attachment

HEllo Steve,

I dont know where is your data corrupted, but maybe this tool will be
usefull for you:

> I've written some (free) software to read data from WS23xx stations, using
> the information on the Open2300 site, for which I am very grateful. While
> I
> don't own one of these stations myself, a number of people are using the
> software, with varying degrees of success.
>
> The ones having problems are almost invariably using USB/serial adapters,
> the problem being 'bad' data values. I know that there are issues with
> these
> stations an USB adapters, but I don't really understand what I'm seeing.
> the
> checksums are always correct. If the problem is that the data is being
> corrupted, how is that the checksums are correct? Doesn't the station
> calculate the checksum?
>
> I'm reading the data every five seconds. I've tried monitoring the
> 'countdown' at address 54F to avoid reading when the station is contacting
> the sensors, but that hasn't helped; the data corruptions appear at any
> time.
>
> Any thoughts or suggestions?
>
> Steve
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>

Ken

If you are reading the countown bit, then you should synchronise your readings using it. I m not aware of USB adapters corrupting data (from posts here). Ken.

Message 3 of 4
, Mar 3, 2009

0 Attachment

If you are reading the countown bit, then you should synchronise your
readings using it.
I'm not aware of USB adapters corrupting data (from posts here).

> I've written some (free) software to read data from WS23xx stations, using
> the information on the Open2300 site, for which I am very grateful. While I
> don't own one of these stations myself, a number of people are using the
> software, with varying degrees of success.
>
> The ones having problems are almost invariably using USB/serial adapters,
> the problem being 'bad' data values. I know that there are issues with
> these
> stations an USB adapters, but I don't really understand what I'm seeing.
> the
> checksums are always correct. If the problem is that the data is being
> corrupted, how is that the checksums are correct? Doesn't the station
> calculate the checksum?
>
> I'm reading the data every five seconds. I've tried monitoring the
> 'countdown' at address 54F to avoid reading when the station is contacting
> the sensors, but that hasn't helped; the data corruptions appear at any
> time.
>
> Any thoughts or suggestions?
>
> Steve
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>
>

[Non-text portions of this message have been removed]

ulyganthree

... Yes, I m doing that. ... And since the data I m seeing has correct checksums, you would have to say that the adapter is not corrupting the data. But I m

>
> If you are reading the countown bit, then you should synchronise your
> readings using it.

Yes, I'm doing that.

> I'm not aware of USB adapters corrupting data (from posts here).

And since the data I'm seeing has correct checksums, you would have to say that the adapter is not corrupting the data. But I'm getting bad data.

It always seems to happen after I need to retry a command after a timeout or a bad checksum. I'm doing the reset and resending the command sequence, but what I've just noticed is that when I get bad data, all but the first byte are shifted by four bits. For example, reading the 3 bytes of rain total at 4D2. I expect to get

16 35 02 = 0235.16

but I get

16 51 23 = 2351.16

The checkums are 77 and 138 (decimal) respectively.

I'm prepared to believe that this is a bug in my code, but I can't see how I could cause a 4-bit shift like that as the data is returned in bytes. I'm sending the same sequence of bytes in both cases.

Steve

Your message has been successfully submitted and would be delivered to recipients shortly.