I changed the code to this and get the same error.
fd = open ("/dev/mem", O_RDONLY | O_SYNC); // not sure O_SYNC is
necessary since this is a read-only open situation
Servo tester!!!
ERROR: could not open /dev/mem.
make: *** [/var/lib/cloud9/common/Makefile:173: start] Error 1
rm /tmp/cloud9-examples/pwm-test.o
Here's some info about my specific owner/group & permissions.
debian@beaglebone:/var/lib/cloud9$ ls -ls /dev/mem
0 crw-r----- 1 root kmem 1, 1 Apr 30 20:30 /dev/mem
debian@beaglebone:/var/lib/cloud9$ groups
debian adm kmem dialout cdrom floppy audio dip video plugdev users
systemd-journal bluetooth netdev i2c cloud9ide xenomai weston-launch tisdk
docker iio spi admin remoteproc eqep pwm gpio
debian@beaglebone:/var/lib/cloud9$ whoami
debian
debian@beaglebone:/var/lib/cloud9$
On Friday, April 30, 2021 at 12:23:43 PM UTC-4 Dennis Bieber wrote:
> On Fri, 30 Apr 2021 08:22:10 -0700 (PDT), in
> gmane.comp.hardware.beagleboard.user Walter Cromer
> <walterc-2dFtBuzUeF/[email protected]> wrote:
>
>
> >I checked with ls -ls /dev/mem logged in as debian and it's there.
> >
> debian@beaglebone:~$ ls -ls /dev/mem
> 0 crw-r----- 1 root kmem 1, 1 Apr 30 12:06 /dev/mem
> debian@beaglebone:~$
> debian@beaglebone:~$ groups
> debian adm kmem dialout cdrom floppy audio dip video plugdev users
> systemd-journal input bluetooth netdev i2c remoteproc eqep pwm cloud9ide
> xenomai weston-launch tisdk docker iio spi admin gpio
> debian@beaglebone:~$
>
>
> That is what my BBB shows.
>
> Owner (root) has R/W permission
> Group (kmem) has Read-Only permission.
>
> The debian account has kmem group access.
>
> From your earlier post...
>
> > fd = open ("/dev/mem", O_RDWR | O_SYNC);
>
> ... you are asking for R/W access -- which is not set for members of the
> kmem group. What happens if you attempt to open /dev/mem for read-only
> access?
>
>
> --
> Dennis L Bieber
>
>
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/beagleboard/9f6f9ffc-22ec-4958-b781-c140b329d30en%40googlegroups.com.