Re: [Owfs-developers] DS 9490R Pinout and some other stuff

2005-04-09 Thread Paul Alfille
When this all works, I  want pictures and a description for the website!

On Saturday 09 April 2005 09:33 pm, Hans Parkmann wrote:
 Hello owfs-users and developers,

 I just, registered to this mailing list. I am the one who had the
 questions on stepper driving with  owfs, Paul was so kind to post them
 here.

 I got my DS9490R from Dallas today and I got it running with owfs
 (latest daily package) under gentoo. I can mount it as root and acces
 the bus as user.
 Note: It took some research how to pass the -x command to fusermount ,
 I use fuse 2.2 pre 3 and --fuse-optsallow_other did the trick for me,
 there should be some advice in the faq that tells you how to pass the
 option correctly according to the fuse version used. I run Gentoo Kernel
 2.6.10

Thanks.
Was setting up owfs with Gentoo any difficulty?


 I plan to use the one wire bus mostly for environment control
 (Terrarium) and as timer.
 At the then the bus weight will be around 30m-40m with around 6-8
 sensors (Temperature, humidity, light) 6-7 relais, and one 12v stepper
 motor. Is standard telephone cable still good enough for this cable
 weight? Or should I go with cat5 cable ... its all in the cable
 according to  the dallas application notes ;)
My reading says that bus reflections are the critical element -- a linear 
rather than branched topology is better.

 So far I only got the sensor readout working. I write my applications in
 Gambas what is a kind of Virtual Basic (please dont throw stones on me),
 its not C, but very easy to learn. The only programming experience I
 have is qbasic to for me its a gigantic step forward.
Gambas sounds good. Too bad swig doesn't support it. You'll have to use the 
filesystem interface, as opposed to direct calls within Gambas.


 The next step will be relais control, I will use DS2408 for this ,
 someone mentioned I should use logic 0 the switch instead of logic 1.
 Why is it better this way?
This is a little confusing. In OWFS, you use 1 to turn on a PIO (switch) 
which seems logical. What you are actually doing is making the pin conduct to 
ground, so the actual hardware command sends a 0 to the pin, and reading 
the logical value at that pin (sensed property) will be a 0 since the pin 
is at ground.


 I finally understood how an optokoppler works (my electronic knowledge
 is still very basic, 3 innocent optokopplers went up in smoke but now I
 know how they work), the relais are very simple : BC517, CNY17-2, LED,
 Resistor, some diodes, I   would connect everything this way :

 1.PIO PIN goes LOW
 2.Optokoppler transistor switches
 3.Collector Emitter voltage connects to BC 517 Base Voltage
 4.BC 517 switches and power is going through the Relais

 This circuit was tested (without DS2408 just some wires and powersupply)
 and I hope it will work, it will be tested tomorrow but if you think
 anything should be done different please post it.
 When the Relais run I will investigate the stepper control further...

 My final and most important question :

 On the DS9490R there are two Grounds : 1-wire GND / Return and power
 ground
 I assume power ground is for the is the gnd for the +5V stolen from the
 USB Port, so I wont need this.

 But when I use an external power supply to power the sensors / IO chips,
 do I have to connect 1-wire Ground even when i already have connected
 the gnd pin of the chip to the GND of my power supply?
 I mean when the ground wire from my power supply and 1-wire ground are
 connected to the same pin could this harm my Adapter or USB Port? The
 power Supply will power all Bus devices(5v), relais(5v) and 3 PC
 Fans(12v)  so I am afraid this could do damage to the port.

I'm a little lost. You can have two separate circuits: 1-wire with power, data 
and ground, and a separate power line with power and ground. You would have 
to keep them separate by using the relays. That's one advantage of the Cat5: 
more wires and bigger gauge.

I can't think of a reason not to tie all the grounds together, unless you 
expect a lot of noise on the separate power line.

 Thanks for all your help, this mailing list is really helping, without
 it I would still sit here and wonder why I cant access my USB-dongle :)

 Thats all for now, please forgive my poor english I am german.
 Simon


 ---
 SF email is sponsored by - The IT Product Guide
 Read honest  candid reviews on hundreds of IT Products from real users.
 Discover which products truly live up to the hype. Start reading now.
 http://ads.osdn.com/?ad_id=6595alloc_id=14396op=click
 ___
 Owfs-developers mailing list
 Owfs-developers@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/owfs-developers


---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. 

Re: [Owfs-developers] System Log Question

2005-04-24 Thread Paul Alfille
On Sunday 24 April 2005 08:04 am, Congo Lawrence wrote:

 You are suggesting then, that one solution is to loop my 5 min actions
 within my script then.  I can give that a try.  I am not sure that I can
 filter out just those entries in the my syslog as was also suggested,
 but I will try that as well.

 Thanks for the help.

If you can recompile the program and are confortable with a little editing,
the message is generated in module/owlib/src/c/ow_ds9490.c line 244

You can comment it out or remote it and then make install to create a new 
libow.

Paul



---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595alloc_id=14396op=click
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] Usbdevfs_bulk failed ep 0x83 len 1 ret -75

2005-04-24 Thread Paul Alfille
On Sunday 24 April 2005 09:43 am, Ren und Stimpy wrote:
 Hi all,

 I have finished the Relais PCBs with the DS2408, they work fine but I
 have a huge problem:

 The One wire bus randomly drops out, I use a small gambas program that
 reads temperature from a ds18b20 and switches two fans fans from +5 to
 +12v If temperature is too high.
 Another relais switches 2 flouros (12w each) on and off.

 Sometimes when the flouros are switched off and sometimes just randomly
 the gambas program hangs and shows : System Error - Invalid argument
 then i have to restart the program, sometimes i have to restart owfs too :(

 /var/log/messages tells me :
 Usbdevfs_bulk failed ep 0x83 len 1 ret -75

 I use the latest Version of owfs (the 2.6.9 DS9094 patch line is in the
 code) :(

 Is there any solution to this problem, i worked nearly 4 weeks day and
 night on this project and want to get this shit finished. Its not fun at
 all anymore :(

 Thanks
 Simon


I know you're frustrated, but I'm sure we can figure this out.

Background: you are running owfs with a usb adapter?

What kernel and version of libusb are you running?

When you say sometimes I have to restart owfs too, can you explain further. 
Sometimes you don't? If you don't, can you still see the bus? (Can you ls the 
bus in another window?) Does the message appear every time?

My thinking is thus, it sounds like a libusb layer problem, possibly because 
the bus is dropping out, or possibly we have an error in one ofht e calls to 
libusb. We'll put debugging code in owfs (print statements) and run it in 
foreground is one window, and see what is happening when the error occurs. 
I'm trying to get a better clue of where to look.

Paul


---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595alloc_id=14396op=click
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] file patches in owlib for no pthreads

2005-05-01 Thread Paul Alfille
On Sunday 01 May 2005 02:15 pm, jerry scharf wrote:
 Paul,

 I am a system designer, not a coder. I have done what I think is correct to
 get the code in owlib to compile without pthreads. I neither claim
 correctness nor beauty for the patches. Please review them and make the
 right changes as needed.

 jerry


Good pick-ups! I implemented pretty much as you wrote them except I made a 
macro for the (in-bus_mutex) to match the style elsewhere.

Are you using the unthreaded model for efficiency, or does your platform not 
support threading?

Paul


---
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] a couple things

2005-05-01 Thread Paul Alfille
On Sunday 01 May 2005 01:36 pm, jerry scharf wrote:
 Well,

 I got my link serial interfaces, and started playing with things.

 Things came up in a couple areas:

 First, the programs seem to ignore --foreground and go to the background no

Hmm.. works  for me. /opt/owfs/bin/owfs --foreground -u /mnt/1wire stays in 
foreground.

 matter what. Second, there is no debugging output for owfs or owserver.
 This seems quite wrong to me. I would like to do the classic multiple
 levels of d or v switches to be able to run the program with different
 levels of output and see what it's doing. For example, I had the protection
 set wrong on the tty, and the program silently exited. I have another one
 where I'm trying to get it onto an arm system with a cross compiled
 environment. Again the program exits silently, and I have no idea what's
 wrong. I may end up making one of the SBCs into a devel system and scrap
 the cross compiler (makes configure a mess...), but I should be able to
 debug the program to a limited degree with just itself. I am happy to
 discuss this more, but I am not up to adding this.

I just checked. There should be syslog messages about opening the com port.

You're right about the debug messages, though with a working foreground, it's 
easy to trace problems (I use printfs myself). Actually, there are no end of 
printfs scatered around that can be uncommented. I know it's not elegant, 
what kind of debugging output would you like, specifically?

 The other major area is that I wanted to try to compile the program without
 pthreads for the sbc, figuring that I didn't need it. There were a number
 of problems in files from owlib, clearly this hasn't been tried in a while.
 I'm not a great coder, but the changes are minimal. I'll attach diffs in a
 separate message for what I found.

 I haven't gotten to the simultaneous reads yet. I would like to make sure
 that the cache invalidation has been added when simultaneous is set. My
 first tests for that will be calibration, which included adding groups of
 sensors on the net in the same conditions and getting offsets from a
 precise measurement. It's a pretty simple strategy for handling a large
 number of common sensors.

 thanks,
 jerry

 Jerry Scharf
 laguna way consulting


 ---
 This SF.Net email is sponsored by: NEC IT Guy Games.
 Get your fingers limbered up and give it your best shot. 4 great events, 4
 opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
 win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
 ___
 Owfs-developers mailing list
 Owfs-developers@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/owfs-developers



---
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] First Post and some questions

2005-06-09 Thread Paul Alfille
On Thursday 09 June 2005 03:18 pm, Jan Kandziora wrote:
 How does owserver reacts if the serial/usb etc. 1-wire adapter is pulled
 and reconnected later? As far as I checked, owserver does not recognize the
 reconnect. How to solve this?

 Kind regards

   Jan


OWFS doesn't care that the adapter was removed and then reconnected, but the 
operating system or adapter might.

1. owserver -- no problem. Whatever owserver that appears on the requested 
port will be used, even after being stopped and started.

2. passive adapter -- probably quite happy. I don't have one to test, but the 
adapter has no real state information and the port settings shouldn't be 
altered.

3. usb adapters -- a problem with the OS/libusb with the hotplugging 
recognition that the adapter was removed -- it closes the connection. It's 
probably fixable (reopen the device if found closed) but there may be some 
problems if another process is intentionally closing the port.

4. serial 9097U -- I think we lose state information in the adapter. Probably 
running DS2480_detect again would fix it.

So one technique:

1. Each physical port (serial, usb) gets an owserver process.
2. Your main owserver connects to all the individual owservers.
3. owtcl connects to the main owserver.
4. An intermittent process scans the individual owservers, and restarts the 
broken ones (which reconnects with the physical ports if possible).

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
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] owtcl and writing data

2005-06-13 Thread 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
 Owfs-developers@lists.sourceforge.net
 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
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] owtcl and writing data

2005-06-13 Thread 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
  Owfs-developers@lists.sourceforge.net
  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
 Owfs-developers@lists.sourceforge.net
 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
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


[Owfs-developers] Performance

2005-06-14 Thread Paul Alfille
I've written up my testing of OWFS performance.

Basically, Caching wins
Owserver is free
Remote is fast
Serial is slower.

http://owfs.sourceforge.net/performance.html

Paul


---
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=7477alloc_id=16492op=click
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] More on Hanging Problems

2005-06-20 Thread Paul Alfille
On Monday 20 June 2005 04:38 pm, Jan Kandziora wrote:
 Dear Paul,

 I've investigated further on the problem I described last week (in the
 thread owtcl and writing data).

 It seems to be related to EMC: Nearly every time I switch on a large
 240/24V AC transformer I need for my project, I get a single error of the
 kind I described. But sometimes, it is even a cascade of such errors, which
 I can't bring into connection to any action I took (not). Maybe, it was the
 fluorescent light on last week, but today, I didn't turn them on and still
 got cascades of such errors (over about 1 minute).

 Then again, everything is fine for a couple of minutes.

Is it possible to add shielding?
 I checked for USB errors with dmesg, and got very few USB disconnects
 (about 1 of 30 times), but no other USB link layer errors. On the most
 tries, only the 1-wire seemed to be affected.

The question is what is the program/port's state after one of these errors. It 
seems like there is nor recovery after an error. (i.e., the system doesn't 
work intermittently, only yes or no). If the error causes the USB port to 
close, life is easy.

We can re-open the USB port more easily than a full restart. We don't need to 
enumerate the devices, or resort the internal data structures.

 I tested all this with the tcl script I posted before, and put an

 OW::finish
 OW::init usb1

 into the catch sequence to restart on error. Slow, but worked.


 As there is little to do against EMC, I would suspect to change the
 software a way it automatically reinitialize the connections if there is an
 (until now) unrecoverable error. That leads me to following questions:

 1. Is there any way to detect an unrecoverable error on bus side?
 2. I want to use owserver. You offered to change owserver to restart the
 connection automatically: How is the development status for this?
 3. Is there any way to process the init sequence faster? For USB errors, it
 would not be so dramatic if it takes 3 to 5 seconds to recover, as I expect
 them to be very rare. However, the 1-Wire error happens *every time* a big
 inductive load is switched near the device, so a faster recovery would be a
 big help.

Ho do I tell the 1-wire error from normal failures? (Wrong addresses, bits 
lost, ...)

 Kind regards

   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=7477alloc_id=16492op=click
 ___
 Owfs-developers mailing list
 Owfs-developers@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/owfs-developers


---
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=7477alloc_id=16492op=click
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] direct_io

2005-06-23 Thread Paul Alfille
Sure.

On Wednesday 22 June 2005 05:07 pm, Christian Magnusson wrote:
 Almost done now... Everything seems to be working with offset and
 direct_io option. I'll make some more tests from work tomorrow and
 I'll check in the changes from there.

 I'm a bit annoyed about the error functions though...
 LEVEL_CALL() will print the errno-message, and it's very common
 that errno is stuck with an error message since it's not cleared
 on successful system-calls... Only set when error.

 This means that an Interupted systemcall (-EINTR) from UT_delay()
 is set very often for me, and it stays there forever basically.
 I have cleared errno in some locations now, like in OW_ParsedName(), but
 I'm not very comfortable with it though.

 Is it really common to have debug-functions which always return the
 errno-message? Couldn't this usually be added by '%s, strerror(errno)'
 to the LEVEL_CALL() argument and not always be printed?
 Just a thought... :)

 /Christian

 On Wed, 2005-06-22 at 16:18, Christian Magnusson wrote:
  I noticed I had to fix all those FS_r_all and the array-stuff too, just
  to support offset for all files. I'm almost done and will checkin the
  other changes later tonight or tomorrow morning.
 
  /Christian
 
  On Wed, 2005-06-22 at 14:23 +0200, Christian Magnusson wrote:
   The problem is basically that offset wasn't supported in ow_read.c
   for all types.
  
   Two system calls where made when reading 10.061847000800/temperature.
   First read return 15 bytes, and the second call was reading from
   offset=15 and returned errno=-ENOTAVAIL according to the owfs source.
   I have added offset-support now and it just return 0 if
   offset==filesize since there are no more bytes to read.
  
   I noticed some other really nasty things with the char-buffer c in:
   FS_output_unsigned( unsigned int value, char * buf, const size_t size,
   const struct parsedname * pn ) {
 int suglen = FileLength(pn);
 char c[suglen+2];
 
   }
  
   After returning from the function, the variable const size_t size
   was corrupted! I have changed those buffers to mallocs instead just
   to get rid of the problem.
   Adding some debug-output in FS_parse_read() before and after the
   call to FS_output_unsigned() will show the problem.
  
  
   It's also possible to use fseek() now when reading from the files
   if somebody wants...
  
  
 if(!(fp = fopen(/var/1wire/statistics/read/bytes, r)))
   exit(0);
 rc = fseek(fp, 8, SEEK_SET);
 if(rc) {
   printf(fseek returned %d\n, rc);
   exit(0);
 }
 pos = 0;
 do {
   if((sz = fread(tmp[pos], 1, 1, fp)) = 0) {
 tmp[pos] = 0;
 break;
   }
   pos++;
 } while(1);
 fclose(fp);
  
  
   /Christian
  
   On Wed, 2005-06-22 at 09:40 +0200, Christian Magnusson wrote:
I noticed some strange behavior with the direct_io flag in fuse. My
cat return an errno Cannot assign requested address after reading
a sensor, but tail works ok..  I haven't figured out why yet, but
it's something to fix.
   
/Christian
   
 owfs --fuse_opt=direct_io -P /var/run/owfs.pid -s
   
192.168.1.10:3002 /var/1wire/
   
 cat /var/1wire/10.061847000800/temperature
   
   25.1875cat: /var/1wire/10.061847000800/temperature: Cannot
assign requested address
   
 tail /var/1wire/uncached/10.061847000800/temperature
   
   [EMAIL PROTECTED] ~]#
   
 cat /var/1wire/10.061847000800/temperature
   
   25.1875cat: /var/1wire/10.061847000800/temperature: Cannot
assign requested address

 ---
 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=7477alloc_id=16492op=click
 ___
 Owfs-developers mailing list
 Owfs-developers@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/owfs-developers


---
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=7477alloc_id=16492op=click
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] More on Hanging Problems

2005-06-24 Thread Paul Alfille
Your logs show mainly BUS_select_low_errors increasing.

Unfortunately there are 5 places in file ow_bus.c function BUS_select_low 
where that variable is incremented. I've added some (temporary) printf's to 
run the program in foreground and flip the garbalizer.

Can you pull from the latest CVS and try it out?

Once we know which point fails, we can further select that best place to test 
for garbage and fix the problem.

Paul

On Friday 24 June 2005 10:01 am, Jan Kandziora wrote:
 Am Dienstag, 21. Juni 2005 13:18 schrieb Alfille, Paul H.,M.D.:
  DS2480_reset_errors
  DS9097_reset_errors
  DS9490_reset_errors
  (and perhaps if DS2480_read_timeout is large I think...)
 
  if(DS2480_reset_errors || DS9097_reset_errors || DS9490_reset_errors) {
COM_close(in);
usleep(10);
COM_open(in);
if ( DS2480_detect(in) ) {
  if ( DS9097_detect(in) ) {
ret = -ENODEV;
  }
}
  }
 
  Something like this would probably be enough to make a reset of the
  adapter when the 1-wire bus fails.
 
  --
  This would work, but there may be a more efficient DS9490_detect, I made
  room for the USB device handle in connection_in
  in-connin.usb.dev so we can break out the internal part of DS9490_detect
  and save re-enumerating the entire USB bus.
 
  Perhaps a fallback of re-enumerating if the simpler routine fails.
 
  Paul

 In the meanwhile, I made some logs of the statistics/errors directory:

 init.log: Directly after owfs -u1 mnt/1wire
 ok1.log: After starting and stopping test.sh
 ok2.log: After starting and stopping test.sh again.

 So far, no errors. Now the critical ones:

 on1.log: After switching the mains transformer ON (blinking stopped
 before) on2.log: After starting and stopping test.sh again.

 Then I did killall owfs and restarted owfs -u1 mnt/1wire, start
 test.sh.

 off1.log: After switching the mains transformer OFF  (blinking stopped
 before)
 off2.log: After starting and stopping test.sh again.

 off3.log is just a repetition of off2.log after killall owfs and restarting
 all again.

 I hope you now can find a way to detect this kind of error and
 automatically re-initialize.

 Kind regards

   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=7477alloc_id=16492op=click
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


[Owfs-developers] Fwd: Re: [fuse-devel] Getting fuse fs type from userspace

2005-06-24 Thread Paul Alfille
I think we should set the filetype to owfs#/dev/ttyS0 or 
owfs#10.1.2.3:3001 although using multiple buses would be a problem. 
Perhaps only owfs

Paul

--  Forwarded Message  --

Subject: Re: [fuse-devel] Getting fuse fs type from userspace
Date: Thursday 23 June 2005 01:13 pm
From: Miklos Szeredi [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED], [EMAIL PROTECTED]

 However, df and mount just indicate that we're on a fuse fs,
 which is clearly not enough.
 Is there a way to get that information? Otherwise, would
 you be interested in a patch exporting to, lets say, /proc/fuse/
 the mounted fs and their types?

 For my 'fuse' file-system:

 /proc/mounts shows:
 muirfs /muirfs fuse
 rw,user_id=0,group_id=0,default_permissions,allow_other 0 0

 Clearly it is showing the correct file-system type. Perhaps this is
 because in the mount options for my file-system, I use 'fsname=muirfs'.

Yes, setting fsname to the filesystem type is a nice way to
differentiate different FUSE based filesystems.  When you want to use
fsname for other information you can set it to type#otherinfo.

For example sshfs sets it to sshfs#host:path.

Miklos


---
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=7477alloc_id=16492op=click
___
fuse-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/fuse-devel

---


---
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=7477alloc_id=16492op=click
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] More on Hanging Problems

2005-06-25 Thread Paul Alfille
On Saturday 25 June 2005 04:32 am, Jan Kandziora wrote:
 Am Samstag, 25. Juni 2005 05:50 schrieb Paul Alfille:
  Your logs show mainly BUS_select_low_errors increasing.

 And DS... errors. But I think that's just a summary, am I right?
Probably.

  Unfortunately there are 5 places in file ow_bus.c function BUS_select_low
  where that variable is incremented. I've added some (temporary) printf's
  to run the program in foreground and flip the garbalizer.
 
  Can you pull from the latest CVS and try it out?

 Is the nightly build OK? Otherwise I have to configure a cvs client first.
Sure, though the timing is unclear. I sent you the file directly.

 Kind regards

   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=7477alloc_id=16492op=click
 ___
 Owfs-developers mailing list
 Owfs-developers@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/owfs-developers


---
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=7477alloc_id=16492op=click
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] More on Hanging Problems

2005-06-25 Thread Paul Alfille
On Saturday 25 June 2005 04:32 am, Jan Kandziora wrote:
 Am Samstag, 25. Juni 2005 05:50 schrieb Paul Alfille:
  Your logs show mainly BUS_select_low_errors increasing.

 And DS... errors. But I think that's just a summary, am I right?

  Unfortunately there are 5 places in file ow_bus.c function BUS_select_low
  where that variable is incremented. I've added some (temporary) printf's
  to run the program in foreground and flip the garbalizer.
 

Ok, I've attempted a fix.
We now have a reconnect method for each adapter (ony the USB is really 
implemented). If there is an error of the type you've been finding, the USB 
adapter is closed and reopened and reinitialized. I hop it works. Give it a 
try.

Paul


---
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=7477alloc_id=16492op=click
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] RE: 1-wire on Linux...

2005-07-03 Thread Paul Alfille
On Sunday 03 July 2005 07:07 pm, Matthew Percival wrote:
 G'Day,

   Thanks for your replies: they are extremely helpful!

  4. Almost all the devices are supported, you don't need anything extra.
  This includes temperature, memory, switches, voltage, current, timers,
  counters and some LCD and humidity 3rd party devices.

   The particular device I am going to use is not yet supported, but it
 sounds like I should be able to add it easily enough --- at least, the
 website makes it sound easy!

  5. Access to the data is via filesystem, web server, or
  perl/python/tcl/php

   I have tried to compile the 2.1.0 version available for download, but
 there seems to be some problems with the tarball.  Namely, there are an
 awful lot of files missing!  I cannot get configure to complete because
 many of the files used by automake are missing (the ones for perl, php,
 python and tcl); if I use touch to fake these (as I do not plan on
 compiling them at the moment), I still cannot get it to compile because
 at least one header file is missing (I say `at least' because it would
 be not so quick and easy to write a placeholder file and see if I can
 compile any further).

Did you install FUSE first? http://fuse.sf.net

./configure --disable-owtcl --disable-owperl --disable-owphp 
--disable-owpython
   I tried using a few different daily builds, and had other problems with
 them, though I did manage to at least compile a (probably out of date)
 version of owlib.  I tried downloading 2.1.0 from a different mirror
 too, and still had the same problems.  Does anyone have a quick and easy
 solution for this?

   Thanks,

   Matthew



 ---
 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=7477alloc_id=16492op=click
 ___
 Owfs-developers mailing list
 Owfs-developers@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/owfs-developers


---
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=7477alloc_id=16492op=click
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] RE: 1-wire on Linux...

2005-07-03 Thread Paul Alfille
It shouldn't be this difficult.

What platform are you running?

Paul

On Sunday 03 July 2005 07:07 pm, Matthew Percival wrote:
 G'Day,

   Thanks for your replies: they are extremely helpful!

  4. Almost all the devices are supported, you don't need anything extra.
  This includes temperature, memory, switches, voltage, current, timers,
  counters and some LCD and humidity 3rd party devices.

   The particular device I am going to use is not yet supported, but it
 sounds like I should be able to add it easily enough --- at least, the
 website makes it sound easy!

  5. Access to the data is via filesystem, web server, or
  perl/python/tcl/php

   I have tried to compile the 2.1.0 version available for download, but
 there seems to be some problems with the tarball.  Namely, there are an
 awful lot of files missing!  I cannot get configure to complete because
 many of the files used by automake are missing (the ones for perl, php,
 python and tcl); if I use touch to fake these (as I do not plan on
 compiling them at the moment), I still cannot get it to compile because
 at least one header file is missing (I say `at least' because it would
 be not so quick and easy to write a placeholder file and see if I can
 compile any further).

   I tried using a few different daily builds, and had other problems with
 them, though I did manage to at least compile a (probably out of date)
 version of owlib.  I tried downloading 2.1.0 from a different mirror
 too, and still had the same problems.  Does anyone have a quick and easy
 solution for this?

   Thanks,

   Matthew



 ---
 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=7477alloc_id=16492op=click
 ___
 Owfs-developers mailing list
 Owfs-developers@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/owfs-developers


---
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=7477alloc_id=16492op=click
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] RE: 1-wire on Linux...

2005-07-03 Thread Paul Alfille
So your download doesn't include relevant files like 
modules/owlib/src/include/*.h ?

Perhaps a CVS pull?

Then ./bootstrap
make install

and you're set.

Paul

On Sunday 03 July 2005 09:16 pm, Matthew Percival wrote:
 G'Day,

  It shouldn't be this difficult.
 
  What platform are you running?

   I am not using a particularly standard environment.  Well, I am
 building it on standard desktop, but the target machine is an OMAP5912
 --- owfs/owhttpd will run on an ARM.  The board has hardware support for
 1-wire, but I shall not be worrying about that just at the moment; later
 on, I shall likely try to make use of this though.  We shall be adding a
 DS2431 to the board, which is where the 1-wire will come into play.

   This is perhaps sliding a little off topic, but would it be possible to
 share the fuse.ko line in modules.dep?  I have to build this file
 manually (depmod is not available), but have not been able to find out
 what the line should look like for that module.

   -- Matthew



 ---
 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=7477alloc_id=16492op=click
 ___
 Owfs-developers mailing list
 Owfs-developers@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/owfs-developers


---
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=7477alloc_id=16492op=click
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] RE: 1-wire on Linux...

2005-07-03 Thread Paul Alfille
On Sunday 03 July 2005 09:16 pm, Matthew Percival wrote:
 G'Day,

  It shouldn't be this difficult.
 
  What platform are you running?

   I am not using a particularly standard environment.  Well, I am
 building it on standard desktop, but the target machine is an OMAP5912
 --- owfs/owhttpd will run on an ARM.  The board has hardware support for
 1-wire, but I shall not be worrying about that just at the moment; later
 on, I shall likely try to make use of this though.  We shall be adding a
 DS2431 to the board, which is where the 1-wire will come into play.

Note ARM support probably will take some wizardry from Christian.


   This is perhaps sliding a little off topic, but would it be possible to
 share the fuse.ko line in modules.dep?  I have to build this file
 manually (depmod is not available), but have not been able to find out
 what the line should look like for that module.

/lib/modules/2.4.21-226-athlon/kernel/fs/fuse/fuse.ko
   -- Matthew




 ---
 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=7477alloc_id=16492op=click
 ___
 Owfs-developers mailing list
 Owfs-developers@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/owfs-developers


---
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=7477alloc_id=16492op=click
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] RE: 1-wire on Linux...

2005-07-04 Thread Paul Alfille
On Monday 04 July 2005 12:47 am, Matthew Percival wrote:
 G'Day,

   Thanks for all the help: I now seem to have the basics sorted out!
Great!

   I am now able to mount owfs without any troubles --- at the moment,
 that does not do much good, but it is reassuring to know that this much
 works fine.  owhttpd does not seem to work though: when I run it on the
 ARM machine, I cannot access it from a browser on this one (the build
 machine).  The ARM has thttpd running on port 80, which I can access, so
 I know that the problem is not network or anything like that.  One point
 of note is that when I execute the command (owhttpd -p 3001
 -d /dev/ttyS1), it just hangs there: I never get the prompt back.  That
 is probably a pretty fair indication as to why I cannot access it with
 the browser.  Not a major concern though, as owfs was the the component
 I was most interested in.
A little strange. There could be multithreading or backgrounding problems on 
this architecture. If you wanted to investigate, I'd try owhttpd 
--foreground ... to test the background problem and
recompile with --disable-mt to test multithreading.

You can also run owserver on the embedded platform and owhttpd elsewhere.

   I now just have to add support for the DS2431.  I would imagine that
 you would be interested in having that once I have it working: how would
 I best go about getting that to the project?
How embarassing, no DS2431 support! It needs to be added to commands.html as 
well.

The chip looks fairly similary to the DS2433 except a smaller memory, resume 
support, and different status/control registers.

Paul

   Thanks for the help: it has been exceptional!

   Matthew



 ---
 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=7477alloc_id=16492op=click
 ___
 Owfs-developers mailing list
 Owfs-developers@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/owfs-developers


---
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=7477alloc_id=16492op=click
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


[Owfs-developers] resume optimization

2005-07-04 Thread Paul Alfille
A number of the 1-wire devices support the resume command. This is a faster 
way to reselect them when more than one command sequence needs to be sent.

We could remember the last device selected (per bus) and if
1. the devices supports resume
2. the same device is being addressed

we could use the resume command.

To that end, I went through all the device files and added the DEV_resume flag 
if their datasheet claimed support.

Probably the bigest benefit would be passive adapters, then the DS9097U. 

Paul


---
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=7477alloc_id=16492op=click
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


[Owfs-developers] DS2431

2005-07-04 Thread Paul Alfille
Preliminary support for the DS2431 has been added to the CVS. It is based on 
the DS2433, though the write protocol is slightly different.

We support reading and writing. Page locking should be conceptually easy, but 
not yet included.

Paul


---
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=7477alloc_id=16492op=click
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] cannot configure 2.1

2005-07-06 Thread Paul Alfille
On Wednesday 06 July 2005 10:11 pm, Morris Walton wrote:
 Hi,

 I'm trying to build the owfs-2.1p0RC from sourceforge, but run into


 config.status: creating module/swig/Makefile
 config.status: creating module/swig/perl5/Makefile
 config.status: error: cannot find input file: module/swig/perl5/Makefile.in


My Makefile.am is at the end.

 when trying to configure the build.  It looks like the Makefile.in is in
 module/swig, but not in the perl5 dir  Has anybody seen or can
 comment on this?

 I apologize if the developers mailer is the wrong place for this
 question, but I didn't see any other active lists - could you recommend
 one?

Perfectly appropriate place.
 Thanks,

 Morris


# $Id: Makefile.am,v 1.2 2005/01/18 17:03:12 alfille Exp $

bin_PROGRAMS = OW.pm

if ENABLE_CACHE
CACHE_FLAG = -DOW_CACHE
endif

if ENABLE_USB
USB_FLAG = -DOW_USB
endif

if ENABLE_MT
MT_FLAG = -DOW_MT
endif

AM_CFLAGS = -I../include \
 -fexceptions \
 -Wall \
 -W \
 -Wundef \
 -Wshadow \
 -Wpointer-arith \
 -Wcast-qual \
 -Wcast-align \
 -Wconversion \
 -Wstrict-prototypes \
 -Wredundant-decls \
 -D_FILE_OFFSET_BITS=64 \
 ${CACHE_FLAG} \
 ${MT_FLAG} \
 ${USB_FLAG}

#noinst_DATA = .made_mod

#.made_mod: owperl_wrap.c Makefile.perl
#   $(MAKE) -fMakefile.perl
#   touch $@

ow_wrap.c: ../ow.i Makefile.perl
$(SWIG) -perl5 -o $@ ../ow.i

Makefile.perl: Makefile.PL
$(PERL) $ MAKEFILE=$@

OW.pm: ow_wrap.c
$(MAKE) -fMakefile.perl

install-data-local:
$(MAKE) -fMakefile.perl PREFIX=$(prefix) install

#CLEANFILES = *~ .made_mod  owperl.c OW.pm
CLEANFILES = *~ *.o ow_wrap.c OW.pm *.PL Makefile.in

clean-local:
if test -f Makefile.perl; then $(MAKE) -fMakefile.perl realclean; fi
rm -f Makefile.perl Makefile.perl.old

clean-generic:

@RM@ -f *~ .*~


---
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=7477alloc_id=16492op=click
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] Adding another means of accessing devices (ie not serial, USB, etc)...

2005-07-07 Thread Paul Alfille
On Thursday 07 July 2005 09:50 pm, Matthew Percival wrote:
 G'Day,

   I tried using owfs on my OMAP board, but even after I added basic
 support for the DS2431, it did not list the device in /mnt/1wire --- I
 am assuming that this is largely because of the unusual environment that
 I am operating under.  Given the report that I had a bad adaptor, this
 assumption seems fairly likely.

Since I don't have a DS2431 device, you will have to tell me if it works with 
OWFS in a more traditional environment. OWFS should see all devices, even if 
explicit support hadn't been added. You would get only a minimal 
functionality, however (serial number, essentially), so I wonder if there 
isn't a electrical problem.

   This board has hardware support for 1-Wire, so I decided that taking
 advantage of that would be the best way to go.  By directly accessing
 registers, I was able to confirm that I could use this to access the
 device where owfs failed, but due to a hardware bug you *have* to use
 interrupt driven I/O.
Ok.

   I have now just finished writing a kernel module which handles the
 OMAP's hardware support for 1-Wire, and have used a test program to
 interact with the DS2431.  All that remains to do is have a nice, user
 program that can handle interactions with any number of any kind of
 1-Wire device.  Since one happens to be available here, I figured the
 best approach would be to add in support for my driver to owlib.
Sounds great.

   I am reading through the source to try and work out how this would best
 be done, but I thought it would be a good idea to ask the developers how
 they would suggest going about it: after all, you have a much better
 idea of how this all works than I am likely to figure out in the next
 few days.
Pretty easy. You are right, the adapter support is quite well encapsulated.

Basically all adapter support is in owlib, and transparent to higher levels.

The type of adapter is determined mainly from the command line (though the 
serial adapters are distinguished by their response to a query).

Unique support is in the files

module/owlib/src/c/*

where * is ow_ds1410.c
ow_ds9097.c
ow_ds9097U.c
ow_ds9490.c

(also ow_server.c and ow_badadapter.c)

I would base my support on ow_9097.c which is a bit-banging passive serial 
support.

You'll notice that one of the first commands is DS9097_setroutines which sets 
pointers to adapter-specific functions like

read, write, reset, next_both (search routine), and sendback_data (which sends 
bits and returns the response).


   I figure that since you already support (or, in some cases, plan to
 support) different protocols (serial, USB, etc), you would have designed
 the program in such a way that a new one can be added without having to
 pull your hair out: I want to add the omap-on-board-using-kernel-driver
 method.  I have made the driver pretty simple (being my first driver, it
 could not be anything *but* simple), and as such you only have to open()
 a /dev/ file (eg /dev/owire) then write() and read() as needed.

so can you send a bit and see the response? Can you reset? can you set 
power-on (for conversion?) That's enough!

   Would it be much work for me to add support for this?  Assuming this is
 not something only a person out of his mind would attempt, does anyone
 have any suggestions about how best to go about this?
Glad to help you and include it!

   -- Matthew


---
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP, 
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] What is wrong with my owperl ?

2005-07-09 Thread Paul Alfille
Here we go again.

I just pulled a fresh owfs from the CVS, did c./bootstrap and make install.
then module/swig/owperl5/test.pl /dev/ttyS1 works.

Do you think this is stale information again? Fuse would not be relevant.

Note, I'm using perl 5.8.5 as well.

Paul

On Saturday 09 July 2005 01:47 pm, Krzysztof wrote:
 Hi

 I'm sorry to bower you again :-)

 I've installed owfs with perl support.

 [EMAIL PROTECTED]:/home/temp.../new/owfs/module/swig/perl5# ./test.pl
 Can't load '/usr/lib/perl5/site_perl/5.8.5/i486-linux/auto/OW/OW.so' for
 module OW: /usr/lib/perl5/site_perl/5.8.5/i486-linux/auto/OW/OW.so:
 undefined symbol: pthread_join at
 /usr/lib/perl5/5.8.5/i486-linux/DynaLoader.pm line 230.
  at /usr/lib/perl5/site_perl/5.8.5/i486-linux/OW.pm line 7
 Compilation failed in require at ./test.pl line 8.
 BEGIN failed--compilation aborted at ./test.pl line 8.
 [EMAIL PROTECTED]:

 Hmmm what is wrong? After # line 7 @ OW.pm (bootstrap OW) I got another
 error:

 [EMAIL PROTECTED]:/home/temp.../new/owfs/module/swig/perl5# ./test.pl
 OWFS 1-wire tree perl program
   by Paul Alfille 2004 see http://owfs.sourceforge.net
 Syntax:
 ./test.pl 1wire-port
   1wire-port (required):
 'u' for USB -or-
 /dev/ttyS0 (or whatever) serial port

 [EMAIL PROTECTED]:/home/temp.../new/owfs/module/swig/perl5# ./test.pl 
 127.0.0.1
 Use of inherited AUTOLOAD for non-method OW::init() is deprecated at
 ./test.pl line 20.
 Can't locate auto/OW/init.al in @INC (@INC contains:
 /usr/lib/perl5/5.8.5/i486-linux /usr/lib/perl5/5.8.5
 /usr/lib/perl5/site_perl/5.8.5/i486-linux /usr/lib/perl5/site_perl/5.8.5
 /usr/lib/perl5/site_perl/5.8.4 /usr/lib/perl5/site_perl .) at ./test.pl
 line 20

 #slocate init.al = no results

 How can I fix that? I use perl to load data to rrdtool database and I'd
 like to use owperl!


 [EMAIL PROTECTED]:/usr/lib/perl5/site_perl/5.8.5/i486-linux# slocate OW. |grep
 perl
 /usr/lib/perl5/site_perl/5.8.5/i486-linux/auto/OW/OW.bs
 /usr/lib/perl5/site_perl/5.8.5/i486-linux/auto/OW/OW.so
 /usr/lib/perl5/site_perl/5.8.5/i486-linux/OW.pm

 It seems I have all files that owperl needs?



 ---
 This SF.Net email is sponsored by the 'Do More With Dual!' webinar
 happening July 14 at 8am PDT/11am EDT. We invite you to explore the latest
 in dual core and dual graphics technology at this free one hour event
 hosted by HP, AMD, and NVIDIA.  To register visit
 http://www.hp.com/go/dualwebinar
 ___
 Owfs-developers mailing list
 Owfs-developers@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/owfs-developers


---
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP, 
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] What is wrong with my owperl ?

2005-07-11 Thread Paul Alfille
On Monday 11 July 2005 01:24 pm, Krzysztof wrote:

 I still have a strange problem with owfs, sometimes I can not read files -
 just after I disconnect 18b20 from 1 wire network, its address directory
 (cache) still exists but reading the temperature file is impossible - mc
 gives error and crashes :-)

 File exists (I also did test -e, test -s to check it) however I can't read
 it :-)

I suspect you can read the uncached directory to get a current view of the 
devices.

There is a trade-off between speed and response to changes. The 1-wire bus is 
(relatively) slow. For applications where the bus contents change rarely, you 
can avoid a rescan of the bus by not using the uncached directory.

If you are recording data values intermittently, you probably want to scan the 
bus at the start of each sample period, then read uncached values for the 
database.

Here is a simple example (whish says two things, it's hot, and they are pretty 
accurate!):

# x=/mnt/1wire/uncached/*; for y in $x; do echo $y: `cat $y/temperature`; \ 
done
cat: /mnt/1wire/uncached/01.0683C909/temperature: No such file or 
directory
/mnt/1wire/uncached/01.0683C909:
cat: /mnt/1wire/uncached/05.5ADD1E00/temperature: No such file or 
directory
/mnt/1wire/uncached/05.5ADD1E00:
cat: /mnt/1wire/uncached/05.DD011F00/temperature: No such file or 
directory
/mnt/1wire/uncached/05.DD011F00:
cat: /mnt/1wire/uncached/09.BCCA7903/temperature: No such file or 
directory
/mnt/1wire/uncached/09.BCCA7903:
/mnt/1wire/uncached/10.003054000800:  33.0625
/mnt/1wire/uncached/10.044954000800:   33.125
/mnt/1wire/uncached/10.052854000800:  33.0625
/mnt/1wire/uncached/10.074D54000800:   33.125
/mnt/1wire/uncached/10.0D2B54000800:   33.125
/mnt/1wire/uncached/10.101454000800:  33.0625
/mnt/1wire/uncached/10.101554000800:  32.9375
/mnt/1wire/uncached/10.164F54000800:  33.0625
/mnt/1wire/uncached/10.182654000800:  33.1875
/mnt/1wire/uncached/10.1D1554000800:   33.125
/mnt/1wire/uncached/10.234254000800:   33.125
/mnt/1wire/uncached/10.2C1B54000800:   33.125
/mnt/1wire/uncached/10.2D4154000800:  33.0625
/mnt/1wire/uncached/10.301A54000800:   33.125
/mnt/1wire/uncached/10.311154000800:   33.125
/mnt/1wire/uncached/10.39756B000800:33.25
/mnt/1wire/uncached/10.3C1F54000800:  33.0625
/mnt/1wire/uncached/10.401D54000800:  33.0625
/mnt/1wire/uncached/10.414354000800:   33.125
/mnt/1wire/uncached/10.42916B000800:   33.125
/mnt/1wire/uncached/10.483354000800:  33.0625
/mnt/1wire/uncached/10.4A2D54000800:  33.0625
/mnt/1wire/uncached/10.4A4454000800:   33.125
/mnt/1wire/uncached/10.4E4C54000800:   33.125
/mnt/1wire/uncached/10.552954000800:   33.125
/mnt/1wire/uncached/10.584E54000800:   33
/mnt/1wire/uncached/10.5A3F54000800:  33.0625
/mnt/1wire/uncached/10.5E1B54000800:  33.0625
/mnt/1wire/uncached/10.601454000800:  33.0625
/mnt/1wire/uncached/10.602454000800:  33.0625
/mnt/1wire/uncached/10.602E54000800:  33.0625
/mnt/1wire/uncached/10.611154000800:   33.125
/mnt/1wire/uncached/10.641654000800:   33.125
/mnt/1wire/uncached/10.653E54000800:  33.0625
/mnt/1wire/uncached/10.674E54000800:  33.0625
/mnt/1wire/uncached/10.6F3F54000800:33.25
/mnt/1wire/uncached/10.711C54000800:   33.125
/mnt/1wire/uncached/10.792F54000800:  33.1875
/mnt/1wire/uncached/10.793E54000800:   33.125
/mnt/1wire/uncached/10.7E3754000800:   33.125
/mnt/1wire/uncached/10.801754000800:  33.0625
/mnt/1wire/uncached/10.821454000800:  33.1875
/mnt/1wire/uncached/10.892254000800:  33.0625
/mnt/1wire/uncached/10.894F54000800:  33.0625
/mnt/1wire/uncached/10.8B3954000800:   33.125
/mnt/1wire/uncached/10.904154000800:   33.125
/mnt/1wire/uncached/10.904954000800:   33.125
/mnt/1wire/uncached/10.974F54000800:   33.125
/mnt/1wire/uncached/10.9A2F54000800:   33.125
/mnt/1wire/uncached/10.9A9E3C000800:   33.125
/mnt/1wire/uncached/10.9B2D54000800:  33.0625
/mnt/1wire/uncached/10.9C4654000800:  33.0625
/mnt/1wire/uncached/10.9D4154000800:  33.0625
/mnt/1wire/uncached/10.A44E54000800:  33.0625
/mnt/1wire/uncached/10.A53654000800:  33.1875
/mnt/1wire/uncached/10.A73A54000800:   33.125
/mnt/1wire/uncached/10.AA4D54000800:   33.125
/mnt/1wire/uncached/10.AC2754000800:   33.125
/mnt/1wire/uncached/10.AD1A54000800:   33.125
/mnt/1wire/uncached/10.B14154000800:   33.125
/mnt/1wire/uncached/10.B64054000800:   33.125
/mnt/1wire/uncached/10.B72E54000800:  33.0625
/mnt/1wire/uncached/10.B74754000800:  33.1875
/mnt/1wire/uncached/10.B83754000800:   33.125
/mnt/1wire/uncached/10.BB1754000800:  33.1875
/mnt/1wire/uncached/10.BE2254000800:   33
/mnt/1wire/uncached/10.C24654000800:   33.125
/mnt/1wire/uncached/10.C44154000800:   33.125
/mnt/1wire/uncached/10.C64354000800:  33.0625

Re: [Owfs-developers] What is wrong with my owperl ?

2005-07-12 Thread Paul Alfille
Nice work.

Wish we could find someone to test a Mac OS X system.

Paul

On Tuesday 12 July 2005 09:18 am, Christian Magnusson wrote:
 I succeeded to compile owhttpd and owserver for Solaris 7 now. It seems
 to work, but I haven't tried to use any adapter yet... just running
 to the serial port which is detected as a bad adapter.

 Have added some compatibility source-files to owlib, and you can have
 a look at it and tell me if you have any ideas of changes to make it
 cleaner. Will check in all changes as soon as I can here.

 /Christian

 On Tue, 2005-07-12 at 09:57, Christian Magnusson wrote:
  On Mon, 2005-07-11 at 19:24 +0200, Krzysztof wrote:
   Christian Magnusson wrote:
There were no dependencies to libpthread when compiling libow.so,
so OW.so loaded libow.so and didn't understand to use libpthread.so
too.
   
I have updated some of the makefiles and configure.ac to fix the
problem (I hope). I guess this fix only was needed for older libc.
  
   YES! Now it works like a charm :-)
   thank you!
 
  I just tried to compile owhttpd for Solaris 7, and I just wanted to
  tell you that I'm updating configure.ac again to get correct compilation
  flags... especially for pthread. The changes will be somewhat better and
  will work for more platforms in a while.
 
  /Christian
 
 
 
 
  ---
  This SF.Net email is sponsored by the 'Do More With Dual!' webinar
  happening July 14 at 8am PDT/11am EDT. We invite you to explore the
  latest in dual core and dual graphics technology at this free one hour
  event hosted by HP, AMD, and NVIDIA.  To register visit
  http://www.hp.com/go/dualwebinar
  ___
  Owfs-developers mailing list
  Owfs-developers@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/owfs-developers

 ---
 This SF.Net email is sponsored by the 'Do More With Dual!' webinar
 happening July 14 at 8am PDT/11am EDT. We invite you to explore the latest
 in dual core and dual graphics technology at this free one hour event
 hosted by HP, AMD, and NVIDIA.  To register visit
 http://www.hp.com/go/dualwebinar
 ___
 Owfs-developers mailing list
 Owfs-developers@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/owfs-developers


---
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP, 
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] Re: User access to the 1-wire bus

2005-07-13 Thread Paul Alfille
On Wednesday 13 July 2005 01:53 am, Shawn Rutledge wrote:
 Today I finally got a couple of USB 1-wire dongles so naturally this
 evening I'm installing the latest owfs.  :-)

 I followed Peter Kropf's advice for the hot plug script:

 #!/bin/bash
 #
 # setup a usb 1-wire controller to allow access from users in
 # the owfs group.

 GROUP=owfs

 if [ $ACTION = add ]  [ -f $DEVICE ]
 then
 # check if $GROUP really exists
 if getent group $GROUP  /dev/null; then
  chmod 660 $DEVICE
 chown root.$GROUP $DEVICE
 fi

 # remove the kernel driver so that we can control it from user
 # land
 if /sbin/lsmod | grep ds9490r  /dev/null 21; then
 /sbin/rmmod ds9490r
 fi

 fi

 and indeed the /proc entry has group owfs after that.  But I don't
 understand why you want the rmmod?  It seems to work just as well if I
 comment out those lines and leave the module loaded.
The rmmod is obsolete. OWFS now uses a (non-portable) libusb command to remove 
that module itself.

 This also does not change the permission of the mounted fuse
 filesystem.  How do I do that?  I would like to have group rw
 permission for /mnt/ow0 but right now only root can do anything, even
 though the permissions look like this:

 drwxr-xr-x  3 root root 1 Jul 12 22:35 /mnt/ow0

 I have a little experience with scripts for hot-plugging network-like
 interfaces, for example when I plug in my Zaurus to the USB cradle,
 the network interface usb0 is created by the usblan module and then
 /etc/init.d/net.usb0 is called to configure it; but net.usb0 is a
 generic network config script which gets the configuration info from
 /etc/conf.d/net.  So I imagine we can do something similar for owfs -
 there can be an /etc/init.d/ow.usb0 which takes care of mounting
 /mnt/ow0 and starting owhttpd etc., with a conf file elsewhere to
 disable some of the services if necessary.

 Is anybody working on a Gentoo ebuild yet?


 ---
 This SF.Net email is sponsored by the 'Do More With Dual!' webinar
 happening July 14 at 8am PDT/11am EDT. We invite you to explore the latest
 in dual core and dual graphics technology at this free one hour event
 hosted by HP, AMD, and NVIDIA.  To register visit
 http://www.hp.com/go/dualwebinar
 ___
 Owfs-developers mailing list
 Owfs-developers@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/owfs-developers


---
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP, 
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] Adding another means of accessing devices(ie not serial, USB, etc)...

2005-07-17 Thread Paul Alfille
Nice work. I've been going through your code.

One basic question: What exactly is this adapter and which architecture 
supports it?

Specific comments:
1. in ow_omap.c : OMAP_reset, are we missing something? I see a loop, with 
fsync, but no body.

2. How big a send/recieve buffer does the adapter have?

3. Is there a characteristic major/minot device number to test for in 
OMAP_detect

4. It's a matter of style. Your ow_omap.h has only static function prototypes. 
I've been putting them at the start of the source module and using the *.h 
files for externally visible definitions.

5. Do you have a picture of the adapter for the web site?

Paul


---
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=7477alloc_id=16492op=click
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] DS2431 memory woes, and BUS_send_data() bug...

2005-07-21 Thread Paul Alfille
On Wednesday 20 July 2005 01:09 am, Matthew Percival wrote:
 G'Day,

   I am currently trying to weed out why I still cannot read from my
 DS2431 device, and in my testing I stumbled across a minor bug in
 BUS_send_data().

   When I `cat 2D.serial/memory', it does not work, so I checked `cat
 statistics/errors/BUS_*' and noticed that BUS_send_data_errors was 1,
 however, when I checked `cat statistics/errors/OMAP_*', everything was
 0!  The only logical explanation is that the error being generated by
 BUS_send_data() was not due to OMAP_sendback_data() returning a non-zero
 value, rather that memcmp() was coming back non-zero.  When I checked
 the code for this section, I noticed a small mistake.

   The line is as follows:
   (ret=BUS_sendback_data( data, resp, len,pn )) ||
   ((ret=memcmp(data, resp, (size_t) len))?-EPROTO:0) ;
 Which, if I assume BUS_sendback_data() is returning `0' and memcmp is
 returning `unknown', evaluates to:
   0 || (unknown ? -EPROTO : 0)
 In other words, that *line* evaluates to either 0 or -EPROTO, but the
 value or ret will be the value of unknown.  You can fix this by moving
 the bracket like so:
   (ret = BUS_sendback_data( data, resp, len,pn )) ||
   ((ret = memcmp(data, resp, (size_t) len) ? -EPROTO : 0));
 Now, if memcmp returns a non-zero value, ret will equal -EPROTO.

You're right. Fixed, and clearer too.
   I have also noticed that owfs seems to fall asleep on me at times:
 sometimes when I give a command (ls, cat, etc), it will just hang on
 that.  If I background the ls/cat and `killall owfs' it will finally act
 on the command (with a predictable `No such file or directory' error).
 I have tried disabling multithreading, but that did not seem to be the
 problem.  Has anyone else experienced anything like this before?

   As to the specifics of the function called when catting
 2D.serial/memory/, perhaps it is just my misunderstanding, but it seems
 to me like calling BUS_send_data() is not the best thing to do.
 BUS_send_data(x,3,y) sends three bits, then reads three bits and
 compares them.  If I am correctly understanding the way this device
 works, are the bits you read back there not the contents of the memory?
 I could very well be wrong here, as I am finding the documentation for
 the device a little hard to follow at times, but that is just how it
 seems to me: I need to send 0xF0, some sort of reference address, then
 start reading back data stored in that address.

Never properly documented, but:
BUS_send_data sends and compares data (the data is specific to 
DS2480B/DS9097U syntax that uses in-band commands to the adapter, hence 
data and command modes).
BUS_sendback_data sends data and returns what it reads.
BUS_readin_data sends dummy data and returns what it reads.

Clearly these are all slight variations of the underlying send bits and look 
at what the bus does to them, but that's the essence of 1-wire 
communication.

Tell me specifically where you are looking, please.

   -- Matthew



 ---
 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=7477alloc_id=16492op=click
 ___
 Owfs-developers mailing list
 Owfs-developers@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/owfs-developers


---
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=7477alloc_id=16492op=click
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] DS2431 memory woes, and BUS_send_data() bug...

2005-07-21 Thread Paul Alfille
On Thursday 21 July 2005 08:55 pm, Matthew Percival wrote:
 G'Day,

  When I `cat 2D.serial/memory', it does not work, so I checked `cat
  statistics/errors/BUS_*' and noticed that BUS_send_data_errors was 1,

   I may have been looking at the wrong thing with that: that error is
 probably being flagged at some earlier time, and as such not related to
 the problem I am experiencing.

   I have been watching what happens when I cat `memory' with an
 oscilloscope, and noted some rather unusual behaviour.  For some reason,
 when I cat this file the `Match ROM' command (effectively, BUS_select()
 for the purposes of owfs), is being performed twice, then nothing else.
 The OW_r_mem() function in ow_2433.c, however, lists a BUS_select() call
 followed by BUS_send_data() and BUS_readin_data(), so I am not sure why
 nothing is getting called after BUS_select(), nor why that function is
 being called twice.

Sounds like a problem with the select.
The routine is as follows:

static int OW_r_mem( unsigned char * data , const size_t size , const size_t 
offset, const struct parsedname * pn) {
unsigned char p[] = {  0xF0, offset0xFF, offset8, } ;
int ret ;
//printf(reading offset=%d size=%d bytes\n, offset, size);

BUSLOCK(pn);
ret = BUS_select(pn) || BUS_send_data( p, 3,pn ) || 
BUS_readin_data( data,size,pn );
BUSUNLOCK(pn);
if ( ret ) return 1;

return 0 ;
}

Which means
1. the device is selected
2. The command sequence for reading a section of memory is issued (3 bytes).
3. The data is read into the buffer

It looks right to me.
   Because the DS2431 I am using is sharing almost identical code to the
 DS2433, I was wondering if anyone has either device and is able to
 observe similar behaviour, or have any suggestions as to what may be
 going on here.  I watched closely, and there were definitely no
 additional calls to the omap_owire kernel driver, and if the
 BUS_*/OMAP_* functions were to fail they should produce an error, so it
 seems more likely that the functions are never being called.

   -- Matthew



 ---
 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=7477alloc_id=16492op=click
 ___
 Owfs-developers mailing list
 Owfs-developers@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/owfs-developers


---
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=7477alloc_id=16492op=click
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] Swart LCD driver working in 1.0p0 and not in 2.1.0/CVS?

2005-07-28 Thread Paul Alfille
On Thursday 28 July 2005 06:15 am, Christian Magnusson wrote:

  2. It looks like we are typeint the DS1410 serial number (a binary
  string) as a text string in the debugging code.

 What do you mean?  I don't get this... :)


Oops, I missed that BytesToString call. Sorry.

Paul


---
SF.Net email is Sponsored by the Better Software Conference  EXPO September
19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] Swart LCD driver working in 1.0p0 and not in 2.1.0/CVS?

2005-07-28 Thread Paul Alfille
On Tuesday 26 July 2005 10:48 pm, Josh Bailey wrote:
 Hello;

 I have been successfully using owfs 1.0p0 for a long time, with DS18S20's
 and an LCD display (one of Mr. Louis Swart's excellent devices).

 Recently I tried upgrading to 2.1.0. After the upgrade, I could see the
 DS18S20's, but not the LCD anymore. Under 1.0p0, there's a FF.79020100
 directory for the LCD. Under 2.1.0, there's no such directory, though
 there are directories for the DS18S20s (I can read temperature, etc no
 problem). 2.1.0 owhttpd also cannot see the LCD (though 1.0p0's can). The
 same problem appears with the CVS version (as of yesterday).

 The only thing I am changing is the owfs driver - fuse, etc is the same.

 I am using Debian stable, my own kernel (2.6.13). I am using a DS9490 USB
 adaptor to connect to my 1-wire network.

 Please is this a known problem or might anyone have any troubleshooting
 advice?

 Thanks,

Are you sure of the previous version you were using?

Paul


---
SF.Net email is Sponsored by the Better Software Conference  EXPO September
19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] Re: current CVS version broken!

2005-07-31 Thread Paul Alfille
No change was intended. Sounds like a new bug.

Paul

On Sunday 31 July 2005 06:35 am, Sven Geggus wrote:
 Christian Magnusson [EMAIL PROTECTED] wrote:
  You might need to bind owserver to listen on all addresses such as
 
  owserver -u -p 0.0.0.0:5005
  owhttpd -p 8080 -s 5005

 Hm, I did not need to do this with the CVS Version from about one month
 ago.

 Anyway, if I use something like -p 0.0.0.0:12345 it works fine with ipv4,
 but it does not listen on ipv6 anymore.

 Sven


---
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=7477alloc_id=16492op=click
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] Re: current CVS version broken!

2005-07-31 Thread Paul Alfille
On Sunday 31 July 2005 03:27 pm, Paul Alfille wrote:
 No change was intended. Sounds like a new bug.

 Paul

 On Sunday 31 July 2005 06:35 am, Sven Geggus wrote:
  Christian Magnusson [EMAIL PROTECTED] wrote:
   You might need to bind owserver to listen on all addresses such as
  
   owserver -u -p 0.0.0.0:5005
   owhttpd -p 8080 -s 5005
 
  Hm, I did not need to do this with the CVS Version from about one month
  ago.
 
  Anyway, if I use something like -p 0.0.0.0:12345 it works fine with
  ipv4, but it does not listen on ipv6 anymore.
 
  Sven

It looks like getaddrinfo emulation routines were added (I presume for 
platforms or C libraries where those functions were not present). I suspect 
that you are (unwittingly) using the emulation which has slightly different 
behavior. The original was taken from Steven's networking book.
















---
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=7477alloc_id=16492op=click
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] Re: current CVS version broken!

2005-08-01 Thread Paul Alfille
On Sunday 31 July 2005 07:28 pm, Christian Magnusson wrote:
 I think I found the problem.. I have probably been tired or something
 when adding a row in ow_net.c which clears AI_PASSIVE.
 The cvs is unreachable for me right now, so could somebody
 else checkin the patch later?


 diff --exclude '*Entries' -ruw cvs/owfs/module/owlib/src/c/ow_net.c
 owfs/module/owlib/src/c/ow_net.c
 --- cvs/owfs/module/owlib/src/c/ow_net.c2005-07-30
 18:00:44.0 +0200
 +++ owfs/module/owlib/src/c/ow_net.c2005-08-01 01:25:35.0
 +0200
 @@ -61,7 +61,6 @@

  memset( hint, 0, sizeof(struct addrinfo) ) ;
  hint.ai_flags = AI_PASSIVE ;
 -hint.ai_flags = 0 ;
  hint.ai_socktype = SOCK_STREAM ;
  hint.ai_family = AF_UNSPEC ;

done.


---
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=7477alloc_id=16492op=click
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] Re: current CVS version broken!

2005-08-02 Thread Paul Alfille
On Tuesday 02 August 2005 12:54 pm, Sven Geggus wrote:

 OK, works again with the current CVS-Version.

 How is this supposed to work?

 owserver -p :::4711 -u --foreground

 Is this correct, doing a bind to any local IP in the IPv4 or IPv6 domain?

The algorithm is
1. If no : in address, it's a port number, else
2. Parse off the terminal part after the last : as the port, and everything 
else is an address.
3. Feed the address to getaddrinfo which is supposed to work for IPv4 and 
IPv6. The exact symantics for IPv6 wasn't so clear to me. We use whatever the 
glibc default is.

So in this case, the port would be 4711 and the IP address ::.

 BTW, there is some debug-output left:

 [EMAIL PROTECTED]:./sven  owserver -p :::4711 -u --foreground
 NEXT: buffer[13]=16
 NEXT: buffer[13]=16
 NEXT: buffer[13]=8

 Sven

I think it's been removed.


---
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=7477alloc_id=16492op=click
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


[Owfs-developers] Static owfs

2005-08-05 Thread Paul Alfille
Any suggestions on making statically linked owfs, owhttpd and owserver? Seems 
like that would ease some of the installation problems.

Paul


---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


[Owfs-developers] Re: owfs

2005-09-08 Thread Paul Alfille
(Forwarded to the developers list)

May I suggest testing with owfs-dsl (the standalone preconfigured live cd) to 
test whether it's an issue with your configuration or the underlying 
software?

The configuration you describe should work with the DS9097U and LINK serial 
adapters, but I have never made a passive adapter to test.

If you can give the URL of the page you used for the adapter design, I can 
cobble one together.

Paul

On Wednesday 07 September 2005 06:05 pm, you wrote:
 Dear Mr.Alfille,

 first of all congrats to your nice project. I'm writing you because i
 have problems getting owfs running.
 The problem: I got a 1-wire bus with 4 devices using a simple
 serial-converter (the one from the digitemp project) ... 3 are DS1820
 temperature sensors and one DS2408 8-channel switch...
 The problem is, that owfs only detects two of the DS1820's ...
 I'm sure that it's no hardware problem because digitemp detects all 4 of
 them (although it doesn't recognize the 8-channel switch, but returns
 it's serial-number)

 can you tell me how i can track down the problem? could this be a bug?

 please tell me if you need any debug output (--error_level 3 doesn't
 seem to be very useful)

 thanks in advance and many regards
 
 rigid


---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] Re: owfs

2005-09-08 Thread Paul Alfille
On Thursday 08 September 2005 09:39 pm, Daniel Hiepler wrote:

Can you try owhttpd? It avoids fuse. I suspect it won't help, but at least 
will narrow the problem.
  The configuration you describe should work with the DS9097U and LINK
  serial  adapters, but I have never made a passive adapter to test.

 i guess that's the problem. I also forgot to mention that the
 temp-sensors that are recognized by owfs are connected serially... one
 temp-sensor and the DS2408 are connected in parallel...
 like this:

 +---DS2408
 +DS1820   |

 DATA   | ||
   O-+--DS1820-DS1820 ||

 GND| |   ||
   O---+---++---+

 This architecture may seem strange but it's the easiest way i can do it.
 and although i'm no electrical-engineer i guess it doesn't matter how
 they are connected.
 And it works with digitemp...
I presume all the data pins are connected together and all the ground pins 
(and VDD for DS1820) are connected together. Except for electrical 
reflections, the topology you describe is just fine.


  If you can give the URL of the page you used for the adapter design, I
  can  cobble one together.

 that would be cool... do you have a DS2408 ready for testing? you may
Yes
 also want to have a look at the digitemp sourcecode and how it handles
 the bus-walk-stuff...
I have. Extensively.
It's more likely that recent changes to allow replugging aren't fully debugged 
on the passive adapter.

 http://www.linuxnetmag.com/de/issue8/m8temperature1.html

 the page is german, but i think it's the same curcuit as shown on your
 page.



---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


[Owfs-developers] Fwd: [fuse-devel] FUSE merged to 2.6.14!

2005-09-09 Thread Paul Alfille
Great news. FUSE will be part of the standard kernel, and thus presumably 
available for OWFS. I'm guessing that the other distributions will join 
Debian and Gentoo in including it.

--  Forwarded Message  --

Subject: [fuse-devel] FUSE merged to 2.6.14!
Date: Friday 09 September 2005 07:32 pm
From: jens m. noedler [EMAIL PROTECTED]
To: [EMAIL PROTECTED]

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

It's in the Kernel now:
http://kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=shortlog

Thanks Miklos for fighting to get it into mainline! :-)

Greetings, Jens

- --
jens m. noedler
  [EMAIL PROTECTED]
  pgp: 0x9f0920bb
  http://noedler.de

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFDIhuJBoFc9p8JILsRAiG+AKDgSYhwal4CU/hw1xFgbIaMKKrYcQCgrbVq
akKaHWU5VlQ5eMC9ksDfEzw=
=NjAe
-END PGP SIGNATURE-


---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
fuse-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/fuse-devel

---


---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] OWFS-DSL complete live-cd

2005-09-09 Thread Paul Alfille
On Friday 09 September 2005 01:13 am, Christian Magnusson wrote:
 I am running FC4 too at work, and why not add /usr/local/lib to
 ld.so.conf just to be sure you don't forget to move the libraries
 to /usr/lib when you update fuse next time. I think this is a much
 better solution.

  more /etc/ld.so.conf

 include ld.so.conf.d/*.conf
 /usr/local/lib

Because I didn't think of it.

Probably a more optimal solution would be to put the fix in the configuration 
file.

Since FUSE will be part of the mainline kernel, this issue will only bother us 
on older installations. I'm guessing 1-2 bug reports a month for the next few 
years.


---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] Re: owfs

2005-09-09 Thread Paul Alfille
On Friday 09 September 2005 04:03 am, Daniel Hiepler wrote:
 i'm pretty sure it's a bug...
 if you want you can send me a patch that enables debug-output for
 passive-adapters... anything you want btw. it's kinda strange that
 the cheapest/least-complex adaptor is the one least tested... :)

 tnx + many regards
 _
 rigid

Well, the passive adapter has:

1. the worst performance
2. the highest CPU utilization
3. the most touchy construction (witness all the variants)
4. the least availability

The original testing was done via an ssh session across the Atlantic.

I wandered down to the hospital engineering department today, but couldn't 
find all the parts. Nobody does discrete components anymore.

I'll try the local Radioshack when I can, mainly because my interest is 
piqued.

Frankly, considering the cost of your time, buy a real adapter.

Paul


---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] Re: Microchip acting as 1Wire

2005-09-30 Thread Paul Alfille
Louis uses a pic16f628 with an M8.000A3T crystal.
It works great.

On Thursday 29 September 2005 11:18 am, Petr wrote:
 Rene

 thanks a lot. I will check the code.

 BTW surprisingly I have discovered the 1-Wire LCD controller made by
 Louis Swart http://www.louisswart.co.za/1-Wire_Overview.html is
 basically identical with intended idea (instead of the motor he is
 driving LCD display).

 Of course it can be easier and faster to design such a home-build
 slave if Louise's code can be available under some public licence. I
 will try to contact Louis by mail :)

 I think we will prefer to design to design it as a SLAVE device
 because of the compatibility with the existing systems etc.

 Petr


---
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


[Owfs-developers] Re: OWFS and DS1821 request

2005-10-02 Thread Paul Alfille
Matthieu,

I'm sure you know that the DS1821 is quite different from the other 1-wire 
devices:

1. it has no address and cannot live on the same bus with any other devices
2. it has two modes, temperature and thermostat. Thermostat mode cannot be 
exited by 1-wire commands alone (it requires dropping the Vdd line), so would 
need hardware support or a separate 1-wire bus and a switch like the 
DS2405,6,7,8,9,13...

To support it, we'd probably use a command line switch (--DS1821) that would 
turn off all the bus search, directory functions, etc...

/DS1821
  /type (ro)
  /templow (rw)
  /temphigh (rw)
  /temperature (ro)
  /alarm/temphigh (rw)
  /alarm/templow (rw)
  /polarity (rw)
  /thermostat (rw)
  /1shot (rw)
  /continuous (wo)

How would you plan using the DS1821? As a thermometer, or as a programmable 
thermostat?

Paul



On Sunday 02 October 2005 12:37 pm, you wrote:
 Hi,

 I have a request, I haven't see the support of the
 DS1821 .
 Is it possible to provide the support of this device
 for us and for the other users of OWFS ?

 We use it in our project and It could help us a lot !

 Thanks.
 Matthieu (aquariomate sourceforge project)


---
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] Configuration problem -- building libraries

2005-10-09 Thread Paul Alfille
On Monday 10 October 2005 12:04 am, Gregg Levine wrote:
 Hello from Gregg C Levine
 Your right. It sounds strange. Every time I build anything on Linux
 that needs, or will need shared libraries, they get created with the
 classic .so as part of the name. What say you post your configure
 script? A clew may be in that. Also any other logs created during the
 whole process of building this portion of the project. I also find it
 helpful to have script or typescript as its known keep a log of
 anything that the system is doing if this is code that was checked out
 of CVS, but wasn't either written by me, or even built locally first.
 Just a shot in the dark, but it might help.

Well the configure script is the CVS version.

I've done a fresh pull and install on another machine with the same problem.

Paul


---
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] C-API

2005-10-11 Thread Paul Alfille
Ok, Geo. I'm convinced.

Look in the CVS for owcapi. (libowcapi.so.0.0.0)

Very simple library:
int OW_init( const char * device ) ;
int OW_get( const char * path, char * buffer, int buffer_length ) ;
int OW_put( const char * path, const char * buffer, int buffer_length ) ;
void OW_finish( void ) ;

Seems to work.

Paul

On Tuesday 11 October 2005 04:44 pm, Geo Carncross wrote:
 On Fri, 2005-10-07 at 14:06 -0400, Alfille, Paul H.,M.D. wrote:
  Sven,
 
  It would be easy to do. The real problem is string handling. We'd have to
  specify buffers and lengths.

 Why?

 int get_value(const char *path, char **ret, unsigned int *retlen);

 Would be adequate and not require a buffer, and if everything is
 ASCIIZ-safe, using:

 int get_value(const char *path, char **ret);

 would be fine too.

  So for a directory listing, you would get either a long string to be
  parsed, or an array of strings.

 Why not a pointer to an array and a list?

 Or an iterator? [think about how opendir() works]

  Also, the return types are multiple, integer, string or floating. It
  would probably be better to get the raw data type rather than have to
  reparse the ascii interpretation.

 Why would it? That just makes it complicated.

 Since it's already in the string form, parsing it again for me doesn't
 help. After all, I might be able to get by with something that becomes
 equivelent to:

 unsigned int q = *(unsigned int*)ret;
 if (q255) { /* must not be a three-digit number */ }

 The user already knows how to use atoi(), and if they want to use it,
 this really won't cost them a lot in cpu-time. Nothing compared to
 context-switches and the fact that 1wire is already really slow :)

  Choices in C:

 I think the real-deal is avoiding the context switches and
 code-complexity.


---
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] New owcapi interface. Happy?

2005-10-13 Thread Paul Alfille
On Thursday 13 October 2005 03:39 pm, Geo Carncross wrote:

 I did an update and cannot find the owcapi-in-progress. Is it on another
 tag besides HEAD?

owfs/modules/owcapi

./configure --enable-owcapi (At least until development is done, then should 
be default enabled since it will compile if owlib compiles).



---
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] Makefile updates

2005-10-13 Thread Paul Alfille
On Thursday 13 October 2005 10:20 am, Christian Magnusson wrote:
 I have updated the makefiles to make it possible to make dist and
 rpm again. Library extensions for libow.so and libowcapi.so should be
 fixed too.

 Could anyone else try building on some more servers just to make sure
 I didn't break anything. I have seen that happen before...


The CVS version works great on a fresh pull on SuSE 9.3 (AMD64).


---
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] Re: New owcapi interface. Happy?

2005-10-16 Thread Paul Alfille
Oops.

My error. I didn't define the mutex properly. Try it now.

Paul

On Sunday 16 October 2005 08:48 am, Sven Geggus wrote:
 Paul Alfille [EMAIL PROTECTED] wrote:
  Ok uploaded some OWCAPI changes.

 I tried to compile a simple example Source, all I get is an undefined
 reference to 'capi_mutex':

 $ cc -I/opt/owfs/include/ -L/opt/owfs/lib -lowcapi owtest.c
 /opt/owfs/lib/libowcapi.so: undefined reference to 'capi_mutex'

 Do I need an additional library?

 Sven


---
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] New owcapi interface. Happy?

2005-10-17 Thread Paul Alfille
Ok, used your code, and created some paired functions in OWLIB:
// ow_api.c
int  OWLIB_can_init_start( void ) ;
void OWLIB_can_init_end(   void ) ;
int  OWLIB_can_access_start( void ) ;
void OWLIB_can_access_end(   void ) ;
int  OWLIB_can_finish_start( void ) ;
void OWLIB_can_finish_end(   void ) ;

The gist of this is that all the mutexes and conditions variables are hidden 
from the C api, and also they can be used by other programs.

Paul

The implementation is in modules/owlib/src/c/ow_api.c and looks like this:
/* code for SWIG and owcapi safe access */
/* Uses two mutexes, one for indevices, showing of there are valid 1-wire 
adapters */
/* Second is paired with a condition variable to prevent finish when a get 
or put is in progress */
/* Thanks to Geo Carncross for the implementation */

#include owfs_config.h
#include ow.h

/* --- Globals --- */
#ifdef OW_MT
pthread_mutex_t init_mutex= PTHREAD_MUTEX_INITIALIZER ;
pthread_mutex_t access_mutex  = PTHREAD_MUTEX_INITIALIZER ;
pthread_cond_t  access_cond   = PTHREAD_COND_INITIALIZER  ;
#define INITLOCK   pthread_mutex_lock(init_mutex   )
#define INITUNLOCK pthread_mutex_unlock(  init_mutex   )
#define ACCESSLOCK pthread_mutex_lock(  access_mutex   )
#define ACCESSUNLOCK   pthread_mutex_unlock(access_mutex   )
#define ACCESSWAIT pthread_cond_wait(access_cond, access_mutex )
#define ACCESSSIGNAL   pthread_cond_signal(  access_cond )
#else /* OW_MT */
#define INITLOCK
#define INITUNLOCK
#define ACCESSLOCK
#define ACCESSUNLOCK
#define ACCESSWAIT
#define ACCESSSIGNAL
#endif /* OW_MT */

int  access_num = 0 ;

/* Returns 0 if ok, else 1 */
/* MUST BE PAIRED with OWLIB_can_init_end() */
int OWLIB_can_init_start( void ) {
#ifdef OW_MT
  #ifdef __UCLIBC__
if ( INITLOCK == EINVAL ) { /* Not initialized */
pthread_mutex_init(init_mutex, pmattr);
pthread_mutex_init(access_mutex, pmattr);
INITLOCK ;
}
  #else /* UCLIBC */
INITLOCK ;
  #endif /* UCLIBC */
#endif /* OW_MT */
  return indevices  0 ;
}

void OWLIB_can_init_end( void ) {
INITUNLOCK ;
}

/* Returns 0 if ok, else 1 */
/* MUST BE PAIRED with OWLIB_can_access_end() */
int OWLIB_can_access_start( void ) {
int ret ;
ACCESSLOCK ;
access_num++ ;
ACCESSUNLOCK ;
INITLOCK ;
ret = (indevices == 0) ;
INITUNLOCK ;
return ret ;
}

void OWLIB_can_access_end( void ) {
ACCESSLOCK ;
access_num-- ;
ACCESSSIGNAL ;
ACCESSUNLOCK ;
}

/* Returns 0 always */
/* MUST BE PAIRED with OWLIB_can_finish_end() */
int OWLIB_can_finish_start( void ) {
ACCESSLOCK ;
while ( access_num  0 ) ACCESSWAIT;
INITLOCK ;
return 0 ; /* just for symetry */
}
void OWLIB_can_finish_end( void ) {
INITUNLOCK ;
ACCESSUNLOCK ;
}


On Monday 17 October 2005 10:24 am, Geo Carncross wrote:
 A mutual exclusion device is necessary.

 OW_get, OW_put, and OW_finish all lock the common mutex.

 If OW_get and OW_put /really can/ be used simultaneously, then a
 condition is required:


 in OW_get and OW_put:

 LOCK(mutex);
 level++;
 UNLOCK(mutex);
 { real code }
 LOCK(mutex);
 level--;
 SIGNAL(cond);
 UNLOCK(mutex);


 and in OW_finish:

 LOCK(mutex);
 while (level  0) COND(cond,mutex);
 { destroy interface safely now }
 UNLOCK(mutex);


 in pthreads this is:

 pthread_cond_t cond;
 pthread_mutex_t mutex;

 #define COND(q,p) pthread_cond_wait(q,p)
 #define SIGNAL(q) pthread_cond_signal(q)
 #define LOCK(q) pthread_mutex_lock(q)
 #define UNLOCK(q) pthread_mutex_unlock(q)


 NOTE: this is NOT the same mutex as you're using for acessing indev
 (capi_mutex) - but a different one JUST for this cond variable.


 BY THE WAY, shouldn't these things be static? Is there really a reason
 user programs should have access to it?

 On Sun, 2005-10-16 at 22:57 -0400, Paul Alfille wrote:
  Added the same protection for the SWIG prototype (owperl, owpython,
  owphp).
 
  It occurs to me that it is possible that a OW_finish could be called
  while an OW_get or OW_put is in progress -- could be messy since the
  adapters would be disappearing while being used. I'll have to get out the
  old textbook to figure the proper flag for this one -- a semaphore?
 
  Paul
 
  On Sunday 16 October 2005 01:33 am, Paul Alfille wrote:
   Ok uploaded some OWCAPI changes.
  
   1. I've put in your char** mode. I'm really starting to warm up to it.
  
   2. Protection against multiple inits, no inits, simultaneous
   inits...
  
   Paul
 
  ---
  This SF.Net email is sponsored by:
  Power Architecture Resource Center: Free content, downloads, discussions,
  and more. http://solutions.newsforge.com/ibmarch.tmpl
  ___
  Owfs-developers mailing list
  Owfs-developers@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/owfs-developers

Re: [Owfs-developers] FUSE version

2005-10-18 Thread Paul Alfille
On Tuesday 18 October 2005 01:52 am, Gregg Levine wrote:
 Hello from Gregg C Levine
 Just for kicks, what release version of FUSE are we using this
 timeperiod? From that project's CVS, or a numbered version that
 they've built, and numbered accordingly?

Christian's note is definitive in this. The 2.3 fuse package is what I usually 
use.

The basic fuse functionality that we use hasn't changed in 3 years. The only 
real issues are embedded systems, non-root users, and read-only file systems.

The FUSE used in the owfs-dsl is 2.3, slightly modified to work with a 
read-only /etc directory.

Paul


---
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] New owcapi interface. Happy? - ADDENDUM

2005-10-18 Thread Paul Alfille
On Tuesday 18 October 2005 10:37 am, Geo Carncross wrote:
 I should clarify, that providing a common API to the language bindings
 isn't bad, but requiring that they use them is- that is, having other
 parts of OW use the same mutexes and locks and whathaveyou that the OW
 language bindings do.

You're right. In general they do share all the same synchronization/locks. 
That's what made allowing simultaneous reads and writes so easy.

The only problem is that owfs, owhttpd and owserver can strictly enforce the 
order that owlib setup, use, and shutdown occur. Allowing those primatives in 
the language bindings requires a check.

I've now put that check in owlib, with simple calls to bracket use in the 
language bindings. This follows our general philosophy of making owlib heavy 
and all the other programs light.

Paul


---
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] Bug in DS2413

2005-10-26 Thread Paul Alfille
Majek,

I've looked at the problem you've found, and now can see it clearly.

Basically, the latch state should be used for the unknown PIO bit when 
setting one of the pins. As you point out, the pins must be set together in 
the hardware, it is only the software abstraction that allows them to be 
controlled independently.

The PIO field is set as a bitfield aggregate, so the separation and 
setting of the other bits is done upstream, in ow_read.c. Unfortunately, we 
use the same property to set the field (PIO) which is usually correct. Just 
in this case, it should be latched, since reading the PIO gives the sensed 
value, not the set value.

I'm not sure your patch quite addresses the problem. I fear the true patch 
will be a little uglier, and probably not done till next week.

Paul Alfille

On Wednesday 26 October 2005 04:50 pm, Marek Wodzinski wrote:
 On Wed, 26 Oct 2005, Alfille, Paul H.,M.D. wrote:
  Thanks. I especially appreciate the patch.
 
  I take it the code wasn't too hard to decypher?

 Hehe... I assumed that this was DS2413 specific issue and I looked into
 low level driver of this chip. But this is 'dirty' patch.
 I think that 'right way' should be some level up where emulatiion of
 toggling single bits is. But I couldn't find this in quick search and I
 suppose that fixing/rewriting that part of code will be not so easy as
 this.
 Or just disable this option for this chip - there is no native bit set in
 DS2413 - you must always set two bits together.


 Regards

 majek


---
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


[Owfs-developers] Fwd: OWFS

2005-10-27 Thread Paul Alfille
Hello Marinho,

I will foreward your note to the developer's list. I'll pull that version and 
test next week.

You are correct, though, this message is certainly not helpful. 

Paul Alfille

--  Forwarded Message  --

Subject: OWFS
Date: Thursday 27 October 2005 01:36 pm
From: Marinho Paiva Duarte [EMAIL PROTECTED]
To: [EMAIL PROTECTED]

Hi!!!

I´m using OWFS 1.0p0 with fuse 2.1 on slackware 10.1.
Sometimes, when I try a cat 20.F99E0500/volt.ALL I get the
following message on my syslog:
Oct 27 18:32:37 bogus OWFS[7371]: Read error on
/20.F99E0500/volt.ALL (size=4096).

I asked a lot of people abou it, but nobody knows what is hapening...
Can you help me with this??

Best regards,
Marinho

---


---
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] 1=conducting ?

2005-10-29 Thread Paul Alfille
On Thursday 27 October 2005 09:50 pm, Marek Wodzinski wrote:
 On Wed, 26 Oct 2005, Paul Alfille wrote:
  On Wednesday 26 October 2005 04:37 pm, Marek Wodzinski wrote:
  On Wed, 26 Oct 2005, Alfille, Paul H.,M.D. wrote:
  Ahhh... I'm sorta a software guy. 1=on 0=off
  Sorry for all the confusion.
 
  I'm a hardware based software guy:-)
 
  The easiest way to bypass this is the add an alias -- another
  property that is the inverted state of the PIO pin. What should it be
  called?
 
  Maybe another idea: something like --dont-convert, --dont-negate or
  --raw-rw to configure?
 
  And do not convert input/output with this option - just raw values like
  in documentation of chips.
 
  Umm... unmanageable. We can't have incompatible behavior based on
  compilation settings, the confusion would be prodigious.
 
  A little more acceptable would be command line options -- though when you
  start negotiating between server and client settings, and owperl... it
  gets complex again. How about rPIO? It stands for raw PIO or real PIO
  or reversed PIO? The name reveals the syntax. Just looking at the man
  page brings the issue to light.

 Another idea for cleaning the mess:
 - Just leave PIO as is and document this as something like 'not
 recommended for use by hardware guys':-)
 - Make latch.* writable in chips like DS2413 and add readable in
 chips like DS2405
 - sensed.* is ok for reading real state of pin
 - add write only toggle.* in chips like DS2405 (because you can not set
 state of internal latch - just toggle).
 - in DS2408 'latch' should be renamed to something like 'activity' for
 consistency, because there are two latches: main (pio) and activity. And
 of course add a real 'latch'.

 For more complete 'todo' list I must go across the sources and chip
 documentation to see if there is something else.
 I can help you with revision source vs. chip docs and maybe some simple
 patches.

That would be great.

In general the policy should be:
1. Correct behavior (i.e. using the correct field to set the second pin, as in 
the bug you found).
2. Consistency across the devices for similar naming and behavior for similar 
properties
3. Not breaking existing code.

There is almost no penalty for new properties, but saving state information 
outside of the device is discouraged.

Paul


 regards

 majek


---
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


[Owfs-developers] Re: Help with compiling

2005-11-01 Thread Paul Alfille
On Tuesday 01 November 2005 12:53 pm, you wrote:
 Paul:

 I get this error message when I try to run configure with the source
 form SF.net

 config.status: error: cannot find input file: module/swig/perl5/Makefile.in
Yeah, that's a problem with that version.

 and when I check the directory, it is empty.  Did I do something wrong??

 When I compile form the CVS, I do not get any error messages but I can
 not fine the executable
 owfs.  Again what am I doing wrong
When you configure do you get owfs enabled?
One thought, ./bootstrqap now doesn't do configure
Second thought, is fuse installed?

Paul

 I am using an old version and love the softwareTHanks for all you
 wonderful work!

 Lary Schenk


---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


[Owfs-developers] Re: owfs help

2005-11-02 Thread Paul Alfille
I'm referring this to the developers list.

I guess you'll need a proper toolchain (for compiling, etc). You won't need 
fuse, from your requirements. The Axis documentation 
(http://developer.axis.com/software/linux/) claims that the standard glibc is 
supported.

I presume the FOX board you tall about is http://www.acmesystems.it/ It has 
16mb ram, which should be more than enough. There also seems to be extensive 
documentation.

Christian Magnusson has worked extensively on embedded platforms, and may be 
able to help further. In the meantime, can you show us your progress to date?

I have one of the Axis cameras that uses this chip, so I'm interested in your 
results, as well.

Paul

On Wednesday 02 November 2005 04:43 am, you wrote:
 Hi, I need to use your system owfs on card FOX  based on the ETRAX LX100
 MCM 4+16 made by Axis.
 Can you give me some suggestion?
 I think OWFS is compatible with the processor ETRAX LX100, but I have some
 problems to compiling it in my SDK environment, in order to generate the
 executable file.

 In particular I have need to use owhttpd and owserver.

 I hope you can help me,
 thanks
 Roberto


---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


[Owfs-developers] DS1821 Thermostat

2005-11-14 Thread Paul Alfille
I've started work on supporting the DS1821 Thermostat.

It's a difficult chip, only partly a 1-wire device. It has no unique address, 
and can't respond independently, nor can it announce itself on a device 
discovery (directory listing).

Basically, the DS1821 should be on it's own 1-wire bus according to the 
datasheet.

We handle it thus:

address is thermostat

So
cat /mnt/1wire/thermostat/temperature would read the temperature, but
ls /mnt/1wire would NOT include thermostat among the devices.

There will be properties:
temperature
temphigh
templow
polarity
1shot
thermostat_mode

The last property is a little problematic. It is NOT POSSIBLE to leave 
thermostat mode without electrical manipulation outside of the 1-wire 
protocol.

So the thermostat is a little blind. OWFS will be useful for programming the 
thermostat and setting it going. Special handling will be needed after that.

Paul


---
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628alloc_id=16845op=click
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] Re: OpenWRT 1-wire on gpio?

2005-11-27 Thread Paul Alfille
On Sunday 27 November 2005 01:56 pm, Paul Alfille wrote:
 On Sunday 27 November 2005 12:51 pm, Sven Geggus wrote:
  Hm, there is some sample I2C code:
 
  http://www.byteclub.net/wiki/index.php?title=Wrt54g
 
  Looks like they are using direct memory mapped IO.

 Nice. I'll look for a user-space solution, since the I2C is a kernel module
 which ups the level of complexity a bit (though might help performance).

 Paul

There appears to be a hack to access /dev/mem directly to maipulate GPIO 
registers. http://www.simtec.co.uk/appnotes/AN0014/

Paul


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] Re: OWFS Status

2005-11-28 Thread Paul Alfille
On Monday 28 November 2005 08:14 pm, Paul Alfille wrote:
 On Monday 28 November 2005 02:53 pm, Dave wrote:
  2) When using cascaded DS2409 lan couplers/switches, how do all the
  attached 1-wire device appear in the OWFS?  Does it use cache to
  transparently flatten it all out? Can we see the DS2409 hierarchy in
  the OWFS?

 The hierarchy is preserved. Each DS2409 has two subdirectories (in addition
 to a number of other files) called main and aux. Those directories in turn
 show the filesystem view of that branch. The switching the the correct
 branch and all is done transparently.

 Paul Alfille

I should add that the only limit to the depth of branching allowed is the 
maximum length of the path name in your operating system -- something like 
2000 characters I believe. That gives a depth of around 100. Not 100 
couplers, but branches 100 couplers deep.

I suspect the electrical constraints and transmission line properties are more 
stringent. Also the switching times and bus search times would probably make 
deep branching difficult.

One other aspect to the DS2409 couplers -- they are poorly supported by the 
LINK adapters. Let me backtrack. In pure DS9097U emulation (which is what 
OWFS currently does), the LINKs have no problems with the couplers. Howevers, 
when used in their ascii mode (which we will support as an option in the 
future to get at their other properties like LinkLocator) they don't support 
couplers. They don't support branch selection for searches. The LINK people 
(William Farmer) have a product that gives a flat hierarchy with electrical 
segmentation, which they feel is a better approach.

Paul Alfille


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] Tcl on OpenWRT

2005-11-29 Thread Paul Alfille
On Tuesday 29 November 2005 08:25 am, Bill Harris wrote:
 Saw your page on  OWFS.  Was wondering if you by chance of having a
 ported package of Tcl that would work on OpenWRT RC4?

 I've got a couple of WRT54's and would love to have a good tcl
 implenations or subset of
 to work with.

 Thanks.
 Bill

Bill, I posted your note on the OWFS developer's list for wider distribution.
Serg Oskin wrote the owtcl program, but I'm not sure he uses the embedded 
platform.
Christian Magnusson has created the embedded distributions, but I'm not sure 
he included owtcl in that.

It sounds like you are specifically interested in TCL for the WRT. That means 
the tcl library and binary (I can't see the utility of Tk without a display 
device, unless you are making your router an X client. Probably easier to 
render web pages with it).

I see that tcl is hosted at http://sourceforge.net/projects/tcl
I can't find specific references to uClibc support, but they mention ports to 
embedded and hend-held devices.

Paul


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] One wire wireless

2005-11-29 Thread Paul Alfille
On Tuesday 29 November 2005 06:19 pm, Andrew Thoms wrote:
 Next I connected both the 2450s to owfs on my redhat 9 box, they have
 been working there for the past 5 days with no worries at all. This
 points to a problem with the DS2450 implementation with the version of
 owfs on the router. Then I rebooted the router which appeared to fix
 things, but after the 15min, the 2450s just dissapeared again.


How recent is the RH9 OWFS code? This will help determine if it is a 
embedded-specific issue, or a version issue.

Paul


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] One wire wireless

2005-11-29 Thread Paul Alfille
On Tuesday 29 November 2005 11:17 pm, Andrew Thoms wrote:
  Subject: Re: [Owfs-developers] One wire wireless
 
  On Tuesday 29 November 2005 06:19 pm, Andrew Thoms wrote:
   Next I connected both the 2450s to owfs on my redhat 9 box,
 
  they have
 
   been working there for the past 5 days with no worries at all. This
   points to a problem with the DS2450 implementation with the
 
  version of
 
   owfs on the router. Then I rebooted the router which
 
  appeared to fix
 
   things, but after the 15min, the 2450s just dissapeared again.
 
  How recent is the RH9 OWFS code? This will help determine if
  it is a embedded-specific issue, or a version issue.
 
  Paul

 [EMAIL PROTECTED] bin]# ./owfs --version
 ./owfs version:
 2.1p0RC
 libow version:
 2.1p0RC

 Andrew

That would help if we were better about changing version numbers.
Did you use the release or pull from the CVS?

Paul


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: SV: [Owfs-developers] OSX and DS9097

2005-12-18 Thread Paul Alfille
On Sunday 18 December 2005 11:27 am, Ross Cathriner wrote:
 In the interest of higher bus speed, lets recap the events leading to
 the patch.

   I originally got an ow_ds9097.c:312: error: 'B115200' undeclared
 during the make process.

 The man-page for cfsetispeed says the highest supported baudrate in
 termios.h is 38400.

 The file at /usr/include/termios.h  does not define the variable,
 instead points to #include sys/termios.h

 The file at /usr/include/sys/termios.h  defines the variables as
 follows:
 /*
   * Standard speeds
   */
...
 #define B3840038400
 #ifndef _POSIX_C_SOURCE
 #define B7200 7200
 #define B1440014400
 #define B2880028800
 #define B5760057600
 #define B7680076800
 #define B115200   115200
 #define B230400   230400
 #define EXTA  19200
 #define EXTB  38400
 #endif  /* !_POSIX_C_SOURCE */

Thanks Ross,

So if we #undef _POSIX_C_Source can we use B115200?

I understand why the patch was made -- to let the code actually compile. I was 
just pointing out that in this case, the 115200 is a magic number, not just 
an optimistic communication setting.

Paul Alfille


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] Owserver protocol documentation

2005-12-19 Thread Paul Alfille
On Monday 19 December 2005 12:02 am, Info wrote:
 Is there any documentation of the protocol for the
 communication to/from Owserver?
 I was thinking it might be a good place to interface
 to/from a java virtual machine.

 Paul Hilton

Interesting question.

I take it you want to make your JVM talk to owserver?

The standard way is to link owlib into your program (you can use SWIG and the 
rather simple interface design of owcapi, owperl, owphp), or owpython (more 
object oriented) or owtcl (doesn't use SWIG). This allows you to hook into 
any arrangement of owservers and direct adapters.

There is SWIG support of java.

I'll put some notes on the owserver protocol in the wiki, but the design was 
predicated on having owlib machinery on both sides of the connection. Indeed, 
owserver is only about 200 lines of code (excluding comments).

Paul Alfille


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] Not all devices on my bus are detected

2005-12-19 Thread Paul Alfille
On Saturday 17 December 2005 06:09 pm, [EMAIL PROTECTED] wrote:
 Hi!

 I am using a home-made passive adapter DS9097 together with OWFS to access
 a number of DS18S20 devices. When I add more than two devices to the bus,
 something strange happens: The list of devices, ls /mnt/1wire/, does not
 show all devices on my bus, but I can access all of them by address, eg. ls
 /mnt/1wire/10.A71BCA000800. I have tried several versions of owfs and once
 with owhttpd, all with the same result.

 I have looked at the 1-wire bus with an oscilloscope and the signal looks
 good. At this point my only thought is that the search rom algorithm is
 faulty and somehow missing some of the branch points, but I can't really
 believe this to be true...

 Is this a known problem? Could there be a problem with one of my DS18S20
 such that the search rom algorithm fails? They work one by one. Any ideas
 at all?

 Stefan

 (I am running Debian 3.1 stable, fuse 2.4.1 on an old P3 300MHz machine.)

Found the problem. Logic error in my code. Fix is uploaded to CVS.

Paul Alfille


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] Owfs Live CD

2005-12-19 Thread Paul Alfille
On Monday 19 December 2005 10:21 am, Quinten Uijldert wrote:
 Hi all,

 Are there any plans to upgrade the Owfs Live CD to the current DSL version?
Yes. With improvements!
 Alternatively, is there anyone running the owfs.uci on a DSL 2.0/2.1RC2
 install?
I'm not sure the fuse module will work since the kernel version has changed.

 Kind regards,

 Quinten
 --
 Smile, tomorrow will be worse


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] Owfs Live CD

2005-12-19 Thread Paul Alfille
On Monday 19 December 2005 10:31 am, Quinten Uijldert wrote:

 That would explain why it locks up completely when I start owfs.  Although
 the insmod works (it does complain about tainting the kernel), as soon as I
 try to mount it, it hangs the PC.

 Q.

Not good!

Let me send you a just-compiled version of libfuse to test.

Paul Alfille


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] 1-wire LCD

2005-12-19 Thread Paul Alfille
On Monday 19 December 2005 06:15 pm, Krzysztof wrote:
 Hello!

 What is inside the Louis 1-wire LCD, PIC or DS2408 ?
 http://www.maxim-ic.com/quick_view2.cfm/qv_pk/3818
PIC I believe. (PIC16F628 on my board)

 http://owfs.sourceforge.net/LCD.3.html

 I have found a pdf (ds2408 datasheet page 28 :P) that claims that DS2408
 can be used as a LCD controller. OWFS supports LCD but it is a PIC based
 project if I am not wrong :-/
Right. OWFS support's Louis' board. It is (was?) the only commercial product, 
fully documented, simple nicely designed API, commercially available (did I 
say that already?) LCD.


 Is it impossbile to controll LCD build like in the ds2408 datasheet? Will
No it's not impossible, but the problem is
1. I have no board to test.
2. I don't know if the design works, or if anyone actually uses it.
3. It will have to be written at a rather low level, since 
 you add DS2408 LCD support in the future? I have few, spare DS2408 and
 paying extra money + shipping from NZ to Poland is not a good deal :/
Well, if you want to make the board because you want to make the board, go 
ahead. Louis' board (exclusive of LCD) is  16 euros, with free shipping to 
Poland. And it works. And it is already supported.
What is your time and materials worth?

Paul Alfille


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] 1-wire LCD

2005-12-19 Thread Paul Alfille
On Monday 19 December 2005 10:23 pm, Paul Alfille wrote:
 Well, if you want to make the board because you want to make the board, go
 ahead. Louis' board (exclusive of LCD) is  16 euros, with free shipping to
 Poland. And it works. And it is already supported.

Oops. On closer reading shipping looks like 12 euros.


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] Owfs Live CD

2005-12-20 Thread Paul Alfille
Ok, a test new owfs.uci is on the way to you.

If it works, I'll submit it and create the rest of the files, including for 
full iso.

Paul Alfille

On Monday 19 December 2005 10:21 am, Quinten Uijldert wrote:
 Hi all,

 Are there any plans to upgrade the Owfs Live CD to the current DSL version?
 Alternatively, is there anyone running the owfs.uci on a DSL 2.0/2.1RC2
 install?

 Kind regards,

 Quinten
 --
 Smile, tomorrow will be worse



 ---
 This SF.net email is sponsored by: Splunk Inc. Do you grep through log
 files for problems?  Stop!  Download the new AJAX search engine that makes
 searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
 http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
 ___
 Owfs-developers mailing list
 Owfs-developers@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/owfs-developers


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] DS18B20 returns Invalid Argument when Reading Temperature SOLVED

2005-12-29 Thread Paul Alfille
Thanks Daryl!

There was a subtle bug in the DS9097U code for enabling the power for 
temperature conversion. I think it's been there for a month or so.

The fix in the CVS.

So now, the DS9097U, DS9490, DS9097 and LINK all work. The parallel port 
DS1410E is in progress.

Paul Alfille


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] configure and swig

2005-12-29 Thread Paul Alfille
On Wednesday 28 December 2005 11:07 pm, Tim Sailer wrote:
 On Wed, December 28, 2005 0:05, Paul Alfille said:

 Installed swig (fuse was installed already)

  The best way to build is to grab a version from the CVS:
 
  cvs -d:pserver:[EMAIL PROTECTED]:/cvsroot/owfs co owfs
  (blank password if it asks)
 
  Then:
  ./bootstrap
  ./configure --disable-swig
  make

 It bombs after a while with :

 owfs_callback.c:140: warning: passing arg 4 of pointer to function with
 different width due to prototype
These warnings are quite a nuisance. 1-wire is bit and byte oriented, but gcc 
seems to want larger words. I'm loathe to change parameters sizes away from 
their natural size because some platforms in the embedded world should prefer 
the smaller data sizes.

 /bin/sh ../../../../libtool --tag=CC --mode=link gcc -I../include
 -I../../../owlib/src/include -I/usr/local/include/fuse
 -I/usr/local/include -L../../../owlib/src/c -fexceptions -Wall -W -Wundef
 -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wconversion
 -Wstrict-prototypes -Wredundant-decls -DOW_MT  -D_FILE_OFFSET_BITS=64
 -DFUSE_USE_VERSION=22 -g -O2 -pthread -low -lfuse  -lpthread -Wl,--rpath
 -Wl,/usr/lib -Wl,--rpath -Wl,/usr/local/lib  -o owfs  owfs.o
 owfs_callback.o  -lusb
 mkdir .libs
 gcc -I../include -I../../../owlib/src/include -I/usr/local/include/fuse
 -I/usr/local/include -fexceptions -Wall -W -Wundef -Wshadow
 -Wpointer-arith -Wcast-qual -Wcast-align -Wconversion -Wstrict-prototypes
 -Wredundant-decls -DOW_MT -D_FILE_OFFSET_BITS=64 -DFUSE_USE_VERSION=22 -g
 -O2 -Wl,--rpath -Wl,/usr/lib -Wl,--rpath -Wl,/usr/local/lib -o .libs/owfs
 owfs.o owfs_callback.o  -L/home/tps/src/owfs/module/owlib/src/c -pthread
 /home/tps/src/owfs/module/owlib/src/c/.libs/libow.so /usr/lib/libfuse.so
 /usr/lib/libusb.so -lpthread
 /home/tps/src/owfs/module/owlib/src/c/.libs/libow.so: undefined reference
 to `BUS_read'
BUS_read was removed. Could there be a stale library?

 collect2: ld returned 1 exit status
 make[4]: *** [owfs] Error 1
 make[4]: Leaving directory `/home/tps/src/owfs/module/owfs/src/c'

  sudo make install
 
  There are also instructions for installing on routers, or distributed
  over a
  network, or even on the Mac.

 I'll take a look a this. I want to be able to run it on the NSLU2, if
 possible.
I'm sure it's possible. Christian Magnusson has added rather detailed 
instructions on creating embedded OWFS devices. The USB works on the OpenWRT 
routers that have USB (like the ASUS WL-500G) and has FUSE and rrd binaries 
as well. The routers use a different CPU (MIPS vs ARM) so will now be binary 
compatible, but the general problems of configuration for flash memory and 
constrained resources have been worked out.

 Tim




 ---
 This SF.net email is sponsored by: Splunk Inc. Do you grep through log
 files for problems?  Stop!  Download the new AJAX search engine that makes
 searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
 http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
 ___
 Owfs-developers mailing list
 Owfs-developers@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/owfs-developers


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] AAG Barometer

2006-01-07 Thread Paul Alfille
On Friday 06 January 2006 01:47 pm, Tim Sailer wrote:
 I know the barometer from aag.com.mx isn't a discrete 1wire device, but
 has anyone looked at what it would take to get it working with owfs?

 Tim
Yup. I looked. Even bought one. A rather clever arangement, two 2406's that 
synthesize a 2-wire interface to a sensor.

The code is available on the AAG site, though I'm not sure of the licensing.

The real issue is that the device sits rather awkwardly on the file-system 
design. It appears as two 2406's with assymetric properties. You need 
external information to determine which chips belong to which larger device. 
You also have to decide if the underlying 2406's should be hidden.

Devices that are only a single chip are easy. The DS2438 humidity sensor is a 
good example, as is Louis Swart's LCD and the DS246x thermocouples. Multiple 
chip devices are less obvious.

Any thoughts? This is clearly a problem that needs fixing. The iButton people 
have a number of these SuperSlaves.

Paul Alfille


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] 1wire adaptor for Linksys WRT54GS running openwrt

2006-01-14 Thread Paul Alfille
I don't recall if I gave you David Lissiuk's name. He manufacturers the 
adapter boards.

Paul

On Monday 09 January 2006 05:33 pm, Andrew Frazer wrote:
 Hello,



 I'm wondering if anyone has any circuit details for an adaptor to run in a
 WRT54GS. The WRT54GS uses 3.3V logic so it seems that it is differcult to
 drive a DS2480B serial adaptor directly.  I have tried to build a circuit
 based on the diagram shown at http://owfs.sourceforge.net/WRT54G.html but
 had no luck with getting to it run.   Unforutnalty some of the links
 referring to an adaptor don't seem to go anywhere anylonger..



 If someone has a LP-LINKSYS-1W adaptor board, I'd be very interested to buy
 one.



 Regards


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


[Owfs-developers] DS2404 (DS2404S DS1994 DS1427)

2006-01-14 Thread Paul Alfille
I've added rather extensive support for the DS2404 and it's siblings. This is 
the timer chip with 1-wire and 3-wire ports.

I don't have the actual chip, so would appreciate any testing.

The full implementation is in the man page.

Paul Alfille


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] DS2436 issues

2006-01-15 Thread Paul Alfille
Gregg,

I looked into the DS2436 in more detail, and conclude that the datasheet is 
ambiguous enough that I need a sample to test. I ordered a sample and will 
check perforance when it arrives.

The DS2436 doesn't seem to be supported by digitemp or the public domain kit, 
so there isn't any example code to test.

Paul


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] USB adapter DS9490 source?

2006-01-18 Thread Paul Alfille
On Wednesday 18 January 2006 06:22 pm, Jim Canfield wrote:
 On Wed, 2006-01-18 at 17:15 -0600, [EMAIL PROTECTED] wrote:
  Anyone know a good (cheap) source to buy a 1w/USB adapter DS9490R?

 Try hobby-boards:

 http://www.hobby-boards.com


Based on same chip. Tested with OWFS
http://puceshop.pucebaboon.com:16161/PuceShop/Tabled_Intfs.html

Out of stock:
http://www.aagelectronica.com

From google:
http://embeddeddatasystems.com/page/EDS/PROD/HA/DS9490R
and it seems they have it in stock


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid3432bid#0486dat1642
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


[Owfs-developers] DS2436 Fixed

2006-01-23 Thread Paul Alfille
Just got a sample DS2436.

Seems like a nice chip -- voltage and temperature.

Had to fix the support -- now can read temperatuer and voltage.

Note: It seems that you need Vdd voltage to make a temperature conversion as 
well.

Paul Alfille


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] DS2436 Fixed

2006-01-24 Thread Paul Alfille
On Tuesday 24 January 2006 07:31 am, Matt wrote:
 Paul,

 I have a couple of these, but poor electronic skills, do you have a circiut
 I could look at ?
 Specifically, I wanted to attach a solar cell to measure sunlight.

 Thanks

Well, I'm no expert, but the DS2436 measures voltage in the 2.5V - 10V range.

According to wikipedia, a single solar cell produces .4-.6V, but I think they 
are often put in series to generate higher voltages.

The DS2436 will draw 5uA at standby, and 100uA when reading a voltage, which 
should effect your measurement too much.

So my suggestion:

The DS2436 has 3 pins:
GND (to data line gnd and solar cell gnd)
DQ (to data line)
VDD (to solar cell Vout)

If your solar cell produces lower voltages, look at the DS2438 or the DS2450. 
The DS2450 might be useful if you want to sample several voltages.

Paul


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] DS2436 Fixed

2006-01-24 Thread Paul Alfille
On Tuesday 24 January 2006 07:31 am, Matt wrote:
 Paul,

 I have a couple of these, but poor electronic skills, do you have a circiut
 I could look at ?
 Specifically, I wanted to attach a solar cell to measure sunlight.

 Thanks

Another thought:

You can use a photodetector:
See http://www.oz.net/~coilgun/levitation/photodetector.htm

He uses a 15V supply, but that seems arbitrary. I'd use 10V.

You can also eliminate the voltage follower op-amp, accepting that the current 
draw on the Vdd line will make the response non-linear. Still, once 
calibrated, it should be consistent.

Paul


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] FC4 OWFS compile problem

2006-01-24 Thread Paul Alfille
On Tuesday 24 January 2006 09:10 pm, Stephen Lawrence wrote:
 I have been using the OWFS for over a year now, but a recent upgrade to
 FC4 to FC3 has given me some grief.

 I did the whole FUSE install as per the installation instructions.  It
 does mention the FUSE kernel module is already present in FC4, but I did
 it anyway.  Scanned the  developer archieves, and updated ld.so.conf to
 include a path to /usr/local/lib as was suggested by someone.

 I did the OWFS install and get this during make:

 ===
 /usr/local/owfs/module/owfs/src/c/owfs.c:135: undefined reference to
 `fuse_mount_compat22'
 owfs.o(.text+0x1b7):/usr/local/owfs/module/owfs/src/c/owfs.c:166:
 undefined reference to `fuse_new_compat22'
 collect2: ld returned 1 exit status
 make[4]: *** [owfs] Error 1
 make[4]: Leaving directory `/usr/local/owfs/module/owfs/src/c'
 make[3]: *** [all-recursive] Error 1
 make[3]: Leaving directory `/usr/local/owfs/module/owfs/src'
 make[2]: *** [all-recursive] Error 1
 make[2]: Leaving directory `/usr/local/owfs/module/owfs'
 make[1]: *** [all-recursive] Error 1
 make[1]: Leaving directory `/usr/local/owfs/module'
 make: *** [all-recursive] Error 1
 

 I am no expert here, but have successfully, many times, recompilied both
 FUSE and OWFS using the provided instructions when using FC3, with no
 problems.

 Any suggestions?  Need more info?

 Thanks

 Steve

I did a bit of grepping.
fuse_new_compat22 and fuse_mount_compat22 are fuse functions, I think matching 
changes in the fuse API. They don't appear, per se, in owfs.

So from that, is sounds like a fuse installation problem. I wonder if old fuse 
libraries or include files are causing some confusion.

Like you, I found that I had to install fuse even though modern kernels 
include it, mainly because the included header files are needed for compiling 
owfs.

Paul Alfille


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


[Owfs-developers] Need help with DS1410E (parallel port adapter)

2006-01-24 Thread Paul Alfille
I'm struggling.

I know the parallel port adapter isn't cutting edge, but it might be useful 
for older computers.

I've put the resources I've used so far in the wiki. 
http://owfs.sourceforge.net/wiki/index.php/ParallelAdapterStatus

Basically I've tried using the ppdev interface, which uses ioctl calls to the 
parallel port to set data, and control pins and read status and control pins. 
http://people.redhat.com/twaugh/parport/html/x623.html

Testing with a simple program and an oscilloscope, I can certainly see the 
voltages on the pins.

I've tried mimicing the assembly language routines. The source file is 
modules/owlib/src/c/ow_ds1410.c

Paul Alfille


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] Need help with DS1410E (parallel port adapter)

2006-01-25 Thread Paul Alfille
On Wednesday 25 January 2006 06:20 pm, blackcat wrote:
 Is this a wise use of your time ?
 Old computers will have serial ports and
 these have much more support.
 AGSC

You're right, of course.
It just rankles to have one of these adapters and not be able to support it.

Paul

 On 2006-Jan 24, at 9:10 PM, Paul Alfille wrote:

 I'm struggling.

 I know the parallel port adapter isn't cutting edge, but it might be
 useful
 for older computers.

 I've put the resources I've used so far in the wiki.
 http://owfs.sourceforge.net/wiki/index.php/ParallelAdapterStatus

 Basically I've tried using the ppdev interface, which uses ioctl
 calls to the
 parallel port to set data, and control pins and read status and
 control pins.
 http://people.redhat.com/twaugh/parport/html/x623.html

 Testing with a simple program and an oscilloscope, I can certainly
 see the
 voltages on the pins.

 I've tried mimicing the assembly language routines. The source file is
 modules/owlib/src/c/ow_ds1410.c

 Paul Alfille


 ---
 This SF.net email is sponsored by: Splunk Inc. Do you grep through
 log files
 for problems?  Stop!  Download the new AJAX search engine that makes
 searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642
 ___
 Owfs-developers mailing list
 Owfs-developers@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/owfs-developers



 ---
 This SF.net email is sponsored by: Splunk Inc. Do you grep through log
 files for problems?  Stop!  Download the new AJAX search engine that makes
 searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642
 ___
 Owfs-developers mailing list
 Owfs-developers@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/owfs-developers


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] Need help with DS1410E (parallel port adapter)

2006-01-29 Thread Paul Alfille
On Thursday 26 January 2006 11:27 am, Paul Hilton wrote:
 I am currently trying to understand the internal workings of
 owfs (et.al.), not ready to start writing adapter code for it
 (e.g. looking at ow_link.c still makes me glaze over).

Hi Paul,

The best example for adapter code is ow_ds9097.c

Basically all the adapter does is write/read bits (either 1 at a time, or 
several for efficiency), and reset.

The only externally visible  (for any adapter) is XXX_detect (DS9097_detect in 
this case). This function opens the device, tests existence (if possible), 
sets the call-back functions, and updates the name in the appropriate 
structure.

There are entries for higher-level functions (based on the primatives from the 
DS2480B) like byte write/read, better searching, power to bus, etc, but these 
will be handled by the bit commands if not otherwise implemented.

Implementing a bit-banging adapter thus involves 
1. copying and modifying OW_ds9097.c 
2. putting the detect function in ow_connection.h
3. recognizing a command line parameter in ow_opt.c
4. putting the actual call to the detect in  ow_lib.c

The LINK code supports ascii mode of the LINK, so you see byte and search 
support, reset, and power mode.

The DS9097U supports the DS2480B. It has a lot of cruft from the public domain 
kit, especially for low-level serial port commands. Since it works well, and 
probably encapsulates many tricks, I left those details untouched.

The DS9490 USB adapter is messy because A. libusb calls are messy, and B. 
handling reconnection with USB dynamic port allocation is messy. Eventually 
we will clean it a bit, but it works remarkably well. (A testament to 
Christian Magnusson).

You can see why I'm intrigued by the DS1410E. The goal is tantalizingly close. 
There are implementations of working code available. The primatives supported 
are the bit write/read and reset. I think you are right, it's a timing issue. 
I'm going to look more closely at PARAPIN.

Paul Alfille



---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


[Owfs-developers] Added support for the Link-Hub-E

2006-02-01 Thread Paul Alfille
With the help of William Farmer at iButtonLink.com, we now have support for 
the Link-Hub-E.

This is a Link adapter connected via ethernet.

The syntax is the same as owserver:

owfs -s 10.23.45.67:10001 /1wire

Where the ethernet address of the Link-Hub-E and port are given.

OWFS will be able to distinguish between owserver and Link-Hub-E.

Note that owserver can accept multiple connections, Link-Hub-E cannot (but you 
can use owserver to multiplex it, just like any adapter.

Some caveats:

1. Only limitted tested was done, to a Link-Hub-E at Bill's company. Reads, 
writes and directory listings all worked. I don't have one myself for 
testing.

2. I needed to introduce the concept of a network timeout (to distinguish 
between owserver and Link-Hub-E), and the timing is empiric. Long network 
latency will make the Link-Hub-E undetectable, and the default owserver will 
be assumed.

3. If the Link-Hub-E is unavailable at configuration time, owserver will be 
assumed. We may need to adjust this wit ha command line parameter. -- perhaps

owfs -s 3001 /1wire
   will be either owserver (default) or Link-Hub-E if detectable
owfs --LINKE 3001 /1wire
   will be Link-Hub-E only
owfs --owserver 3001 /1wire
   will be owserver only

But I'm open to suggestions.

Paul Alfille



---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] Timeout

2006-02-13 Thread Paul Alfille
Thanks, Christian.

We could go back to the old way, but I was trying to coordinate work with the 
Link-Hub-E which can completely bomb out. 

I think the large directory listing should be ok, since the directory is sent 
back one element at a time, which minimizes latency.

I've always wanted to implement owfake, allowing fake devices for testing.

Paul Alfille


On Monday 13 February 2006 04:08 am, Christian Magnusson wrote:
 I found out that the recently added read-timeout doesn't work good at all.

 A timeout of 1 second in ow_server.c is too low. Don't know exactly why,
 but I end up with EIO errors when reading temperatures very often.



 Host1:owserver -d /dev/tty/1 (Slow Linksys router with 1-wire
 adapter connected.)

   owfs (connecting to host1)

   temploggerd (frequently writing 1 to
 /simultaneous/temperature and reading temperatures and full scandir() in
 /uncached)



 Host2:

   owfs (connecting to host1)

   temploggerd (frequently writing 1 to
 /simultaneous/temperature and reading temperatures and full scandir() in
 /uncached)





 Host3:owfs

   cat /mnt/1wire/uncached/10.*/temperatures   (fails
 _very_ often with EIO errors)





 A command like ls -l /1wire/uncached/ takes some time to execute, and
 that blocks the owserver for some time.

 If somebody else try to do a full scandir or using the 1-wire devices, the
 1-second timeout is exceeded very easy.



 When I raised it to 10 seconds, it was 100% stable again. But is this
 enough for all situations? What happens if you have 1000 1-wire devices and
 2 hosts try to do a full scandir() ?





 I think it's important to protect the connect() in ow_net.c:ClientConnect()
 too. connect() could hang for minutes if you don't get any packets back
 from the server.





 Any ideas?



 /Christian


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: SV: [Owfs-developers] Timeout

2006-02-13 Thread Paul Alfille
On Monday 13 February 2006 12:28 pm, Christian Magnusson wrote:
 The problem is in ow_server.c:ServerDir() (for example) where ToServer()
 usually returns VERY quick and the request is put in a queue to be executed
 on the remote-server.

 If there are 10 different read requests to
 /1wire/uncached/10.x/temperature from 10 different remote-clients,
 then it could take 10 seconds before FromServerAlloc() return the first row
 in a directory listing.

 I can't see any possibility to keep the timeout here... The only
 possibility would be to add a timeout around connect() and eventually abort
 the sequence before sending the command too the remote-server. The read and
 write commands should timeout by itself and return -1 upon failure.

 Do you agree?

 /Christian

Let me test. In theory, the dir listings are returned one entry at a time, so 
shouldn't have the full latency.

I wonder if 2 seconds would be sufficient?

Paul Alfille


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] connecting many DS2408

2006-02-13 Thread Paul Alfille
On Monday 13 February 2006 01:46 pm, Marc Lavallée wrote:
 I'm new to the 1-wire technology.

 I'd like to interface over 30 DS2408 on a 1-wire bus, using ordinary
 ethernet cables, arranged in a topology of 2 or 3 branches with 10 or 15
 daisy-chained devices. The total length of the cables could be over 100
 meters. I need to monitor momentary push-buttons connected to the I/O pins
 of the 2408 and I need to know about the chronology of their status
 (pressed or released). It would work on Linux, and eventually on OSX. What
 are my options?

 Thanks for your help
 --
 Marc

I presume you are asking if OWFS can support this configuration.

1. The DS2408 is fully supported, both reading the PIO status and switching 
devices. In fact all 8 switches can be read atomically.

2. Your application is most fragile at the momentary push-button presses. 
Missed pushes will frustrate your users. That implies polling for push 
buttons, presumably fast enough not to miss any presses.

3. You probably want to partition your problem, both separate busses for 
network configuration and to speed polling. OWFS supports this vary well. You 
can even reduce the span of your network by placing embedded devices (the 
ASUS WL-WL500G Deluxe or some of the WRT54G work brilliantly, either wired or 
wirelessly.

4. You can either use the filesystem interface, or one of the language 
bindings.

5. There are clearly people willing to help.

Paul Alfille


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid3432bid#0486dat1642
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] connecting many DS2408

2006-02-13 Thread Paul Alfille
On Monday 13 February 2006 01:46 pm, Marc Lavallée wrote:
 I'm new to the 1-wire technology.

 I'd like to interface over 30 DS2408 on a 1-wire bus, using ordinary
 ethernet cables, arranged in a topology of 2 or 3 branches with 10 or 15
 daisy-chained devices. The total length of the cables could be over 100
 meters. I need to monitor momentary push-buttons connected to the I/O pins
 of the 2408 and I need to know about the chronology of their status
 (pressed or released). It would work on Linux, and eventually on OSX. What
 are my options?

 Thanks for your help
 --
 Marc

One other thought: the DS2423 (used in the wind speed meter) has two contact 
counters, which would make the polling problem easier.

Also, Louis Swart's LCD controller has 4 PIO counter pins that count button 
presses.

Neither of these would record order of presses withough rapid polling.


Paul Alfille 


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid3432bid#0486dat1642
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


[Owfs-developers] Fwd: Your latest OWFS - Software

2006-02-13 Thread Paul Alfille


--  Forwarded Message  --

Subject: Your latest OWFS - Software
Date: Saturday 04 February 2006 03:56 pm
From: Michael Holzbrecher
To: [EMAIL PROTECTED]

Hi,

I try since some days to get OWFS run.
I tried to compile the source code owfs-2.1p0RC.tar.gz, but it failed
with error message from make.
Did'nt know how to fix it.
Then I downloaded owfs-2.1.0-1.i386.rpm. owfshttpd is runnig fine.
When I start OWFS and try to access my mounted /mnt/1-wire from owfs, it
terminates.

Today I downloaded owfs-2.2p0RC.tar.gz and compiled and installed it by
make install.
When I start owfs or owhttpd I see on my scope connected to the data pin
of DS18S20 a periodic signal.
But I cannot connect to the tcp port and I also cannot connect to
/mnt/1-wire. OWFS does not terminate like on the older version.
When I typ ls-l /mnt/1-wire nothing happens it just waits.

The rpm version behaves same like my self compiled version.

On the owfs-2.1.0-1.i386.rpm I could see in tail -f /var/log/messages:
OWFS[9279]: Opened USB DS9490 adapter at 003/002

after start owfs or owfshttpd and the shell came back a couple of
secounds after ./owfs /mnt/1-wire -u.
The latest version does not come back. I must type ctrl-c to terminate.

I'm running Suse 9.3 Kernel 2.6.11.4-21.10-default.

Do you have any idea what to do to get owfs run ??

Best Regards,
Michael

Michael Holzbrecher

---


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: SV: [Owfs-developers] Timeout

2006-02-13 Thread Paul Alfille
Yup, 2 seconds works.

Paul

On Monday 13 February 2006 12:28 pm, Christian Magnusson wrote:
 The problem is in ow_server.c:ServerDir() (for example) where ToServer()
 usually returns VERY quick and the request is put in a queue to be executed
 on the remote-server.

 If there are 10 different read requests to
 /1wire/uncached/10.x/temperature from 10 different remote-clients,
 then it could take 10 seconds before FromServerAlloc() return the first row
 in a directory listing.

 I can't see any possibility to keep the timeout here... The only
 possibility would be to add a timeout around connect() and eventually abort
 the sequence before sending the command too the remote-server. The read and
 write commands should timeout by itself and return -1 upon failure.

 Do you agree?

 /Christian


 -Ursprungligt meddelande-
 Från: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] För Paul Alfille
 Skickat: den 13 februari 2006 17:23
 Till: owfs-developers@lists.sourceforge.net
 Ämne: Re: [Owfs-developers] Timeout

 Thanks, Christian.

 We could go back to the old way, but I was trying to coordinate work with
 the
 Link-Hub-E which can completely bomb out.

 I think the large directory listing should be ok, since the directory is
 sent
 back one element at a time, which minimizes latency.

 I've always wanted to implement owfake, allowing fake devices for testing.

 Paul Alfille

 On Monday 13 February 2006 04:08 am, Christian Magnusson wrote:
  I found out that the recently added read-timeout doesn't work good at
  all.
 
  A timeout of 1 second in ow_server.c is too low. Don't know exactly why,
  but I end up with EIO errors when reading temperatures very often.
 
 
 
  Host1:owserver -d /dev/tty/1 (Slow Linksys router with 1-wire
  adapter connected.)
 
owfs (connecting to host1)
 
temploggerd (frequently writing 1 to
  /simultaneous/temperature and reading temperatures and full scandir() in
  /uncached)
 
 
 
  Host2:
 
owfs (connecting to host1)
 
temploggerd (frequently writing 1 to
  /simultaneous/temperature and reading temperatures and full scandir() in
  /uncached)
 
 
 
 
 
  Host3:owfs
 
cat /mnt/1wire/uncached/10.*/temperatures   (fails
  _very_ often with EIO errors)
 
 
 
 
 
  A command like ls -l /1wire/uncached/ takes some time to execute, and
  that blocks the owserver for some time.
 
  If somebody else try to do a full scandir or using the 1-wire devices,
  the 1-second timeout is exceeded very easy.
 
 
 
  When I raised it to 10 seconds, it was 100% stable again. But is this
  enough for all situations? What happens if you have 1000 1-wire devices

 and

  2 hosts try to do a full scandir() ?
 
 
 
 
 
  I think it's important to protect the connect() in

 ow_net.c:ClientConnect()

  too. connect() could hang for minutes if you don't get any packets back
  from the server.
 
 
 
 
 
  Any ideas?
 
 
 
  /Christian

 ---
 This SF.net email is sponsored by: Splunk Inc. Do you grep through log
 files for problems?  Stop!  Download the new AJAX search engine that makes
 searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642
 ___
 Owfs-developers mailing list
 Owfs-developers@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/owfs-developers



 ---
 This SF.net email is sponsored by: Splunk Inc. Do you grep through log
 files for problems?  Stop!  Download the new AJAX search engine that makes
 searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
 http://sel.as-us.falkag.net/sel?cmd=lnkkid3432bid#0486dat1642
 ___
 Owfs-developers mailing list
 Owfs-developers@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/owfs-developers


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid3432bid#0486dat1642
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] connecting many DS2408

2006-02-14 Thread Paul Alfille
On Tuesday 14 February 2006 02:12 pm, Marc Lavallée wrote:
 Le 13 Février 2006 15:03, Jan Kandziora a écrit :
  Am Montag, 13. Februar 2006 19:46 schrieb Marc Lavallée:
   I'm new to the 1-wire technology.
  
   I'd like to interface over 30 DS2408 on a 1-wire bus, using ordinary
   ethernet cables, arranged in a topology of 2 or 3 branches with 10 or
   15 daisy-chained devices.
 
  Branches are a big problem for the onewire hardware. According to
  Dallas'/Maxim's own investigations, it's best to avoid star-bus
  topologies at all cost. You have three options:
 
  1. Change the star-bus into a looped-bus topology: Use four wires per
  cable, two for the forward-direction to the branch end, two for the
  reverse direction back to the root and connect it there with the forward
  direction of the next brach.

 Maybe I would understand better with a schematic.

  2. Use the DS2409 chip and switch branches.
This would be a rather slow solution for polling. The Link-Hub has electrical 
partitioning but a unified bus topology that would be a little faster.

 Something like:
 http://www.hobby-boards.com/catalog/product_info.php?products_id=1511
 ?

  3. Use several host adapters.

 Is OWFS able to manage several adapters?
Absolutely! You can have OWFS connect to the several adapters, and it will 
give a unified view, as well as (optionally) a separated view.
I.e. you can call
owfs /dev/ttyS0 /dev/ttyS1 /dev/ttyS2 /1wire
Then
'ls 1wire/29.*' to get all the DS2408 adapters (0x29 is the family code)
or
'ls 1wire/bus.0/29.*' to get the DS2408s on the first adapter.

You can also run several instances of OWFS:
owfs /dev/ttyS0 /1wire/Line0
owfs /dev/ttyS1 /1wire/Line1
owfs /dev/ttyS2 /1wire/Line2

and 'ls /1wire.Line?/29.*' to get a unified view or address each directory 
(and thus owfs instance and adapter) independently.

Note, in all these cases, the adapter can be serial, USB, or remote (via 
owserver).

This last method might be a little faster, but only works for the filesystem 
interface. We don't currently allow more than one OWFS instance for the 
language bindings.


  It's really hard to monitor keypresses that way with a non-realtime OS.
  Networked peripherals makes things even worse.
 
  You have to do it by hardware. The simplest idea is to use the edge
  detector circuits built into the DS2408. That will give you a button was
  pressed since last check signal for each button.

 That might be enough. If it's not, then I can add a hardware latch in the
 circuit (a flip-flop?), because what I need to know is which key was
 pressed first.

 Paul Alfille wrote:
  I was incorrect in my earlier note about the polling frequency. The
  DS2408 has a latch, accessible through OWFS, that will save the button
  press. This will greatly diminish the chance of missing a button press
  and reduce the polling frequency.

I looked at the documentation, and it's even better than I remembered. There 
is  an alarm state triggered by a change in any of the pins.

# loop through all switches
for x in /1wire/29.* ; do
  # trigger if any latch (better check this)
  echo 1  $x/set_alarm 

  # set non-conducting to allow sensing
  echo 0  $x/PIO.BYTE 
done

#Loop forever
while : ; do
  # Loop through alarms
  for x in /1wire/alarm/29.* ; do
# Run a program with the switch name and the Latch state (button presses)
ProcessSwitch `basename $x` `cat $x/latch.BYTE`

# Reset the latches and clear the alarm
echo 1  $x/latch.BYTE
  done

  #optional pause
done

The advantage of this is that you will only see the triggered switches (only 
they appear in the alarm directory) and the latches make catching button 
presses easier. The only limits are now the latency between finding a button 
press and giving feedback.

Note that this scheme lends itself very well to partitioning. Several 
instances of script/owfs/adapter can each run simultaneously. Only the 
ProcessSwitch function has to worrt about locking shared resources.

The /1wire directory can be accessed by other processes at the same time to 
give feedback, monitor temperatures or whatever. 


 That seems to be the most elegant solution but I still don't understand how
 it works.  At this point I should order a 1-Wire interface and a few 2408
 in order to experiment.

Yup, that's the best idea. The DS9090K kit comes with a USB adapter, a little 
wiring area, and a selection of chips. $65
 --

Paul Alfille


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid3432bid#0486dat1642
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] Timeout again

2006-02-15 Thread Paul Alfille
Twins? Then concurrent thread programming should be a natural!

Congratulations.

I'm getting close with the solution. Just have to work out a deadlock issue.

Paul

On Wednesday 15 February 2006 03:45 am, Christian Magnusson wrote:
 That seems to be one solution to the problem.

 We are really close to have children now (twins actually), so I doubt I
 will have time to do this myself right now. If nothing happens until
 Monday, we are going to the hospital to manually start it.

 Until then I have lots of things to take care of at work, and I'm not
 sure if or when I have some spare time this week to do some programming.

 I guess we have to release a new version as soon as possible when this
 issue is fixed.

 /Christian

 On Tue, 2006-02-14 at 17:18 -0500, Alfille, Paul H.,M.D. wrote:
  Ahha! I see your point. The delay waiting for the other thread is causing
  the timeout. Perhaps a null message back while waiting would satify the
  problem.
 
  I think the strategy should be:
 
  owlib:
ow_server.c
loop on any NULL return messages from owserver
 
  owserver:
Each handler routine should start a second (ping) thread that sends a
  NULL message every 1.5 seconds.
On handler success, kill the ping thread (but protect the actual
  message sneding so that partial pings aren't sent) and return the real
  response.
 
  This way if we still timeout, owserver really has a problem and perhaps
  reconnect should be done.
 
  Do you want to implement this, Chrstian, or should I?
 
  Paul

 ---
 This SF.net email is sponsored by: Splunk Inc. Do you grep through log
 files for problems?  Stop!  Download the new AJAX search engine that makes
 searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642
 ___
 Owfs-developers mailing list
 Owfs-developers@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/owfs-developers


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] Timeout again

2006-02-18 Thread Paul Alfille
On Monday 13 February 2006 05:22 pm, Christian Magnusson wrote:
 Nope... 2 seconds isn't enough...  Can't tell you why, but it's not
 working for me at least..

 /Christian

Fixed!

Added some smarts (and fixed some inefficiencies) in the network protocol.

owserver will now respond within 1.5 seconds to a request, either with a null 
ping or with data.
The null ping is ignored by the client, but prevents the 2 second timeout.

If the 2 second timeout occurs, there is probably a network issue, and we 
should investigate reconnection or some other handling.

I will make a release tomorrow.

Paul Alfille


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: SV: [Owfs-developers] Timeout again

2006-02-19 Thread Paul Alfille
On Sunday 19 February 2006 04:18 am, Christian Magnusson wrote:
 BTW: Does this timeout and ping packets take care of read/write commands
 that take long time to execute?

 For example, ow_2433.c:OW_w_mem() will call BUSLOCK()/BUSUNLOCK() three
 times during the write progress (+ BUSLOCK in bus_reset). This will
 probably delay the execution length since it could take several seconds
 between each BUSLOCK() if the 1-wire bus is busy with other commands.

 Just a quick thought about possible errors without reading the source with
 the latest changes.

 /Christian


I wrapped the current handler in owserver with another routine.

The wrapper saves the time, starts the real handler (in a separate thread) and 
loops every 0.1 seconds.

1. If the timer has been cleared, this signals the real handler is done, so 
the wrapper exits.
2.  If enough time has elapsed, the ping is sent, and the timer reset.
3. When the real handler sends data, it resets the timer, too.
4. The wrapper and real handler have a mutex to coordinate writing and timer 
manipulation.
5. The wrapping function lives longer, so it owns the stack space for the 
timer and mutex.

Have I missed anything?? The fall through if threading is not available or not 
enough resources is to call the handler in the same thread -- no pinging, but 
should function like the old days.

I worry a bit about the 0.1 seconds. There could theorectically be a lot of 
lingering threads around. My first design was to coordinate the threads 
directly, and use pthread_cancel to explicitly kill the pingger when the 
processing was done. It seems that pthread_cancel doesn't like nanosleep much 
(a lot of error 11 Resource temporarily unavailable when canceling.

Thinking about it, I can make the handling thread detatched (non-joinable) 
which is supposed to be cheaper. I also am using PTHREAD_MUTEX_INITIALIZER -- 
is that kosher with uClibc ?

Paul Alfille

P.S. Have you started some new threads of execution yet?


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: SV: SV: [Owfs-developers] Timeout again

2006-02-19 Thread Paul Alfille
On Sunday 19 February 2006 02:07 pm, Christian Magnusson wrote:

 It seems to be very slow response-time now, but I'll tell you more about my
 experience when it has been running for some more time.

Yes the response times seem a little slow. Strange, since I eliminated an 
unneeded ServerPresence communication with every remote directory element.

There is also a dropped pointer when reading real devices with fuse 
(glibc error -- actually doubly freed pointer) that you can seen in 
--foreground mode.

fuse: fuse_remove_signal_handlers: unknown session
*** glibc detected *** free(): invalid pointer: 0x080694b0 ***
*** glibc detected *** free(): invalid pointer: 0x080673b0 ***
*** glibc detected *** free(): invalid pointer: 0x080694e8 ***
fuse: fuse_remove_signal_handlers: unknown session
*** glibc detected *** corrupted double-linked list: 0x401d27c8 ***
*** glibc detected *** corrupted double-linked list: 0x401d27c8 ***

The error occurs only in owfs, not owserver, or owhttpd. And the error occurs 
with both remote and local buses. It occurs with listing or reading actual 
devices, but not statistics or other memory elements.

 I will probably need to do some more serious multitasking tomorrow
 afternoon since we will probably deliver our twins then. :)

I can understand if nice us a bit.

 /Christian


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] client/serwer protocol and extendig owfs

2006-02-24 Thread Paul Alfille
On Friday 24 February 2006 06:27 pm, Krzysztof Drewicz wrote:
 Paul Alfille napisał(a):
 I don't want do use owfs on my small box (i would like to use 16MB of SF
 card) but i would like to talk dicectlly to owserwer process.
 
 Is your small box network connected? If your strip owfs and fuse and

 Network -maybe. GSM box w/ gprs and sms connectivity 100% sure yes it is.

 owhttpd they are quite small. They run on 4MB Linksys routers even with
  the routing functions present (as well as rrd, and data storage).
 
 If you are network connected, owfs doesn't need to run on the box, just
 owserver.

 Yes. I've done it (integrating into small flash owhttp + owserwer). It
 was easiest thing to do, since i use uClibc and busybox.
 I want to have 'one very selfsufficientbox box' so i use GSM on a
 'pcmcia' with external antenna.
You certainly will want only intermittent connections, then.

 http://owfs.sf.net/wiki/index.php/NetworkProtocol
 (Sorry, the tables were lost in a recent edit -- restored)

 Ok, seems very simple and easy to program. When/if i finish, it (the
 program) will be GPLed and posted/published...
Good. If you are going to use that interface, I guess we should start using 
the version field to keep everything interoperable. 
Version is a 4-byte field.

I was thinking of making it:
struct version {
uint16_t major ;
uint16_t minor ;
}

With major changed when forward compatibility would be broken. (We'll try to 
keep backward compatibility). Does this sound ok? 

 Very interesting -- something I've always contemplated.
 Basically, you want to store unique application-specific data for each
  device.

 Yes. And...

 the file types, and the data would evaporate with a reboot.

 That's biggest problem. I *NEED* to reeboot  time to time and have no
 intension to reenter values from filesystem every boot, when i could
 storewrite them.
 Also i need http based config for my 'founder'..

 Another point: use arrays. phone.1 phone.2 ...
 OWFS handles these efficiently, and it's easier to alter in the future.

 Ok good point here!

 if someone is interested:
 there willbe a dot-matrix printer recording temperature every hour or
 so, and everything (whole project) is made because of  The Law in
 Poland, nowadays some poor man has to note down reading of 8 termometers
 every hour and sing his name. Very interesting job some may say...


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid0944bid$1720dat1642
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


[Owfs-developers] DS27XX

2006-02-24 Thread Paul Alfille
Added support for the whole class of battery control chips.

DS2438 (old)
DS2720
DS2740
DS2751
DS276X (old)
DS2770
DS2780

Memory: 20,51,6X,70,80
Switch: 40,51,6X,80
Temperature: 38,51,6X,70,80
Voltage: 38(two),51,6X,70,80
Current: 38,40,51,6X,70,80
Thermocouple support: 51,60,70,80
Timer: 38,70
Humidity support: 38

Paul Alfille


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


  1   2   3   4   5   6   7   8   9   10   >