Menu

Data error on 1D... when reading DS2423

Help
2007-04-24
2012-09-14
  • Andreas Wrede

    Andreas Wrede - 2007-04-24

    When trying to owread a counter from a DS2423 I get a data error. In owhttp it shows up as "Error: Invalid argument" insdtead of the counter value.

    Client:
    $ owread -s 10.99.1.1:3001 1D.96A001000000/counters.A
    Data error on 1D.96A001000000/counters.A

    Debug output from owserver is:

    DEBUG: Cache_Get 1D 96 A0 01 00 00 00 7C size=8 IsUncachedDir=0
    DEBUG: Get from cache sn 1D 96 A0 01 00 00 00 7C pointer=0xbbbe07a4 index=0 size=8
    DEBUG: value not found in cache
    DEBUG: Selecting a path (and device) path=1D.96A001000000/counters.A SN=1D 96 A0 01 00 00 00 7C la
    st path=00 00 00 00 00 00 00 00
    DEBUG: Transaction select = 0
    DEBUG: Transaction send = 0
    DEBUG: Transaction readin = 0
    DEBUG: Transaction CRC16 = 0
    DEBUG: Transaction end = 0
    DEBUG: FS_r_given_bus FS_r_local return=-22
    DEBUG: FS_r_given_bus return -22
    DEBUG: READ_POSTPOSTPARSE: 1D.96A001000000/counters.A return -22
    DEBUG: Delete from cache sn 1D 96 A0 01 00 00 00 7C in=0x804f000 index=-1
    DEBUG: READ_POSTPARSE 1D.96A001000000/counters.A return -22
    OWSERVER read on 1D.96A001000000/counters.A return = -22
    OWQ OneWireQuery structure of 1D.96A001000000/counters.A
    OneWireQuery size=8096 offset=0, extension=0
    Byte buffer OneWireQuery buffer, length=8096
    -- 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    [SNIP - all zeros]
    -- 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    <.....................[8000 dots snipped]...........................................................................>
    OneWireQuery I=0 U=0 F=1.2732E-313 Y=0 D=Wed Dec 31 19:00:00 1969

    --- OneWireQuery done
    DEBUG: ReadHandler: To Client cm->payload=0 cm->size=0 cm->offset=0
    DEBUG: ReadHandler: return size=0 [(null)]
    DEBUG: Read message done retbuffer=0x0
    DEBUG: FS_OWQ_destroy of 1D.96A001000000/counters.A
    DEBUG: ParsedName_destroy 1D.96A001000000/counters.A
    DEBUG: RealHandler: FS_ParsedName_destroy done
    DEBUG: RealHandler: cm.ret=-22
    DEBUG: ToClient payload=0 size=0, ret=-22, sg=102 offset=0
    DEBUG: RealHandler: done

    The DS2423 is part of a 1-Wire weather station. Running oww on the same machine shows the counters as working. I have no problems reading other 1-wire devices, like DS18S20 or a DS2450 with owread/owserver

    Any ideas?

     
    • Anders Simonsson

      Checked the CVS repository, but do not know how to obtain the correct devlopment software.

      Halp appreciated.

      //Anders

       
      • Anders Simonsson

        Seems like it was the counter that was broken. A new one works.

        //A

         
    • JohnneyBoy

      JohnneyBoy - 2007-04-24

      Hello,

      I have just plugged into my net a DS2423, and get the same results. I can however read back the family, type, id... but not the memory, counters.A, counters.B, counters.ALL or mincount all come up with 'Data error'

      John

       
    • Andreas Wrede

      Andreas Wrede - 2007-04-24

      Looks like the same problem. For me it occurs with the owfs-2.6p4 release as well as the current cvs tree.

       
    • jpa

      jpa - 2007-04-26

      I'm having the same problem. Digitemp reads my DS2423 ok, but owhttpd shows "Invalid argument". Owpython returns random data from memory, often containing piece of the device path.

       
    • Andreas Wrede

      Andreas Wrede - 2007-04-26

      OK, it looks like I am not the only one with this problem. I am new in this forum (and to owfs), so what is the next step? Are developers reading these messages or should I file a bug report via the tracker?

       
    • jpa

      jpa - 2007-04-28

      The problems seems to be these three lines in module/owlib/src/c/ow_2423.c:

      if (extra[4] != 0x55 || extra[5] != 0x55 || extra[6] != 0x55
      || extra[7] != 0x55)
      return 1;

      I really don't understand their purpose, but simply commenting them out got it working..

       
      • Anders Simonsson

        I have this error now.
        Running owfs 2.7p4 on slack 12.1.

        I can read type, address etc... but not counter data.
        "cat counters.ALL" replies "cat: counters.ALL: Invalid argument"

        Checked the jpa- reply and the settings in the file ow_2423.c was 0x00.

        Really annoying.

        Any suggestions?

         
        • Christian Magnusson

          This was fixed in the CVS some time ago... 2.7p5 should work correctly, so I guess Paul should make a new version as soon as possible.

          /Christian

           
      • JohnneyBoy

        JohnneyBoy - 2007-04-28

        Hello,

        I have just read the datasheet fo rthe said device, and it looks like all these locations should be 0x00 !!

        John

         
    • JohnneyBoy

      JohnneyBoy - 2007-04-28

      Hello,

      Just changed the code on my install to

              if (extra[4] != 0x00 || extra[5] != 0x00 || extra[6] != 0x00
                  || extra[7] != 0x00)
                  return 1;
      

      Works, just fine.

      John

       
    • Anders Simonsson

      I'll try the latest CVS.

      //Anders

       
MongoDB Logo MongoDB
Gen AI apps are built with MongoDB Atlas
Atlas offers built-in vector search and global availability across 125+ regions. Start building AI apps faster, all in one place.