Wasn't the problem that the redirection of output by ">" was outside the sudo *command* The "echo" is not needed, only sudo sh -c "cat /home/debian/file > eeprom"
On Friday, 25 September 2020 at 15:59:06 UTC+1 RobertCNelson wrote: > On Fri, Sep 25, 2020 at 9:48 AM johan.lind via BeagleBoard > <beagl...@googlegroups.com> wrote: > > > > I would need some help to understand why I can't write to an DS2433 > eeprom. > > > > System information: > > BBB Industrial board > > Debian 10 (Buster IoT Image 2020-04-06) > > Hardware attached are DS2482 i2c to w1 interface and DS2433 eeprom. > > > > Commands executed to set-up system: > > $ modprobe ds2482 > > $ echo ds2482 0x18 > /sys/bus/i2c/devices/i2c-1/new_device > > $ modprobe wire > > > > I can read the eeprom by executing > > $ cd /sys/bus/w1/devices/23-000002eddd9b > > $ cat eeprom | hexdump > > > > Getting this far I assume hardware is correct and drivers are loaded > correctly. > > > > debian@beaglebone:/sys/bus/w1/devices/23-000002eddd9b$ ls > > driver eeprom id name power subsystem uevent > > > > Should here be a directory called w1_slave? > > I see such a directory on some web pages searching for similar problems > with w1. > > > > Now to the problem. > > Executing the following command will fail: > > debian@beaglebone:/sys/bus/w1/devices/23-000002eddd9b$ sudo cat > /home/debian/file > eeprom > > [sudo] password for debian: > > cat: write error: Invalid argument > > https://elinux.org/Beagleboard:BeagleBoneBlack_Debian#Privileged_echo > > sudo sh -c "echo 'cat /home/debian/file' > eeprom" > > 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/3065c659-6385-4fb8-94d2-1ac2c853675fn%40googlegroups.com.