Well, I have an i2c memory on the same board and to read and write to that 
I can use the following commands:
write
cat data.eeprom > /sys/bus/i2c/devices/2-0057/eeprom
read
cat /sys/bus/i2c/devices/2-0057/eeprom | hexdump

I did try your suggestion of using dd but I could not get it to work.
root@beaglebone:/home/debian# dd if=/dev/zero 
of=/sys/bus/w1/devices/23-000002eddd9b/eeprom bs=32
dd: error writing '/sys/bus/w1/devices/23-000002eddd9b/eeprom': Invalid 
argument
1+0 records in
0+0 records out
0 bytes copied, 0.0159578 s, 0.0 kB/s
root@beaglebone:/home/debian# 

As the eeprom is written to contain data on another device, so I thought it 
would be enough to use /dev/zero as input.
Reading out data show no change of content (as expected consider the output 
from dd)
cat /sys/bus/w1/devices/23-000002eddd9b/eeprom | hexdump
0000000 00ff 55aa  00ff 55aa  00ff 55aa  00ff 55aa
onsdag 30 september 2020 kl. 07:15:53 UTC+2 skrev Sven Norinder:

> The eeprom probably is a device, not a filesystem.
> Use dd instead.
> /Sven
>
> tisdag 29 september 2020 kl. 17:59:14 UTC+2 skrev Johan Lind:
>
>> I tried with only a short (6 bytes) string but still the same behaviour.
>>
>>
>> tisdag 29 september 2020 kl. 17:45:47 UTC+2 skrev robert.sty...@gmail.com
>> :
>>
>>> I suggest trying to write less than 32 bytes (the dmesg implies 
>>> something wrong with offset or count) -- create a file of less than 32 
>>> bytes and copy to eeprom
>>> cd ~
>>> echo "1234567890" > file10
>>> cp -T file10 /sys/bus/w1/devices/23-000002eddd9b/eeprom
>>>
>>> In the data sheet you need a much smaller R[PU] to write than read
>>> https://datasheets.maximintegrated.com/en/ds/DS2433.pdf
>>>
>>> On Tuesday, 29 September 2020 at 16:03:48 UTC+1 RobertCNelson wrote:
>>>
>>>> On Tue, Sep 29, 2020 at 9:55 AM 'Johan Lind' via BeagleBoard 
>>>> <beagl...@googlegroups.com> wrote: 
>>>> > 
>>>> > Yes, it does still show eeprom 
>>>> > 
>>>> > debian@beaglebone:~$ ls /sys/bus/w1/devices/23-000002eddd9b 
>>>> > driver eeprom id name power subsystem uevent 
>>>> > debian@beaglebone:~$ ls /sys/bus/w1/devices/ 
>>>> > 23-000002eddd9b w1_bus_master1 
>>>> > debian@beaglebone:~$ 
>>>> > debian@beaglebone:~$ ls -al /sys/bus/w1/devices/23-000002eddd9b/ 
>>>> > total 0 
>>>> > drwxrwxr-x 3 root gpio 0 Sep 29 14:00 . 
>>>> > drwxrwxr-x 4 root gpio 0 Sep 29 14:00 .. 
>>>> > lrwxrwxrwx 1 root gpio 0 Sep 29 14:00 driver -> 
>>>> ../../../bus/w1/drivers/w1_slave_driver 
>>>> > -rw-rw-r-- 1 root gpio 512 Sep 29 14:07 eeprom 
>>>>
>>>> Side note, you don't' have to be root, the "gpio" group is the default 
>>>> for debian.. 
>>>>
>>>> > -r--r--r-- 1 root gpio 4096 Sep 29 14:00 id 
>>>> > -r--r--r-- 1 root gpio 4096 Sep 29 14:00 name 
>>>> > drwxrwxr-x 2 root gpio 0 Sep 29 14:00 power 
>>>> > lrwxrwxrwx 1 root gpio 0 Sep 29 14:00 subsystem -> ../../../bus/w1 
>>>> > -rw-rw-r-- 1 root gpio 4096 Sep 29 14:00 uevent 
>>>> > debian@beaglebone:~$ 
>>>>
>>>> not sure why you can't write... 
>>>>
>>>> Regards, 
>>>>
>>>> -- 
>>>> Robert Nelson 
>>>> https://rcn-ee.com/ 
>>>>
>>>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/3b1beb76-64e6-4a79-964c-035429b5d81cn%40googlegroups.com.

Reply via email to