First of all thank you for responding.  Comments below.
> From: [email protected] [mailto:[email protected]] On 
> Behalf Of Dennis Lee Bieber
> On Mon, 10 May 2021 10:09:14 -0700, in gmane.comp.hardware.beagleboard.user
> "John Dammeyer" <[email protected]> wrote:
> 
>       Suspect I'm not really going to be of much help -- but a few
> comments...
> 
> >I'm still not sure of the actual process with this revision of the OS.
> >debian@ebb:~/lazarus$ uname -a
> >Linux ebb 4.14.108-ti-r136 #1stretch SMP PREEMPT Mon Jun 8 15:38:30 UTC 2020 
> >armv7l GNU/Linux
> >
>       Stretch is getting a bit long in the tooth -- is there some reason you
> need to stay on it (Debian organization is in the midst of finalizing the
> replacement for Buster!).
> 
It's been a love/hate relationship with the Beagle.  I have about 5 books that 
are useless because the OS changed so the experiments don't work.  Regardless 
of how wonderful the newest revision of the BBB OS is, if changes don't match 
the documentation that's out there then the changes are useless.  It's why I 
had to buy the second edition of Derek Molloy's book.  No more $SLOTS.


>       You also appear to have changed your Beagle's host name to match that
> Malloy used for his -- the initials of "e/xploring b/eagleb/one". Just an
> observation.

Good observation.  After fighting the various books,  web pages etc. I decided 
I'd start at page 1 and work my way through the second edition so that what was 
written matched what I was doing.  So if he's using 4.14 so am I.
> 
> >
> >And then create the shell script as outlined but with user debian in group 
> >gpio?
> >Eg:
> >chown -R nick:digital /sys/devices/gpio
> >
> >becomes
> >chown -R debian:gpio /sys/devices/gpio
> >
>       I'm somewhat surprised at that. My understanding is that adding the
> "debian" user to the GROUP gpio should allow that user to access anything
> that is part of the gpio group, using the group permissions rather than
> owner permissions -- so should not need to be changed to debian as owner.
> 
>       Unfortunately, I can't state anything specific. Buster doesn't seem to
> have the same layout.

And now we run into the real problem.  The web pages out there are in many 
cases useless because they might refer to older versions of the OS or newer 
versions.  

What started this particular stream of discovery was that I jumped ahead a bit 
rather than continue page by page.    My desire is to create the same library 
of C++ functions for Lazarus (Free Pascal) and ultimately update the sockets.pp 
code to support socketCAN which it currently doesn't.

I've written a few utilities already that use the CANUSB from Lawicel and the 
same source code compiled on each host runs on Windows, LinuxCNC, Pi3 and the 
Beagle talking to the CANUSB and an active CANopen project.

To deal with CAN bus on the Pi3/Pi4 requires access to the SPI bus for the 
MCP2515.  On the Beagle it's the on chip CAN device.  And if I want to talk to 
sensors like I2C or One-Wire plus inexpensive LCD displays I need access to the 
hardware.  

So I installed the PXL library and that's where I ran into the next roadblock.  
First you can't, from within the IDE and debugging, work with SPI bus without 
running Lazarus as root.  Or it just won't work with the /sys/class/gpio 
folders.  And that's the reason for wanting to free up access to the gpio.

The SPI bus ADAfruit application for a 320x240 display written in Python runs 
properly rendering LENNA.JPG onto the LCD display.  The key outputs are the DC 
and RESET which are on gpio48 and gpio60.  An "ls" of the /sys/class/gpio 
folder shows on start up those two are not visible.  

It's possible to use:
$ sudo echo 48 > /sys/class/gpio/export 
to create the gpio48 folder and as super user the VXP library can do that but 
then it fails on the write to SPI.

=============================================================================
debian@ebb:~/lazarus/pxl/Samples/FreePascal/SingleBoard/Generic/DisplaySPI$ 
sudo ./DisplaySPI
[sudo] password for debian:
An unhandled exception occurred at $00032BB0:
                                             ESysfsSPITransfer: Cannot transfer 
<1> data byte(s) through SPI bus.
                                   $00032BB0  TSYSFSSPI__TRANSFER,  line 247 of 
/home/debian/lazarus/pxl/Source/PXL.Sysfs.SPI.pas
                                                   $00032AC4  TSYSFSSPI__WRITE, 
 line 228 of /home/debian/lazarus/pxl/Source/PXL.Sysfs.SPI.pas
=============================================================================

I don't yet know the reason for this.  The error happens here:
  Res := fpioctl(FHandle, SPI_IOC_MESSAGE(1), @Data);

The fpioctl is in the Free Pascal interface library so that's not something to 
be dealt with in this forum.

I thought it best to solve the simple problem first which to not use sudo so I 
can run Lazarus from the debian user desktop and be able to debug with break 
points etc.  The comment by Robert Nelson on 4.11+ suggests I'm fine with using 
4.14.  Or is Derek Molloy's second edition now also recycle material?

John



-- 
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/07f101d745db%24acf37630%2406da6290%24%40autoartisans.com.

Reply via email to