We are using Owfs in Linux to access a DS1991 and DS1995 through the USB DS9490R reader.
Every thing is ok for DS1995.
For DS1991 we are not able to make it work. Maybe we are doing something wrong.
We know the password of the 3 pages of the iButton because we can set it with another tool in Windows.
With OWFS in Linux we try this steps, by code or by hand or with the owfshttp:
Open pages/password.0
Write 8 bytes to pages/password.0
Close pages/password.0
Open pages/page.0
Read all 64 byte
Close the file
Dump the content.
The content of the page file is always 0x00!
Is the same with page 0 1 and 2.
Can you help us please?
Do you need some more informations?
Thank you very much.
Are you sure the password bytes aren't mangled? Both the DS1991 and the owlib core expect them to be plain bytes, and some of the language bindings or your web browser may apply an encoding to them or add CR+LF. Please create a 8-byte file with the password, check the content with a hex editor, then push the content into the owfs pages/password.0 node with a simple tool like "cat".
I'm going to try thank you. I'll let you know the result.
Hello and thank you. Yes I'm sure. I made a test now directly in c code.
I'm also sure that the pwd is right, I checked it with another tool in windows.
Here is the sample:
THE READ SUBKEY CODE:
Thank you very much.
Have you tried with a password file and cat? Important to eliminate any bug within your code. Using C-stlye buffered I/O with anything else but real files can be tricky.
Yes we made the requested test with Linux cat tool.
1) Create a pwd.hex file with (in hex) 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38
2) Check the file with hexedit in windows
3) Chech the file with hexdump in Linux
4) cat ./pwd.hex > /disk/1wire/02.12B0CE000000/pages/password.0
5) hexdump -Cv /disk/1wire/02.12B0CE000000/pages/page.0
Result is always all zeroes.
Also strange that is always 0x00 the result: the manual talks about random data but we receive always 0x00.
Maybe is still our error but we made test with:
Web tool: no way
Linux tools: no way
Our C code: no way
If there is an error of us I suppose it should be on the procedure...
Can you help us?
Are you able to read DS1991?
Thank you again.
Please read /disk/1wire/uncached/02.12B0CE000000/pages/page.0 instead. Chances are the cache isn't invalidated when the password is changed.
Last edit: Jan Kandziora 2015-01-19
I made the test in uncached with the web server with no success.
We made also a test starting the service setting "no cache" with same result.
I'm going to try with the linux tools as soon as possible.
Thank you.
We made the requested test with no result.
In attach the print screen:
test1: write pw in uncached and read page in uncached: no result
test2: write pw in uncached and read page "normal": all 0x00
Can you please exlpicit tell me if DS1991 is working for you?
Have you seen it working?
Thank you very much
Best regards
Paolo