owtcl and writing data

classic Classic list List threaded Threaded
18 messages Options
Reply | Threaded
Open this post in threaded view
|

owtcl and writing data

Jan Kandziora
Serg (and anybody else who may it concern),

I got some problems with owtcl (owfs-2.1p0RC-1). I connected a single DS2406
to an 1-Wire/USB-adapter and used owtcl to control a single LED, hooked up on
its PIO pin. Unfortunately, it works *a little bit*, so I think I found a
serious bug in owtcl or owlib.

Please teak a look into the test code below. The first 10 to 70 (varies)
cycles of the loop the LED blinks but I get an

unknown error 4294967295

After about 2..5s (varies), I get an

invalid argument

And the DS2406 output does not change any more. Any more info needed?

Kind regards

        Jan

test.tcl (368 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: owtcl and writing data

Paul Alfille
On Saturday 11 June 2005 04:53 pm, Jan Kandziora wrote:

> Serg (and anybody else who may it concern),
>
> I got some problems with owtcl (owfs-2.1p0RC-1). I connected a single
> DS2406 to an 1-Wire/USB-adapter and used owtcl to control a single LED,
> hooked up on its PIO pin. Unfortunately, it works *a little bit*, so I
> think I found a serious bug in owtcl or owlib.
>
> Please teak a look into the test code below. The first 10 to 70 (varies)
> cycles of the loop the LED blinks but I get an
>
> unknown error 4294967295
this is 0xFFFFFFFF or -1

>
> After about 2..5s (varies), I get an
>
> invalid argument
>
> And the DS2406 output does not change any more. Any more info needed?
>
> Kind regards
>
> Jan


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

Re: owtcl and writing data

Jan Kandziora
Am Sonntag, 12. Juni 2005 03:55 schrieb Paul Alfille:

> On Saturday 11 June 2005 04:53 pm, Jan Kandziora wrote:
> > Serg (and anybody else who may it concern),
> >
> > I got some problems with owtcl (owfs-2.1p0RC-1). I connected a single
> > DS2406 to an 1-Wire/USB-adapter and used owtcl to control a single LED,
> > hooked up on its PIO pin. Unfortunately, it works *a little bit*, so I
> > think I found a serious bug in owtcl or owlib.
> >
> > Please teak a look into the test code below. The first 10 to 70 (varies)
> > cycles of the loop the LED blinks but I get an
> >
> > unknown error 4294967295
>
> this is 0xFFFFFFFF or -1
>
Then we have another bug here, "should be printed out signed". ^^;
However, any idea what's wrong?

Kind regards

        Jan
--
Microsoft should switch to the vacuum cleaner business where people
actually want products that suck.


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

Re: owtcl and writing data

Serg Oskin
In reply to this post by Jan Kandziora
 Sat, 11/06/2005 в 22:53 +0200, Jan Kandziora wrote:

> Serg (and anybody else who may it concern),
>
> I got some problems with owtcl (owfs-2.1p0RC-1). I connected a single DS2406
> to an 1-Wire/USB-adapter and used owtcl to control a single LED, hooked up on
> its PIO pin. Unfortunately, it works *a little bit*, so I think I found a
> serious bug in owtcl or owlib.
>
> Please teak a look into the test code below. The first 10 to 70 (varies)
> cycles of the loop the LED blinks but I get an
>
> unknown error 4294967295
>
> After about 2..5s (varies), I get an
>
> invalid argument
>
> And the DS2406 output does not change any more. Any more info needed?
>
> Kind regards
>
> Jan

I think, that in /var/log/messages you will find out messages with words
"bulk" and "usb"... I consider it as instability of work of driver USB
in Linux. :( I am possible is not right.

--
        Serg. (http://oskin.ru)
~
~
:q!



-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r 
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

Re: owtcl and writing data

Paul Alfille
In reply to this post by Jan Kandziora
On Saturday 11 June 2005 04:53 pm, Jan Kandziora wrote:

> Serg (and anybody else who may it concern),
>
> I got some problems with owtcl (owfs-2.1p0RC-1). I connected a single
> DS2406 to an 1-Wire/USB-adapter and used owtcl to control a single LED,
> hooked up on its PIO pin. Unfortunately, it works *a little bit*, so I
> think I found a serious bug in owtcl or owlib.
>
> Please teak a look into the test code below. The first 10 to 70 (varies)
> cycles of the loop the LED blinks but I get an
>
> unknown error 4294967295
>
> After about 2..5s (varies), I get an
>
> invalid argument
>
> And the DS2406 output does not change any more. Any more info needed?
>
> Kind regards
>
> Jan

Works fine from Shell scripts.

DS9490 USB adapter.
Newest code from CVS
A few chips on board, and a 3-pin 2406

Ran the script:

while : ; do \
  echo "1" > /mnt/1wire/12.C4DF1F000000/PIO.A  \
    sleep .2 \
  echo "0" > /mnt/1wire/12.C4DF1F000000/PIO.A \
   sleep .3 \
done

Which has been blinking very nicely for a while, now.

Next removed the pauses, since you don't pause. Still works fine (faster).

Next, tried perl:

perl -MOW -e "my \$p=qq[/12.C4DF1F000000/PIO.A];OW::init(qq[u]);while(1)
{ OW::put(\$p,1);OW::put(\$p,0)}"

Blinks even faster.

All I can conclude is that:
1. owtcl has a problem
2. Distribution differences (SuSE 9.2 here)
3. Slightly newer version here.
4. Hardware problem.

I'm voting for 1.
Why not try the scripts I list above (owfs was invoked for the shell script
with "/opt/owfs/bin/owfs -u /mnt/1wire" ) to see if we can further figure
this out.

(Of course substitute your DS2406's serial number).

Paul


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

Re: owtcl and writing data

Jan Kandziora
In reply to this post by Serg Oskin
Am Montag, 13. Juni 2005 01:30 schrieb Serg Oskin:

> > Please teak a look into the test code below. The first 10 to 70 (varies)
> > cycles of the loop the LED blinks but I get an
> >
> > unknown error 4294967295
> >
> > After about 2..5s (varies), I get an
> >
> > invalid argument
> >
> > And the DS2406 output does not change any more. Any more info needed?
> >
> > Kind regards
> >
> > Jan
>
> I think, that in /var/log/messages you will find out messages with words
> "bulk" and "usb"... I consider it as instability of work of driver USB
> in Linux. :( I am possible is not right.
>
No, I don't get such kernel messages. MY kernel is 2.6.11.4-21.7 (SuSE 9.3).

Kind regards

        Jan



-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

Re: owtcl and writing data

Jan Kandziora
In reply to this post by Paul Alfille
Am Montag, 13. Juni 2005 03:27 schrieb Paul Alfille:

> > After about 2..5s (varies), I get an
> >
> > invalid argument
> >
> > And the DS2406 output does not change any more. Any more info needed?
> >
> > Kind regards
> >
> > Jan
>
> Works fine from Shell scripts.
>
> DS9490 USB adapter.
> Newest code from CVS
> A few chips on board, and a 3-pin 2406
>
> Ran the script:
>
> while : ; do \
>   echo "1" > /mnt/1wire/12.C4DF1F000000/PIO.A  \
>     sleep .2 \
>   echo "0" > /mnt/1wire/12.C4DF1F000000/PIO.A \
>    sleep .3 \
> done
>
> Which has been blinking very nicely for a while, now.
>
I tried. Works for about 5s at my site. Im a really unlucky guy ^^,

I checked the /mnt/1wire/12.xxxxx/PIO.A by hand afterwards (with cat) and got
an "invalid argument", too. The uncached directory was empty after I got the
failure. Done "killall owfs", restarted, worked again for ~5s.

dmesg showed no USB problems at any time.


> All I can conclude is that:
> 1. owtcl has a problem
>
Now I doubt it, as owfs has the same problem at my site.


> 2. Distribution differences (SuSE 9.2 here)
>
SuSE9.3 here.


> 3. Slightly newer version here.
>
owfs-2.1p0RC-1


> 4. Hardware problem.
>
I'll try another USB adaptor.


Kind regards

        Jan


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

Re: owtcl and writing data

Jan Kandziora
Am Montag, 13. Juni 2005 11:44 schrieb Jan Kandziora:
>
> > 4. Hardware problem.
>
> I'll try another USB adaptor.
>
Tried - no difference.

        Jan


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

Re: owtcl and writing data

Paul Alfille
I'm at a bit of a loss -- just downloaded that version and ran the script --
still works.

Paul

On Monday 13 June 2005 06:15 am, Jan Kandziora wrote:

> Am Montag, 13. Juni 2005 11:44 schrieb Jan Kandziora:
> > > 4. Hardware problem.
> >
> > I'll try another USB adaptor.
>
> Tried - no difference.
>
> Jan
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you
> shotput a projector? How fast can you ride your desk chair down the office
> luge track? If you want to score the big prize, get to know the little guy.
> Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
> _______________________________________________
> Owfs-developers mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/owfs-developers


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

Re: owtcl and writing data

Paul Alfille
Actually, one thought (with the new version pulled from the CVS)
enable error messages:

(For the script version with goes to the command line)
/opt/owfs/bin/owfs --foreground --error_level=9 -u /mnt/1wire

Then on another screen run the previous script

while:  ;.... to blink

At least we'll see what is causing the problem.

Paul

On Monday 13 June 2005 08:24 am, Paul Alfille wrote:

> I'm at a bit of a loss -- just downloaded that version and ran the script
> -- still works.
>
> Paul
>
> On Monday 13 June 2005 06:15 am, Jan Kandziora wrote:
> > Am Montag, 13. Juni 2005 11:44 schrieb Jan Kandziora:
> > > > 4. Hardware problem.
> > >
> > > I'll try another USB adaptor.
> >
> > Tried - no difference.
> >
> > Jan
> >
> >
> > -------------------------------------------------------
> > This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you
> > shotput a projector? How fast can you ride your desk chair down the
> > office luge track? If you want to score the big prize, get to know the
> > little guy. Play to win an NEC 61" plasma display:
> > http://www.necitguy.com/?r=20
> > _______________________________________________
> > Owfs-developers mailing list
> > [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/owfs-developers
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you
> shotput a projector? How fast can you ride your desk chair down the office
> luge track? If you want to score the big prize, get to know the little guy.
> Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
> _______________________________________________
> Owfs-developers mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/owfs-developers


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

Re: owtcl and writing data

Jan Kandziora
Am Montag, 13. Juni 2005 15:25 schrieb Paul Alfille:

> Actually, one thought (with the new version pulled from the CVS)
> enable error messages:
>
> (For the script version with goes to the command line)
> /opt/owfs/bin/owfs --foreground --error_level=9 -u /mnt/1wire
>
> Then on another screen run the previous script
>
> while:  ;.... to blink
>
> At least we'll see what is causing the problem.
>
I'll tried with owfs-2005-06-07.tar.gz  OK?

Log is aattched. Around line 182, the error message changes form "Resource
temporary unavailable" (EAGAIN, I think?) to "Value too large for defined
data type" (some ioctl problem?).

Kind regards and thanks for any help

        Jan


log.gz (698 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: owtcl and writing data

Serg Oskin
In reply to this post by Paul Alfille
Paul,
I such had 2-3 times per day at execution "ls /mnt/1wire" every second
(without owtcl).
In the beginning there were delays in work owfs (1wire) and there were
messages of a kernel "... bulk ... failed... ". Then occured such:
...
kernel: usb ... reset ....
....
kernel: usb 1-7: USB disconnect, address 6
kernel: usb 1-7: new full speed USB device using ... and address 7
...

I can repeat tomorrow experiment and show the exact text of messages. It is
necessary?

Serg.

"PA" == Paul Alfille wrote:

 PA> I'm at a bit of a loss -- just downloaded that version and ran the script --
 PA> still works.

 PA> Paul

 PA> On Monday 13 June 2005 06:15 am, Jan Kandziora wrote:
 >> Am Montag, 13. Juni 2005 11:44 schrieb Jan Kandziora:
 >> > > 4. Hardware problem.
 >> >
 >> > I'll try another USB adaptor.
 >>
 >> Tried - no difference.
 >>
 >> Jan
 >>


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

RE: owtcl and writing data

Alfille, Paul H.,M.D.
In reply to this post by Jan Kandziora
Sounds like something we need to track down.

However, you are getting the error 2-3 times/day. Jan gets it after a few
seconds.

Paul

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]]On Behalf Of Serg
Oskin
Sent: Tuesday, June 14, 2005 1:57 AM
To: [hidden email]
Subject: Re: [Owfs-developers] owtcl and writing data


Paul,
I such had 2-3 times per day at execution "ls /mnt/1wire" every second
(without owtcl).
In the beginning there were delays in work owfs (1wire) and there were
messages of a kernel "... bulk ... failed... ". Then occured such:
...
kernel: usb ... reset ....
....
kernel: usb 1-7: USB disconnect, address 6
kernel: usb 1-7: new full speed USB device using ... and address 7
...

I can repeat tomorrow experiment and show the exact text of messages. It is
necessary?

Serg.

"PA" == Paul Alfille wrote:

 PA> I'm at a bit of a loss -- just downloaded that version and ran the script
--
 PA> still works.

 PA> Paul

 PA> On Monday 13 June 2005 06:15 am, Jan Kandziora wrote:
 >> Am Montag, 13. Juni 2005 11:44 schrieb Jan Kandziora:
 >> > > 4. Hardware problem.
 >> >
 >> > I'll try another USB adaptor.
 >>
 >> Tried - no difference.
 >>
 >> Jan
 >>


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r 
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

Re: owtcl and writing data

Jan Kandziora
Am Dienstag, 14. Juni 2005 08:42 schrieb Alfille, Paul H.,M.D.:
> Sounds like something we need to track down.
>
> However, you are getting the error 2-3 times/day. Jan gets it after a few
> seconds.
>
And I don't get *any* USB error messages, please don't forget this.

Kind regards

        Jan


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

Re: owtcl and writing data

Serg Oskin
"JK" == Jan Kandziora wrote:

 JK> Am Dienstag, 14. Juni 2005 08:42 schrieb Alfille, Paul H.,M.D.:
 >> Sounds like something we need to track down.
 >>
 >> However, you are getting the error 2-3 times/day. Jan gets it after a few
 >> seconds.
 >>
 JK> And I don't get *any* USB error messages, please don't forget this.

Probably I know why: in my /etc/syslog.conf the original line is changed on
*.*    /var/log/messages
Try to make so... (Don't forget to restart syslogd)

--
        Serg (http://oskin.ru/)
~
~
:q!


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

Re: owtcl and writing data

Jan Kandziora
Am Dienstag, 14. Juni 2005 10:23 schrieb Serg Oskin:

> "JK" == Jan Kandziora wrote:
>
>  JK> Am Dienstag, 14. Juni 2005 08:42 schrieb Alfille, Paul H.,M.D.:
>  >> Sounds like something we need to track down.
>  >>
>  >> However, you are getting the error 2-3 times/day. Jan gets it after a
>  >> few seconds.
>
>  JK> And I don't get *any* USB error messages, please don't forget this.
>
> Probably I know why: in my /etc/syslog.conf the original line is changed on
> *.*    /var/log/messages
> Try to make so... (Don't forget to restart syslogd)
>
Oh, I checked the kernel log buffer with dmesg, not /var/log/messages.
Still no USB errors here.

        Jan



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

Re: owtcl and writing data

Serg Oskin
In reply to this post by Jan Kandziora
"JK" == Jan Kandziora wrote:

 JK> Serg (and anybody else who may it concern),
 JK> I got some problems with owtcl (owfs-2.1p0RC-1). I connected a single DS2406
 JK> to an 1-Wire/USB-adapter and used owtcl to control a single LED, hooked up on
 JK> its PIO pin. Unfortunately, it works *a little bit*, so I think I found a
 JK> serious bug in owtcl or owlib.

 JK> Please teak a look into the test code below. The first 10 to 70 (varies)
 JK> cycles of the loop the LED blinks but I get an

 JK> unknown error 4294967295

 JK> After about 2..5s (varies), I get an

 JK> invalid argument

 JK> And the DS2406 output does not change any more. Any more info needed?

 JK> Kind regards

 JK> Jan

More than three hours worked yours test.tcl - mistakes are not present.

Probably in my case there were problems with early versions of a kernel (2.6.8).
Probably it were hardware problems - now those two computers are not
accessible to me to check...

The message "invalid argument" could arise on fault owtcl but only when the
second argument at:: OW:: put is not specified (fixed).

One more mistake: check of returned value of function FS_write (error if
not zero). This function returns positive value in case of success, but in
swig/ow.i is written:

int put( const char * path, const char * value ) {
    ...
    if ( FS_write(path,value,s,0) ) return 0 ;
    return 1 ;
}

Fixed in owtcl only!

--
        Serg (http://oskin.ru/)
~
~
:q!


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

Re: owtcl and writing data

Jan Kandziora
Am Donnerstag, 16. Juni 2005 12:48 schrieb Serg Oskin:

> "JK" == Jan Kandziora wrote:
>
>  JK> Serg (and anybody else who may it concern),
>  JK> I got some problems with owtcl (owfs-2.1p0RC-1). I connected a single
> DS2406 JK> to an 1-Wire/USB-adapter and used owtcl to control a single LED,
> hooked up on JK> its PIO pin. Unfortunately, it works *a little bit*, so I
> think I found a JK> serious bug in owtcl or owlib.
>
>  JK> Please teak a look into the test code below. The first 10 to 70
> (varies) JK> cycles of the loop the LED blinks but I get an
>
>  JK> unknown error 4294967295
>
>  JK> After about 2..5s (varies), I get an
>
>  JK> invalid argument
>
>  JK> And the DS2406 output does not change any more. Any more info needed?
>
>  JK> Kind regards
>
>  JK> Jan
>
> More than three hours worked yours test.tcl - mistakes are not present.
>
I get a RS232<->1Wire adaptor the next days. I will try it out to avoid any
USB problems.


> Probably in my case there were problems with early versions of a kernel
> (2.6.8). Probably it were hardware problems - now those two computers are
> not accessible to me to check...
>
Yes, USB in linux-2.6.8 wasn't really reliable.


> The message "invalid argument" could arise on fault owtcl but only when the
> second argument at:: OW:: put is not specified (fixed).
>
Hm. I always specified two arguments in the test code, I think.


> One more mistake: check of returned value of function FS_write (error if
> not zero). This function returns positive value in case of success, but in
> swig/ow.i is written:
>
> int put( const char * path, const char * value ) {
>     ...
>     if ( FS_write(path,value,s,0) ) return 0 ;
>     return 1 ;
> }
>
> Fixed in owtcl only!
>
Ok, I think that was it with "unknown error 42...".

Many thanks so far. I will try again with the latest version tommorrow.

        Jan



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers