On Mon, 2005-07-11 at 16:19 +1000, Matthew Percival wrote:
> G'Day,
> 
>       I have added some fprintf()s to the code, and noticed that
> OMAP_select() and OMAP_next_both() are never called; nor is
> CheckPresence_low().  No errors are recorded anywhere, however, and
> pn->si->AnyDevices is being set to true.  I added some more fprintf()s
> to see exactly what was going on, and there do not seem to be many calls
> to my code at all.  When I first run owfs, I get the following output:
>               OMAP_detect()
>               OMAP_reset()
>               OMAP_send_and_get()
>               OMAP_reset(): AnyDevices = 1
>               owfs is activated!
> 
>       Looking at the oscilloscope, I see a little activity (a clear presence
> pulse at the correct time, followed by some other transfers).  When I ls
> 1wire/, there are no calls to my functions, but the oscilloscope shows
> some activity; likewise, ls 1wire/bus.0/ has activity, but my functions
> are not called.
> 

Try  "ls -l /mnt/1wire/uncached/"  to force scanning the 1-wire bus
every time.

As I understand you have copied ow_ds9097.c and made your changes to it.
DS9097_reset() send a resetbyte 0xF0 and read a byte. If received byte
is 0xF0, no devices where found on the bus and it's therefor no use
to search for more devices in DS9097_next_both() where it exits later.
If received byte is 0, the 1-wire bus has a short circuit.
Otherwise there seem to be devices 1-wire devices to use.

I guess you get a result !=0 and !=0xF0 since you make a debug output
like:  "OMAP_reset(): AnyDevices = 1" (and I suppose you return 0 from
OMAP_reset() to indicate reset was successful)

If you start: owfs --foreground --error_level=9 --error_print=2
   -o /dev/wire /mnt/1wire

You should get lots of other debug-messages, and try accessing the
/mnt/1wire/uncached/ directory and tell us how it looks like.


Add debugging in ow_dir.c:FS_realdir() just after BUS_select(pn2)
and BUS_first(sn,pn2) and make sure they both return 0, otherwise
it will never enter the loop and list the devices on the 1-wire bus.

/Christian





>       The most likely explanation is that something is failing before it
> calls my functions, but it is also not calling the functions that are
> supposed to be called at this time.  I half tempted to add fprintf()s
> everywhere, so I can see every function call: it may help track down
> what is going on a little faster.
> 
> > I assume you've altered ow_opt for special parameters and configuration for 
> > your adapter type, and added the adapter type to the enum.
> 
>       I do not need to do much here, but I have made some additions.
> 
> > I'm afraid you're going to have to read the 1-wire Application Notes.
> 
>       The website seems to be down at the moment, but I shall check them out 
> later: thanks for the links!
> 
>       -- 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
-- 
Christian Magnusson <[EMAIL PROTECTED]>



-------------------------------------------------------
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

Reply via email to