read/write EEPROM

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

read/write EEPROM

Timo Engel

Hello,

I'm using owfs to read/write the EEPROM of DS2436 and DS2433 devices.
Mostly, this works nice and without problems. However, sometimes wrong
data is stored on the EEPROM.

I'm wondering what is the correct procedure to read/write form/to an
EEPROM. Is it sufficient to use write() and write 32 bytes for example
to pages/page.0? Are there any status information if the last write()
was successful? Is owfs doing any checks of CRC and sends messages
again to the device or do I have to implement this on my own?

It would be nice to verify the written data by reading them back, but
it seems to be useless because of the caching mechanism of owfs. I
know about the "uncached" directory, but reading from there makes owfs
stop working.

I can imagine the communication will be more reliable if it is slower.
I'm using the w1 kernel driver. Is there an option to change the speed
of the bus? Maybe when building owfs?

thanks in advance

Timo





------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

Re: read/write EEPROM

Jan Kandziora
Am 04.02.2016 um 14:06 schrieb Timo Engel:
>
> I'm wondering what is the correct procedure to read/write form/to an
> EEPROM. Is it sufficient to use write() and write 32 bytes for example
> to pages/page.0?
>
Yes.

> Are there any status information if the last write()
> was successful?
>
If the operation returns without an error, it was successful.


> Is owfs doing any checks of CRC and sends messages
> again to the device or do I have to implement this on my own?
>
OWFS checks all CRCs given and does the checks as required.


>
> It would be nice to verify the written data by reading them back,
>
This is done inside OWFS already where applicable


> but
> it seems to be useless because of the caching mechanism of owfs. I
> know about the "uncached" directory, but reading from there makes owfs
> stop working.
>
No. If it does for you, your installation is broken. Which version of
OWFS do you use?


>
> I can imagine the communication will be more reliable if it is slower.
> Is there an option to change the speed
> of the bus? Maybe when building owfs?
>
Communication speed is hard-wired inside the chips and can't be changed.
Usually it's not a problem at all, being only about 10kBaud.

You can advise owfs not to use the overdrive speed for chips which
support it, but neither the DS2433 nor the DS2436 do.


> I'm using the w1 kernel driver.
>
You need to use at least owfs-3.1p1 or downgrade your kernel to a
version before 3.16rc1. Or don't use the kernel driver at all.

Kind regards

        Jan


------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

Re: read/write EEPROM

Timo Engel


On 04.02.2016 15:00, Jan Kandziora wrote:

>> it seems to be useless because of the caching mechanism of owfs. I
>> know about the "uncached" directory, but reading from there makes owfs
>> stop working.
>>
> No. If it does for you, your installation is broken. Which version of
> OWFS do you use?

Thanks for your reply, I checked this again now. I'm using owfs from
git 11325b6674a255a9797a1096e89870572ecf4db8 from Sun Dec 6 20:57:29
2015 and Kernel 4.1.13-v7+ (raspbian jessie).

$ hexdump -C 1B.F4DB40000000/pages/page.0
is always working fine.

$ hexdump -C uncached/1B.F4DB40000000/pages/page.0
does not output anything.


This is the content of /etc/owfs.conf:

w1
mountpoint = /home/pi/ow
allow_other
foreground
error_level = 2


------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

Re: read/write EEPROM

Jan Kandziora
Am 12.02.2016 um 10:03 schrieb Timo Engel:
>
> Thanks for your reply, I checked this again now. I'm using owfs from
> git 11325b6674a255a9797a1096e89870572ecf4db8 from Sun Dec 6 20:57:29
> 2015 and Kernel 4.1.13-v7+ (raspbian jessie).
>
Ah, ok. So you have the w1 patch included.


>
> $ hexdump -C 1B.F4DB40000000/pages/page.0
> is always working fine.
>
> $ hexdump -C uncached/1B.F4DB40000000/pages/page.0
> does not output anything.
>
Please, don't use the FUSE interface for anything but demonstration
purposes. It has some serious limitations which can't be avoided.
Instead, stop all ow daemons currently running (not just owfs, but
*ALL*), then do

# owserver --debug --w1

and, in another terminal:

$ owget /uncached/1B.F4DB40000000/pages/page.0 | hexdump -C

Please send me the log from owserver.


>
> This is the content of /etc/owfs.conf:
>
> w1
> mountpoint = /home/pi/ow
> allow_other
> foreground
> error_level = 2
>
This is fine as long as you use only *one single* daemon, as all the
daemons including that configuration file are advised to access the w1
kernel interface directly. I recommend to replace it by:

server: w1
!server: server = localhost:4304
mountpoint = /home/pi/ow
allow_other
foreground
error_level = 2

That way only owserver accesses the w1 kernel interface, and all the
other daemons do it through owserver. Of course you have to run
owserver then.


As the configuration file isn't included by default but only when you
specify it on the command line, it's okay to leave it untouched and just
stop all the daemons started by default for debugging.

Kind regards

        Jan

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

Re: read/write EEPROM

Jan Kandziora
Am 12.02.2016 um 16:57 schrieb Timo Engel:
>
> The output of owserver is attached.
> owget does not output anything when using the "uncached" path.
>
This looks a lot like the netlink layer has still (or again)
communication problems with owlib.

* Please make sure you are indeed using the owfs from
11325b6674a255a9797a1096e89870572ecf4db8.

* Do a cross-check by disabling the kernel's w1 subsystem (unload the
modules) and access the hardware directly.

Which host adapter do you use? DS2482 on I²C, Bitbanging on GPIO or DS9490?

Kind regards

        Jan

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

Re: read/write EEPROM

Timo Engel


On 13.02.2016 01:35, Jan Kandziora wrote:

> Am 12.02.2016 um 16:57 schrieb Timo Engel:
>>
>> The output of owserver is attached.
>> owget does not output anything when using the "uncached" path.
>>
> This looks a lot like the netlink layer has still (or again)
> communication problems with owlib.
>
> * Please make sure you are indeed using the owfs from
> 11325b6674a255a9797a1096e89870572ecf4db8.
>
> * Do a cross-check by disabling the kernel's w1 subsystem (unload the
> modules) and access the hardware directly.
>
> Which host adapter do you use? DS2482 on I²C, Bitbanging on GPIO or DS9490?


I rebuilt 11325b6674a255a9797a1096e89870572ecf4db8 and I also updated
to b748d0009fa11e656955cb7525d964847acee212 which is the latest
chageset, but the behaviour is the same.

I am using bitbanging on an GPIO. I don't understand how to access
hardware directly. I can unload the w1_gpio module, but as expected
owfs/owserver won't work without it.


------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

Re: read/write EEPROM

Jan Kandziora
Am 15.02.2016 um 14:30 schrieb Timo Engel:
>
> I am using bitbanging on an GPIO.
>
Then you have no choice but to use --w1. OWFS has no bitbanging driver
of its own, only drivers for RS232, USB and I²C based adaptors.

Unfortunately, I don't have a DS2433 nor DS2436 at hand to check it
myself. Could you please give a shorter log? The log you gave seems to
include multiple tries.

Kind regards

        Jan


------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

Re: read/write EEPROM

Jan Kandziora
Am 16.02.2016 um 09:36 schrieb Timo Engel:
>
> This is the log generated for one call of owget. It excludes the
> messages for startup and shutdown of owserver.
> Version is 11325b6674a255a9797a1096e89870572ecf4db8.
>
Well, it seems either the w1 netlink communication has changed *again*
or there was introduced a bug.

I'd like to check this with an older kernel and a DS2433 myself. May
take a while as I have other work to do currently. You could do a check
with an older kernel (preferably pre-3.16), too. Don't to back beyond
3.10, as there is no device tree support below that so you had to patch
the distribution, too.

Kind regards

        Jan



------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

Re: read/write EEPROM

Timo Engel

I tried the latest git version from Feb 18th with several different
kernel versions: 3.10.25, 3.12.28, 3.12.35, 4.1.13
The behaviour is always the same: It is not possible to read from the
uncached EEPROM pages. However, it is possible to read the uncached
temperature.



On 19.02.2016 15:43, Jan Kandziora wrote:

> Am 16.02.2016 um 09:36 schrieb Timo Engel:
>>
>> This is the log generated for one call of owget. It excludes the
>> messages for startup and shutdown of owserver.
>> Version is 11325b6674a255a9797a1096e89870572ecf4db8.
>>
> Well, it seems either the w1 netlink communication has changed *again*
> or there was introduced a bug.
>
> I'd like to check this with an older kernel and a DS2433 myself. May
> take a while as I have other work to do currently. You could do a check
> with an older kernel (preferably pre-3.16), too. Don't to back beyond
> 3.10, as there is no device tree support below that so you had to patch
> the distribution, too.
>
> Kind regards
>
> Jan
>
>
>
> ------------------------------------------------------------------------------
> Site24x7 APM Insight: Get Deep Visibility into Application Performance
> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
> Monitor end-to-end web transactions and take corrective actions now
> Troubleshoot faster and improve end-user experience. Signup Now!
> http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
> _______________________________________________
> Owfs-developers mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/owfs-developers
>
>

------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785111&iu=/4140
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

Re: read/write EEPROM

Timo Engel

Is there any update about this issue?
Do you have some hints how to get this debugged?


Timo


On 09.03.2016 09:33, Timo Engel wrote:

>
> I tried the latest git version from Feb 18th with several different
> kernel versions: 3.10.25, 3.12.28, 3.12.35, 4.1.13
> The behaviour is always the same: It is not possible to read from the
> uncached EEPROM pages. However, it is possible to read the uncached
> temperature.
>
>
>
> On 19.02.2016 15:43, Jan Kandziora wrote:
>> Am 16.02.2016 um 09:36 schrieb Timo Engel:
>>>
>>> This is the log generated for one call of owget. It excludes the
>>> messages for startup and shutdown of owserver.
>>> Version is 11325b6674a255a9797a1096e89870572ecf4db8.
>>>
>> Well, it seems either the w1 netlink communication has changed *again*
>> or there was introduced a bug.
>>
>> I'd like to check this with an older kernel and a DS2433 myself. May
>> take a while as I have other work to do currently. You could do a check
>> with an older kernel (preferably pre-3.16), too. Don't to back beyond
>> 3.10, as there is no device tree support below that so you had to patch
>> the distribution, too.
>>
>> Kind regards
>>
>> Jan
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Site24x7 APM Insight: Get Deep Visibility into Application Performance
>> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
>> Monitor end-to-end web transactions and take corrective actions now
>> Troubleshoot faster and improve end-user experience. Signup Now!
>> http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
>> _______________________________________________
>> Owfs-developers mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/owfs-developers
>>
>>
>
> ------------------------------------------------------------------------------
> Transform Data into Opportunity.
> Accelerate data analysis in your applications with
> Intel Data Analytics Acceleration Library.
> Click to learn more.
> http://pubads.g.doubleclick.net/gampad/clk?id=278785111&iu=/4140
> _______________________________________________
> Owfs-developers mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/owfs-developers
>
>

------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

Re: read/write EEPROM

Jan Kandziora
Am 14.03.2016 um 16:30 schrieb Timo Engel:
>
> Is there any update about this issue?
> Do you have some hints how to get this debugged?
>
So far, no. I have no time to look for owfs until starting of April, I
don't have the chip yet and there is other housekeeping work in owfs to
do already.

So maybe someone else want to try to help you.

Kind regards

        Jan

------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers