Loading ...
Sorry, an error occurred while loading the content.

Open8610 porting to C# with memory write support

Expand Messages
  • sgnuf
    Hi, I m porting original open8610 C code to C#. All functions of original C code are now working through a C# class I ve created, plus I m testing also the
    Message 1 of 9 , Aug 5, 2011
    • 0 Attachment
      Hi, I'm porting original open8610 C code to C#.
      All functions of original C code are now working through a C# class I've created, plus I'm testing also the write function, which in original code didn't work.
      I reverse engineered LaCrosse Data Recorder and found the correct sequence of commands to enable writing into memory.
      Now I'm implementing it.
      If anyone is interested I'll publish the code.
    • Greg Freemyer
      Does C# work with Linux, or is this Windows only? I ve been keeping a few versions of the open3200 Linux rpms/debs available in my openSSUE build account:
      Message 2 of 9 , Aug 5, 2011
      • 0 Attachment
        Does C# work with Linux, or is this Windows only?

        I've been keeping a few versions of the open3200 Linux rpms/debs available
        in my openSSUE build account:

        https://build.opensuse.org/package/show?package=open2300&project=home%3Agregfreemyer%3AWeather

        If you're interested in doing the same I could add you as a maintainer of
        that project and help you create the rpms/deps.

        Greg

        On Fri, Aug 5, 2011 at 5:07 PM, sgnuf <sgnuf@...> wrote:

        > **
        >
        >
        > Hi, I'm porting original open8610 C code to C#.
        > All functions of original C code are now working through a C# class I've
        > created, plus I'm testing also the write function, which in original code
        > didn't work.
        > I reverse engineered LaCrosse Data Recorder and found the correct sequence
        > of commands to enable writing into memory.
        > Now I'm implementing it.
        > If anyone is interested I'll publish the code.
        >
        >
        >



        --
        Greg Freemyer
        Head of EDD Tape Extraction and Processing team
        Litigation Triage Solutions Specialist
        http://www.linkedin.com/in/gregfreemyer
        CNN/TruTV Aired Forensic Imaging Demo -

        http://insession.blogs.cnn.com/2010/03/23/how-computer-evidence-gets-retrieved/

        The Norcross Group
        The Intersection of Evidence & Technology
        http://www.norcrossgroup.com


        [Non-text portions of this message have been removed]
      • Jeff Bogumil
        It is ALWAYS of interest and great news to hear that people remain active, and haven t abandoned attempts to remedy LaCrosse WS8610 interface deficiencies. In
        Message 3 of 9 , Aug 5, 2011
        • 0 Attachment
          It is ALWAYS of interest and great news to hear that people remain active,
          and haven't abandoned attempts to remedy LaCrosse WS8610 interface
          deficiencies. In fact, I'm currently using a WS8610 to log temperatures,
          hoping to diagnose my refrigerator (misbehaving in summer heat), but have
          had no way to dump the WS8610's 2177 record data cache.

          Please do post your work/code (and executables?) to this Yahoo group.

          Thanks !!!


          [Non-text portions of this message have been removed]
        • Rich Allen
          I d love to see what you came up with. Rich
          Message 4 of 9 , Aug 5, 2011
          • 0 Attachment
            I'd love to see what you came up with.

            Rich


            On 8/5/2011 3:07 PM, sgnuf wrote:
            > Hi, I'm porting original open8610 C code to C#.
            > All functions of original C code are now working through a C# class I've created, plus I'm testing also the write function, which in original code didn't work.
            > I reverse engineered LaCrosse Data Recorder and found the correct sequence of commands to enable writing into memory.
            > Now I'm implementing it.
            > If anyone is interested I'll publish the code.
            >
            >
            >
            > ------------------------------------
            >
            > Yahoo! Groups Links
            >
            >
            >
          • John Liss
            Ditto! -John
            Message 5 of 9 , Aug 5, 2011
            • 0 Attachment
              Ditto!

              -John

              On 8/5/2011 4:49 PM, Rich Allen wrote:
              > I'd love to see what you came up with.
              >
              > Rich
              >
              >
              > On 8/5/2011 3:07 PM, sgnuf wrote:
              >> Hi, I'm porting original open8610 C code to C#.
              >> All functions of original C code are now working through a C# class I've created, plus I'm testing also the write function, which in original code didn't work.
              >> I reverse engineered LaCrosse Data Recorder and found the correct sequence of commands to enable writing into memory.
              >> Now I'm implementing it.
              >> If anyone is interested I'll publish the code.
              >>
              >>
              >>
              >> ------------------------------------
              >>
              >> Yahoo! Groups Links
              >>
              >>
              >>
              >
              > ------------------------------------
              >
              > Yahoo! Groups Links
              >
              >
              >
            • Adrian D. Shaw
              ... It should, yes, if you have mono installed. I run a few mono applications under Ubuntu with no problems. It s possible that there are some things the
              Message 6 of 9 , Aug 6, 2011
              • 0 Attachment
                Ysgrifennodd Greg Freemyer:
                > Does C# work with Linux, or is this Windows only?

                It should, yes, if you have "mono" installed. I run a few mono applications
                under Ubuntu with no problems. It's possible that there are some things the
                developer needs to be aware of, in order not to introduce any MS Windows
                specific code (I don't know) - if so, that would be worth bearing in mind at
                this point.

                Adrian
              • sgnuf
                OK. I confirm that write method is working. I was able to reset memory counter and also write to arbitrary memory locations. I m using WS8610 station connected
                Message 7 of 9 , Aug 7, 2011
                • 0 Attachment
                  OK. I confirm that write method is working. I was able to reset memory
                  counter and also write to arbitrary memory locations.
                  I'm using WS8610 station connected through serial port with 3 external
                  sensors.
                  I've published my code in the files section: WS8610-CS.zip
                  <http://f1.grp.yahoofs.com/v1/IGI-TiNjY9YbspxPcvSFuMWBvo6EW8ciDKlsBCgjZo\
                  fkvAdZdzTMZG7fEfQ34_ol4Ks6AQHR7pH7PK6Bk0dTKQSKq8U/WS8610-CS.zip>
                  For now there is a class library WS8610.dll which you can use in C# .NET
                  2.0 projects.
                  The source code consists of two classes, WS8610SerialWrapper.cs which
                  implements serial port communication, and WS8610Com, which is the public
                  class you may use, exposing following methods:

                  bool Open()
                  bool Close()
                  DateTime GetLastRecordDateTime()
                  int GetStoredHistoryCount()
                  bool ResetStoredHistoryCount()
                  HistoryRecord GetFirstHistoryRecord()
                  HistoryRecord GetLastHistoryRecord()
                  byte[] DumpMemory(short start_addr, short num_bytes)
                  bool WriteMemory(short start_addr, byte[] bytes_to_write)

                  And following properties:

                  bool IsOpen
                  int ExtSensors

                  You can instantiate the class simply passing the port name (ex. "COM1")

                  In the debug folder there is also a compiled dll. I compiled it on
                  Windows 7 x64.
                  I updated also memory_map.txt as I discovered some new information about
                  memory locations.
                  I added also a command line test project WS8610Test, which you can use
                  for testing. In the bin/debug folder there is also a compiled executable
                  which get number of external sensors and last recorded data. You can
                  pass the com port as command line parameter.

                  I think that the .dll can't be used on linux "as is", because the
                  WS8610SerialWrapper class uses Win32 PInvoke calls, which I think are
                  not available on linux, but surely there are equivalent objects. Also I
                  don't know if System.Threading and System.Diagnostics namespaces are
                  available there.
                  I tried to use native .Net SerialPort class, but it didn't work very
                  well, because cannot control some connection parameters, so I had to use
                  Win32 API calls.

                  As soon as I'll have time, I will also update original open8610 C code,
                  correcting some bugs found (changed some int to short because didn't
                  work on my Win7 x64 machine, changed method to get temperature because
                  for third sensor it was wrong, etc...) and adding writing capability.

                  --- In Lacrosse_weather_stations@yahoogroups.com, "sgnuf" <sgnuf@...>
                  wrote:
                  >
                  > Hi, I'm porting original open8610 C code to C#.
                  > All functions of original C code are now working through a C# class
                  I've created, plus I'm testing also the write function, which in
                  original code didn't work.
                  > I reverse engineered LaCrosse Data Recorder and found the correct
                  sequence of commands to enable writing into memory.
                  > Now I'm implementing it.
                  > If anyone is interested I'll publish the code.
                  >



                  [Non-text portions of this message have been removed]
                • randallroman@comcast.net
                  Will you be posting the specs to the write command so that the unix C code can be updated? I m currently using the standard C code base on Linux, and have
                  Message 8 of 9 , Aug 7, 2011
                  • 0 Attachment
                    Will you be posting the specs to the 'write' command so that the unix C code can be updated? I'm currently using the standard C code base on Linux, and have used it under BSD systems as well. I know you can use Mono to run .NET under linux, but personally,
                    I'd like to stick to C, as it is a language I'm familiar with.

                    Thanks,

                    Randy

                    ----- Original Message -----
                    From: "sgnuf" <sgnuf@...>
                    To: "Lacrosse weather stations" <Lacrosse_weather_stations@yahoogroups.com>
                    Sent: Sunday, August 7, 2011 5:29:05 AM
                    Subject: [LacrosseWS] Re: Open8610 porting to C# with memory write support

                    OK. I confirm that write method is working. I was able to reset memory
                    counter and also write to arbitrary memory locations.
                    I'm using WS8610 station connected through serial port with 3 external
                    sensors.
                    I've published my code in the files section: WS8610-CS.zip
                    <http://f1.grp.yahoofs.com/v1/IGI-TiNjY9YbspxPcvSFuMWBvo6EW8ciDKlsBCgjZo\
                    fkvAdZdzTMZG7fEfQ34_ol4Ks6AQHR7pH7PK6Bk0dTKQSKq8U/WS8610-CS.zip>
                    For now there is a class library WS8610.dll which you can use in C# .NET
                    2.0 projects.
                    The source code consists of two classes, WS8610SerialWrapper.cs which
                    implements serial port communication, and WS8610Com, which is the public
                    class you may use, exposing following methods:

                    bool Open()
                    bool Close()
                    DateTime GetLastRecordDateTime()
                    int GetStoredHistoryCount()
                    bool ResetStoredHistoryCount()
                    HistoryRecord GetFirstHistoryRecord()
                    HistoryRecord GetLastHistoryRecord()
                    byte[] DumpMemory(short start_addr, short num_bytes)
                    bool WriteMemory(short start_addr, byte[] bytes_to_write)

                    And following properties:

                    bool IsOpen
                    int ExtSensors

                    You can instantiate the class simply passing the port name (ex. "COM1")

                    In the debug folder there is also a compiled dll. I compiled it on
                    Windows 7 x64.
                    I updated also memory_map.txt as I discovered some new information about
                    memory locations.
                    I added also a command line test project WS8610Test, which you can use
                    for testing. In the bin/debug folder there is also a compiled executable
                    which get number of external sensors and last recorded data. You can
                    pass the com port as command line parameter.

                    I think that the .dll can't be used on linux "as is", because the
                    WS8610SerialWrapper class uses Win32 PInvoke calls, which I think are
                    not available on linux, but surely there are equivalent objects. Also I
                    don't know if System.Threading and System.Diagnostics namespaces are
                    available there.
                    I tried to use native .Net SerialPort class, but it didn't work very
                    well, because cannot control some connection parameters, so I had to use
                    Win32 API calls.

                    As soon as I'll have time, I will also update original open8610 C code,
                    correcting some bugs found (changed some int to short because didn't
                    work on my Win7 x64 machine, changed method to get temperature because
                    for third sensor it was wrong, etc...) and adding writing capability.

                    --- In Lacrosse_weather_stations@yahoogroups.com, "sgnuf" <sgnuf@...>
                    wrote:
                    >
                    > Hi, I'm porting original open8610 C code to C#.
                    > All functions of original C code are now working through a C# class
                    I've created, plus I'm testing also the write function, which in
                    original code didn't work.
                    > I reverse engineered LaCrosse Data Recorder and found the correct
                    sequence of commands to enable writing into memory.
                    > Now I'm implementing it.
                    > If anyone is interested I'll publish the code.
                    >



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



                    ------------------------------------

                    Yahoo! Groups Links
                  • sgnuf
                    OK. I ve patched the C code of open8610, fixing some bugs and added write support. I uploaded source code package to files section. Changelog: -Updated
                    Message 9 of 9 , Aug 8, 2011
                    • 0 Attachment
                      OK. I've patched the C code of open8610, fixing some bugs and added
                      write support. I uploaded source code package to files section.

                      Changelog:
                      -Updated write_data() function to enable effective writing
                      -Fixed some wrong datatypes (did not compile on my windows 7 x64
                      machine), changing some int to short and some PDWORD to ULONG
                      -Fixed wrong calculation for temperature outdoor2
                      -Removed some unused methods (only for WS2300)
                      -Fixed some other minor errors

                      Files modified:
                      memory_map.txt
                      memreset810.c
                      rw8610.c
                      rw8610.h
                      win8610.c
                      win8610.h

                      I think the patch will work for linux too, but I did only little testing
                      on windows, so probably the code needs some more adjustments.


                      --- In Lacrosse_weather_stations@yahoogroups.com, randallroman@...
                      wrote:
                      >
                      >
                      > Will you be posting the specs to the 'write' command so that the unix
                      C code can be updated? I'm currently using the standard C code base on
                      Linux, and have used it under BSD systems as well. I know you can use
                      Mono to run .NET under linux, but personally,
                      > I'd like to stick to C, as it is a language I'm familiar with.
                      >
                      > Thanks,
                      >
                      > Randy
                      >
                      > ----- Original Message -----
                      > From: "sgnuf" sgnuf@...
                      > To: "Lacrosse weather stations"
                      Lacrosse_weather_stations@yahoogroups.com
                      > Sent: Sunday, August 7, 2011 5:29:05 AM
                      > Subject: [LacrosseWS] Re: Open8610 porting to C# with memory write
                      support
                      >
                      > OK. I confirm that write method is working. I was able to reset memory
                      > counter and also write to arbitrary memory locations.
                      > I'm using WS8610 station connected through serial port with 3 external
                      > sensors.
                      > I've published my code in the files section: WS8610-CS.zip
                      >
                      <http://f1.grp.yahoofs.com/v1/IGI-TiNjY9YbspxPcvSFuMWBvo6EW8ciDKlsBCgjZo\
                      \
                      > fkvAdZdzTMZG7fEfQ34_ol4Ks6AQHR7pH7PK6Bk0dTKQSKq8U/WS8610-CS.zip>
                      > For now there is a class library WS8610.dll which you can use in C#
                      .NET
                      > 2.0 projects.
                      > The source code consists of two classes, WS8610SerialWrapper.cs which
                      > implements serial port communication, and WS8610Com, which is the
                      public
                      > class you may use, exposing following methods:
                      >
                      > bool Open()
                      > bool Close()
                      > DateTime GetLastRecordDateTime()
                      > int GetStoredHistoryCount()
                      > bool ResetStoredHistoryCount()
                      > HistoryRecord GetFirstHistoryRecord()
                      > HistoryRecord GetLastHistoryRecord()
                      > byte[] DumpMemory(short start_addr, short num_bytes)
                      > bool WriteMemory(short start_addr, byte[] bytes_to_write)
                      >
                      > And following properties:
                      >
                      > bool IsOpen
                      > int ExtSensors
                      >
                      > You can instantiate the class simply passing the port name (ex.
                      "COM1")
                      >
                      > In the debug folder there is also a compiled dll. I compiled it on
                      > Windows 7 x64.
                      > I updated also memory_map.txt as I discovered some new information
                      about
                      > memory locations.
                      > I added also a command line test project WS8610Test, which you can use
                      > for testing. In the bin/debug folder there is also a compiled
                      executable
                      > which get number of external sensors and last recorded data. You can
                      > pass the com port as command line parameter.
                      >
                      > I think that the .dll can't be used on linux "as is", because the
                      > WS8610SerialWrapper class uses Win32 PInvoke calls, which I think are
                      > not available on linux, but surely there are equivalent objects. Also
                      I
                      > don't know if System.Threading and System.Diagnostics namespaces are
                      > available there.
                      > I tried to use native .Net SerialPort class, but it didn't work very
                      > well, because cannot control some connection parameters, so I had to
                      use
                      > Win32 API calls.
                      >
                      > As soon as I'll have time, I will also update original open8610 C
                      code,
                      > correcting some bugs found (changed some int to short because didn't
                      > work on my Win7 x64 machine, changed method to get temperature because
                      > for third sensor it was wrong, etc...) and adding writing capability.
                      >
                      > --- In Lacrosse_weather_stations@yahoogroups.com, "sgnuf" sgnuf@
                      > wrote:
                      > >
                      > > Hi, I'm porting original open8610 C code to C#.
                      > > All functions of original C code are now working through a C# class
                      > I've created, plus I'm testing also the write function, which in
                      > original code didn't work.
                      > > I reverse engineered LaCrosse Data Recorder and found the correct
                      > sequence of commands to enable writing into memory.
                      > > Now I'm implementing it.
                      > > If anyone is interested I'll publish the code.
                      > >
                      >
                      >
                      >
                      > [Non-text portions of this message have been removed]
                      >
                      >
                      >
                      > ------------------------------------
                      >
                      > Yahoo! Groups Links
                      >



                      [Non-text portions of this message have been removed]
                    Your message has been successfully submitted and would be delivered to recipients shortly.