Re: [Owfs-developers] Understanding BAE's read access to generic/memory

2011-07-08 Thread Eloy Paris
Hi list, I wanted to close the loop on this with one final comment: On 07/07/2011 10:55 PM, Eloy Paris wrote: > On 07/07/2011 04:41 PM, Paul Alfille wrote: > >> I think I'm starting to see your question. You are wondering how to read >> and write in the middle of a "file" (memory buffer). > > Ye

Re: [Owfs-developers] Understanding BAE's read access to generic/memory

2011-07-07 Thread Eloy Paris
Hi Paul, On 07/07/2011 10:55 PM, Eloy Paris wrote: [...] > After your explanations I am accomplishing what I need like this (for > example): > > shell$ owread --hex --size=16 --start=0 /99.010203040506/generic/memory This had me scratching my head -- I was reading from microcontroller memory,

Re: [Owfs-developers] Understanding BAE's read access to generic/memory

2011-07-07 Thread Eloy Paris
Hi Pascal, On 07/07/2011 05:37 PM, Pascal Baerten wrote: > you may want to look at the 'writebyte' I've utilized to test some > features sometime ago. > the code is now commented out but still present. > > The principle is to consider the writebyte property as a word value (two > bytes) > the hi-

Re: [Owfs-developers] Understanding BAE's read access to generic/memory

2011-07-07 Thread Eloy Paris
Hi Paul, On 07/07/2011 04:41 PM, Paul Alfille wrote: > I think I'm starting to see your question. You are wondering how to read > and write in the middle of a "file" (memory buffer). Yes, with the added complexity (for me to understand how things work) that I was trying to do this from the comm

Re: [Owfs-developers] Understanding BAE's read access to generic/memory

2011-07-07 Thread Eloy Paris
Hi Paul, On 07/07/2011 04:26 PM, Paul Alfille wrote: > owq is filled by the "read" command -- i.e. a filesystem read has size > and offset as part of the call. Buffer (for the result) is allocated as > well. You don't need to worry about how it's filled in, that comes from > the OW_read routines

Re: [Owfs-developers] Understanding BAE's read access to generic/memory

2011-07-07 Thread Pascal Baerten
Hi Paris, you may want to look at the 'writebyte' I've utilized to test some features sometime ago. the code is now commented out but still present. The principle is to consider the writebyte property as a word value (two bytes) the hi-byte is parsed as the offset and the lo-byte is parsed as the

Re: [Owfs-developers] Understanding BAE's read access to generic/memory

2011-07-07 Thread Paul Alfille
I think I'm starting to see your question. You are wondering how to read and write in the middle of a "file" (memory buffer). The command line is an awkward place to do partial file operations. >From a C program, you can use lseek and read >From the owshell routines, there is owread --size=nnn --

Re: [Owfs-developers] Understanding BAE's read access to generic/memory

2011-07-07 Thread Paul Alfille
owq is filled by the "read" command -- i.e. a filesystem read has size and offset as part of the call. Buffer (for the result) is allocated as well. You don't need to worry about how it's filled in, that comes from the OW_read routines (or OW_write). Those MACROs: OWQ_buffer, OWQ_size, OWQ_offset

Re: [Owfs-developers] Understanding BAE's read access to generic/memory

2011-07-07 Thread Eloy Paris
On 07/07/2011 03:15 PM, Eloy Paris wrote: [...] > Writing the micro-controller code to handle the memory read (and > subsequent 1-Wire transfer from micro-controller to bus master) is easy > but I am struggling with the OWFS side of things. I could do something like: $ echo 0 > /owfs/xx.nnn

[Owfs-developers] Understanding BAE's read access to generic/memory

2011-07-07 Thread Eloy Paris
Hi list, I am working on a micro-controller-based 1-Wire device and am looking at ow_bae.c as a guide in implementing OWFS support for my device. OWFS BAE support has the capability to read micro-controller memory by accessing generic/memory and I'd like to implement that capability for my devi