GPIO JAVA library for Beaglebone Black

160 views
Skip to first unread message

Radovan Chovan

unread,
Jun 23, 2021, 9:38:53 AM6/23/21
to BeagleBoard
In the past I used java gpio library libbulldog.

description from author of library:

http://www.libbulldog.org ... page not found

Now I am using Debian 10.3 with kernel 4.19.94-ti-r42 in Beaglebone Black.

Board is detected via command Board board = Platform.createBoard();
but now I get error:

java.lang.ArrayIndexOutOfBoundsException: 0
    at org.bulldog.beagleboneblack.sysfs.BBBSysFs.getCapeManager(BBBSysFs.java:23)
    ...
    at org.bulldog.core.platform.Platform.createBoard(Platform.java:13)

From BBBSysFs file:

private String SYSFS_DEVICES_PATH = "/sys/devices";
return getFilesInPath(this.SYSFS_DEVICES_PATH, "bone_capemgr")[0];

but path sys/devices/bone_capemgr doesn't exist.

I think problem is in newer kernel:

I 've tried comment line enable_uboot_overlays=1 in /boot/uEnv.txt, but after reboot BBB board doesn't start.


But back to my problem.
How can I access pins, UARTs in JAVA how I access with libbulldog library.
Thanks.

Robert Nelson

unread,
Jun 23, 2021, 10:32:35 AM6/23/21
to Beagle Board
On Wed, Jun 23, 2021 at 8:39 AM Radovan Chovan <rad...@gmail.com> wrote:
>
> In the past I used java gpio library libbulldog.
>
> description from author of library:
> https://groups.google.com/g/beagleboard/c/QkdoypqrTPQ/m/L7URLQ1dCAAJ
>
> http://www.libbulldog.org ... page not found
>
> Now I am using Debian 10.3 with kernel 4.19.94-ti-r42 in Beaglebone Black.
>
> Board is detected via command Board board = Platform.createBoard();
> but now I get error:
>
> java.lang.ArrayIndexOutOfBoundsException: 0
> at org.bulldog.beagleboneblack.sysfs.BBBSysFs.getCapeManager(BBBSysFs.java:23)
> ...
> at org.bulldog.core.platform.Platform.createBoard(Platform.java:13)
>
> From BBBSysFs file:
>
> private String SYSFS_DEVICES_PATH = "/sys/devices";
> return getFilesInPath(this.SYSFS_DEVICES_PATH, "bone_capemgr")[0];
>
> but path sys/devices/bone_capemgr doesn't exist.
>
> I think problem is in newer kernel:
> https://elinux.org/Beagleboard:BeagleBoneBlack_Debian#Where_did_the_slots_file_go.3F

Correct, kernel is too new for that library..

Reboot with 3.8.13, (if it even boots..)

Regards,

--
Robert Nelson
https://rcn-ee.com/

Radovan Chovan

unread,
Jun 24, 2021, 2:07:58 AM6/24/21
to BeagleBoard
Thanks.
I need to use Debian 10.3 and display GEN4-4DCAPE-70CT-CLB from 4D Systems.
I will try another project for java gpio https://github.com/koert/gpio
Do you know something else like libbulldog?

Dátum: streda 23. júna 2021, čas: 16:32:35 UTC+2, odosielateľ: RobertCNelson

Gwen Stouthuysen

unread,
Jun 24, 2021, 4:48:10 AM6/24/21
to beagl...@googlegroups.com
Is there a base reason to use Java in this project?

By design Java has a high separation from the hardware.
Accessing the hardware (GPIo) is not simple.
Doing this on Linux is anyhow not simple due the same reason: Linux separates the userspace from the hardware.

You better look into C/C++ for hardware access.
The ultimate speed of the application will also improve.

Gwen

Op do 24 jun. 2021 om 08:08 schreef Radovan Chovan <rad...@gmail.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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/08bc6689-17dd-47f6-bcad-094c9774ee53n%40googlegroups.com.

Andrew McRae

unread,
Jun 24, 2021, 6:03:56 AM6/24/21
to beagl...@googlegroups.com
Choice of language is always interesting and often a personal choice.
For different options, let me publicise the Go bindings I have developed for both GPIO (https://github.com/aamcrae/gpio) and PRU (https://github.com/aamcrae/pru)
I've found Go to be a good language for fast and scalable development.
Java likely has better UI options, and certainly has been around a long time so that it is well known.
Cheers,
AMc

Radovan Chovan

unread,
Jun 24, 2021, 6:47:49 AM6/24/21
to BeagleBoard
I have complex Java application where using GPIO is only part of it.

Dátum: štvrtok 24. júna 2021, čas: 10:48:10 UTC+2, odosielateľ: gwen.sto...@gmail.com

Robert Heller

unread,
Jun 24, 2021, 7:18:13 AM6/24/21
to beagl...@googlegroups.com, BeagleBoard, Robert Heller
At Thu, 24 Jun 2021 03:47:49 -0700 (PDT) beagl...@googlegroups.com wrote:

>
> I have complex Java application where using GPIO is only part of it.

OK, probably the "easiest" (and Linux-only) way to add GPIO access is use the
sysfs interface.

If you are at all familure with C++, there is C++ code to do that here:

https://github.com/bakerstu/openmrn/blob/master/src/os/LinuxGpio.hxx

and Tcl code here:

https://github.com/RobertPHeller/ModelRRSystem/blob/master/trunk/Scripts/LinuxGpio/LinuxGpio.tcl

It works like this:

You set up a GPIO "pin" by writing its number to

/sys/class/gpio/export

This "creates" a directory named /sys/class/gpio/gpioN (where N is the GPIO
number) which contains these files:

direction -- read/write direction ('in' or 'out')
value -- read/write value ('0' or '1')

If you are in the gpio group, you don't need to be root to access these files.

You should be able to code this with just Java's standard file I/O classes --
no need for any C/C++ interface code.

Note: this will work on any Linux system with GPIO pins, include Beagle
boards, Raspberry Pis, Banana Pis, Orange Pis, etc. (Some Linux variants will
need udev rules to help with file ownership and permissions.)

(There is also a sysfs interface for PWM and Analog pins, in case that is what
you need to access.)

>
> Dátum: Å¡tvrtok 24. júna 2021, Ä as: 10:48:10 UTC+2, odosielateľ:
> gwen.sto...@gmail.com
>
> > Is there a base reason to use Java in this project?
> >
> > By design Java has a high separation from the hardware.
> > Accessing the hardware (GPIo) is not simple.
> > Doing this on Linux is anyhow not simple due the same reason: Linux
> > separates the userspace from the hardware.
> >
> > You better look into C/C++ for hardware access.
> > The ultimate speed of the application will also improve.
> >
> > Gwen
> >
> > Op do 24 jun. 2021 om 08:08 schreef Radovan Chovan <rad...@gmail.com>:
> >
> >> Thanks.
> >> I need to use Debian 10.3 and display GEN4-4DCAPE-70CT-CLB from 4D
> >> Systems.
> >> I will try another project for java gpio https://github.com/koert/gpio
> >> Do you know something else like libbulldog?
> >>
> >> Dátum: streda 23. júna 2021, Ä as: 16:32:35 UTC+2, odosielateľ:
> >> <https://groups.google.com/d/msgid/beagleboard/08bc6689-17dd-47f6-bcad-094c9774ee53n%40googlegroups.com?utm_medium=email&utm_source=footer>
> >> .
> >>
> >
>

--
Robert Heller -- Cell: 413-658-7953 GV: 978-633-5364
Deepwoods Software -- Custom Software Services
http://www.deepsoft.com/ -- Linux Administration Services
hel...@deepsoft.com -- Webhosting Services

Robert Heller

unread,
Jun 24, 2021, 9:03:39 AM6/24/21
to beagl...@googlegroups.com
I just created a repo on github containing a quick and dirty port of my
LinuxGpio classes to JAVA:

https://github.com/RobertPHeller/JAVALinuxGPIO

The code is not tested and probably not optimal, but should be enough to get
someone started. Should be runnable by a non-priv. user, so long as that user
is in the gpio group.

At Thu, 24 Jun 2021 07:17:59 -0400 (EDT) beagl...@googlegroups.com wrote:

>
> At Thu, 24 Jun 2021 03:47:49 -0700 (PDT) beagl...@googlegroups.com wrote:
>
> >
> > I have complex Java application where using GPIO is only part of it.
>
> OK, probably the "easiest" (and Linux-only) way to add GPIO access is use the
> sysfs interface.
>
> If you are at all familure with C++, there is C++ code to do that here:
>
> https://github.com/bakerstu/openmrn/blob/master/src/os/LinuxGpio.hxx
>
> and Tcl code here:
>
> https://github.com/RobertPHeller/ModelRRSystem/blob/master/trunk/Scripts/LinuxGpio/LinuxGpio.tcl
>
> It works like this:
>
> You set up a GPIO "pin" by writing its number to
>
> /sys/class/gpio/export
>
> This "creates" a directory named /sys/class/gpio/gpioN (where N is the GPIO
> number) which contains these files:
>
> direction -- read/write direction ('in' or 'out')
> value -- read/write value ('0' or '1')
>
> If you are in the gpio group, you don't need to be root to access these files.
>
> You should be able to code this with just Java's standard file I/O classes --
> no need for any C/C++ interface code.
>
> Note: this will work on any Linux system with GPIO pins, include Beagle
> boards, Raspberry Pis, Banana Pis, Orange Pis, etc. (Some Linux variants will
> need udev rules to help with file ownership and permissions.)
>
> (There is also a sysfs interface for PWM and Analog pins, in case that is what
> you need to access.)
>
> >
> > Dátum: Å¡tvrtok 24. júna 2021, Ä as: 10:48:10 UTC+2, odosielateľ:
> > gwen.sto...@gmail.com
> >
> > > Is there a base reason to use Java in this project?
> > >
> > > By design Java has a high separation from the hardware.
> > > Accessing the hardware (GPIo) is not simple.
> > > Doing this on Linux is anyhow not simple due the same reason: Linux
> > > separates the userspace from the hardware.
> > >
> > > You better look into C/C++ for hardware access.
> > > The ultimate speed of the application will also improve.
> > >
> > > Gwen
> > >
> > > Op do 24 jun. 2021 om 08:08 schreef Radovan Chovan <rad...@gmail.com>:
> > >
> > >> Thanks.
> > >> I need to use Debian 10.3 and display GEN4-4DCAPE-70CT-CLB from 4D
> > >> Systems.
> > >> I will try another project for java gpio https://github.com/koert/gpio
> > >> Do you know something else like libbulldog?
> > >>
> > >> Dátum: streda 23. júna 2021, Ä as: 16:32:35 UTC+2, odosielateľ:

Dennis Lee Bieber

unread,
Jun 24, 2021, 12:11:14 PM6/24/21
to Beagleboard
On Thu, 24 Jun 2021 07:17:59 -0400 (EDT), in
gmane.comp.hardware.beagleboard.user Robert Heller
<heller-2/ccJrXdU8tWk0Htik3J/w...@public.gmane.org> wrote:

>At Thu, 24 Jun 2021 03:47:49 -0700 (PDT) beagleboard-/JYPxA39Uh5...@public.gmane.org wrote:
>
>>
>> I have complex Java application where using GPIO is only part of it.
>
>OK, probably the "easiest" (and Linux-only) way to add GPIO access is use the
>sysfs interface.
>
At least until the Linux developers remove it... My understanding is
that sysfs is currently "deprecated", the replacement being libgpiod -- a
"character" device driver.

Unfortunately, for libgpiod, JAVA probably needs an interface library
to be created -- quick search finds
https://github.com/mattjlewis/diozero (though there are some mentions of
sysfs in the commentary, but perusing
https://github.com/mattjlewis/diozero/blob/main/system-utils-native/src/main/c/com_diozero_internal_provider_builtin_gpio_NativeGpioDevice.c
appears to be the libgpiod chip devices).

There is also this one https://github.com/sgjava/java-periphery


--
Dennis L Bieber

Radovan Chovan

unread,
Jun 29, 2021, 10:02:06 AM6/29/21
to BeagleBoard
Thanks for all your comments.

Is there any mapping between /sys/class/gpio and schematic diagram of Beaglebone Black board?

I want to use pin P9_24 (UART1_TXD) and P9_26 (UART1_RXD).

Dátum: štvrtok 24. júna 2021, čas: 18:11:14 UTC+2, odosielateľ: Dennis Bieber

Robert Nelson

unread,
Jun 29, 2021, 10:28:26 AM6/29/21
to Beagle Board
On Tue, Jun 29, 2021 at 9:02 AM Radovan Chovan <rad...@gmail.com> wrote:
>
> Thanks for all your comments.
>
> Is there any mapping between /sys/class/gpio and schematic diagram of Beaglebone Black board?
>
> I want to use pin P9_24 (UART1_TXD) and P9_26 (UART1_RXD).
> https://beagleboard.org/static/beaglebone/BEAGLEBONE_SCHEM_A3.pdf (page 11/11)


Derek has this detail on these pdf's

https://github.com/derekmolloy/boneDeviceTree/tree/master/docs

https://github.com/derekmolloy/boneDeviceTree/blob/master/docs/BeagleboneBlackP9HeaderTable.pdf

Robert Heller

unread,
Jun 29, 2021, 10:36:41 AM6/29/21
to beagl...@googlegroups.com, BeagleBoard, Robert Heller
At Tue, 29 Jun 2021 07:02:06 -0700 (PDT) beagl...@googlegroups.com wrote:

>
> Thanks for all your comments.
>
> Is there any mapping between /sys/class/gpio and schematic diagram of
> Beaglebone Black board?

No. /sys/class/gpio just uses the GPIO numbers. The mapping of GPIO N.M is:

N*32+M

eg GPIO 2.05 is 69

>
> I want to use pin P9_24 (UART1_TXD) and P9_26 (UART1_RXD).
> https://beagleboard.org/static/beaglebone/BEAGLEBONE_SCHEM_A3.pdf (page
> 11/11)

If you want to use these pins as UART1, (the default), you can use /dev/ttyS1.

Otherwise you should use config-pin to select the mode:

For GPIO -- #0.15 for P9_24 and #0.14 for P9_26:

config-pin P9_24 gpio
config-pin P9_24 gpio_pu
config-pin P9_24 gpio_pd
config-pin P9_24 gpio_input
config-pin P9_26 gpio
config-pin P9_26 gpio_pu
config-pin P9_26 gpio_pd
config-pin P9_26 gpio_input

For CAN (can1)
config-pin P9_24 can
config-pin P9_26 can

For I2C (i2c1)

config-pin P9_24 i2c
config-pin P9_26 i2c



>
> Dátum: Å¡tvrtok 24. júna 2021, Ä as: 18:11:14 UTC+2, odosielateľ: Dennis
> Bieber
>
> > On Thu, 24 Jun 2021 07:17:59 -0400 (EDT), in
> > gmane.comp.hardware.beagleboard.user Robert Heller
> > <heller-2/ccJrXdU8tWk0Htik3J/w...@public.gmane.org> wrote:
> >
> > >At Thu, 24 Jun 2021 03:47:49 -0700 (PDT) beagleboard-/
> > JYPxA39Uh5...@public.gmane.org wrote:
> > >
> > >>
> > >> I have complex Java application where using GPIO is only part of it.
> > >
> > >OK, probably the "easiest" (and Linux-only) way to add GPIO access is use
> > the
> > >sysfs interface.
> > >
> > At least until the Linux developers remove it... My understanding is
> > that sysfs is currently "deprecated", the replacement being libgpiod -- a
> > "character" device driver.
> >
> > Unfortunately, for libgpiod, JAVA probably needs an interface library
> > to be created -- quick search finds
> > https://github.com/mattjlewis/diozero (though there are some mentions of
> > sysfs in the commentary, but perusing
> >
> > https://github.com/mattjlewis/diozero/blob/main/system-utils-native/src/main/c/com_diozero_internal_provider_builtin_gpio_NativeGpioDevice.c
> > appears to be the libgpiod chip devices).
> >
> > There is also this one https://github.com/sgjava/java-periphery
> >
> >
> > --
> > Dennis L Bieber
> >
> >
>

Dennis Lee Bieber

unread,
Jun 29, 2021, 10:42:45 AM6/29/21
to Beagleboard
On Tue, 29 Jun 2021 07:02:06 -0700 (PDT), in
gmane.comp.hardware.beagleboard.user Radovan Chovan
<rado991-Re5JQEe...@public.gmane.org> wrote:

>Thanks for all your comments.
>
>Is there any mapping between /sys/class/gpio and schematic diagram of
>Beaglebone Black board?
>
Does
https://vadl.github.io/beagleboneblack/2016/07/29/setting-up-bbb-gpio
provide any help.

>I want to use pin P9_24 (UART1_TXD) and P9_26 (UART1_RXD).
>https://beagleboard.org/static/beaglebone/BEAGLEBONE_SCHEM_A3.pdf (page
>11/11)
>
P9_24 equates to GPIO15, but in raw pin numbering appears to be 97. As
I recall, there are 32 GPIOs per "CHIP", so that might be the 4th CHIP
(counting from 0), and the second GPIO (again, counting from 0)

>>> divmod(97, 32)
(3, 1)

P9_26 -> GPIO14, raw 96...

>>> divmod(96, 32)
(3, 0)
>>>

HOWEVER,
debian@beaglebone:~$ gpioinfo
gpiochip0 - 32 lines:
line 0: "MDIO_DATA" unused input active-high
<SNIP>
line 12: "UART1_CTSN" "P9_20" input active-high [used]
line 13: "UART1_RTSN" "P9_19" input active-high [used]
line 14: "UART1_RXD" "P9_26" input active-high [used]
line 15: "UART1_TXD" "P9_24" input active-high [used]
line 16: "GMII1_TXD3" unused input active-high

indicates that it is CHIP0, and the "line" 14/15 map to the GPIOxx (so for,
say, GPIO45 it becomes chip 1, line 13)

The gpioinfo command is provided by installing the gpiod package.


debian@beaglebone:~$
/opt/source/bb.org-overlays/tools/beaglebone-universal-io/config-pin -i
p9_26
Pin name: P9_26
Function if no cape loaded: gpio
Function if cape loaded: default gpio gpio_pu gpio_pd gpio_input uart can
i2c pru_uart pruin
Function information: gpio0_14 default gpio0_14 gpio0_14 gpio0_14 gpio0_14
uart1_rxd dcan1_tx i2c1_sda pru_uart pru1_in16
Kernel GPIO id: 14
PRU GPIO id: 46
debian@beaglebone:~$
/opt/source/bb.org-overlays/tools/beaglebone-universal-io/config-pin -i
p9_24
Pin name: P9_24
Function if no cape loaded: gpio
Function if cape loaded: default gpio gpio_pu gpio_pd gpio_input uart can
i2c pru_uart pruin
Function information: gpio0_15 default gpio0_15 gpio0_15 gpio0_15 gpio0_15
uart1_txd dcan1_rx i2c1_scl pru_uart pru0_in16
Kernel GPIO id: 15
PRU GPIO id: 47
debian@beaglebone:~$


(Unfortunately, that script doesn't tell one what "default" mode IS for the
pin, but does have more capability than the compiled config-pin that
replaces it)


--
Dennis L Bieber

Radovan Chovan

unread,
Jun 30, 2021, 10:03:38 AM6/30/21
to BeagleBoard
I tried to use write operation on /sys/class/gpio/gpio14 (gpio15)/value, but nothing happens  (from https://github.com/RobertPHeller/JAVALinuxGPIO/blob/main/LinuxGPIO.java )
I figured out that PrintStream doesn't throw exceptions so I tried to use FileOutputStream.
Then I got exception:

java.io.IOException: Operation not permitted
    at java.io.FileOutputStream.write(Native Method)
    at java.io.FileOutputStream.write(FileOutputStream.java:290)

Read operation via FileInputStream is ok.

I run my java application with "sudo".

gpio14 ... P9_24 (UART1_TXD)
gpio15 ... P9_26 (UART1_RXD)
Right?


Dátum: utorok 29. júna 2021, čas: 16:42:45 UTC+2, odosielateľ: Dennis Bieber

Robert Heller

unread,
Jun 30, 2021, 11:21:06 AM6/30/21
to beagl...@googlegroups.com, BeagleBoard, Robert Heller
At Wed, 30 Jun 2021 07:03:38 -0700 (PDT) beagl...@googlegroups.com wrote:

>
> I tried to use write operation on /sys/class/gpio/gpio14 (gpio15)/value,
> but nothing happens (from
> https://github.com/RobertPHeller/JAVALinuxGPIO/blob/main/LinuxGPIO.java )
> I figured out that PrintStream doesn't throw exceptions so I tried to use
> FileOutputStream.
> Then I got exception:
>
> java.io.IOException: Operation not permitted
> at java.io.FileOutputStream.write(Native Method)
> at java.io.FileOutputStream.write(FileOutputStream.java:290)
>
> Read operation via FileInputStream is ok.
>
> I run my java application with "sudo".
>
> gpio14 ... P9_24 (UART1_TXD)
> gpio15 ... P9_26 (UART1_RXD)
> Right?

First of all you need to configure the pins:

config-pin P9_24 gpio
config-pin P9_26 gpio
("config-pin -l P9_24" list the possible options, "config-pin -q P9_24"
displays the current settings. There is an extended versin of config-pin
under /opt/source/bb.org-overlays/tools/beaglebone-universal-io/)

You then need to "export" the GPIO pins:

write "14" to /sys/class/gpio/export
write "15" to /sys/class/gpio/export

You also need to configure the direction:

write "in" to /sys/class/gpio/gpio14/direction (for input)
write "out" to /sys/class/gpio/gpio14/direction (for output)

(My GPIO class does that in the constructor)

To avoid sudo, you put yourself into the gpio group:

sudo usermod -a -G gpio $USER

then logout and log back in.

>
>
> Dátum: utorok 29. júna 2021, Ä as: 16:42:45 UTC+2, odosielateľ: Dennis Bieber

Radovan Chovan

unread,
Jul 1, 2021, 2:25:19 AM7/1/21
to BeagleBoard
config-pin P9_26 gpio
ERROR: open() for /sys/devices/platform/ocp/ocp:P9_26_pinmux/state failed, No such file or directory


write "in" to /sys/class/gpio/gpio14/direction (for input)
write "out" to /sys/class/gpio/gpio14/direction (for output) ... Did you mean gpio15 (not gpio14)? gpio15 ... UART1_TXD

I will try UART4_RXD (P9_11 - gpio30) and UART4_TXD (P9_13 - gpio31).


Dátum: streda 30. júna 2021, čas: 17:21:06 UTC+2, odosielateľ: hel...@deepsoft.com

Robert Heller

unread,
Jul 1, 2021, 6:51:05 AM7/1/21
to beagl...@googlegroups.com, BeagleBoard, Robert Heller
At Wed, 30 Jun 2021 23:25:19 -0700 (PDT) beagl...@googlegroups.com wrote:

>
> config-pin P9_26 gpio
> ERROR: open() for /sys/devices/platform/ocp/ocp:P9_26_pinmux/state failed,
> No such file or directory
>
>
> write "in" to /sys/class/gpio/gpio14/direction (for input)
> write "out" to /sys/class/gpio/gpio14/direction (for output) ... Did you
> mean gpio15 (not gpio14)? gpio15 ... UART1_TXD
>
> I will try UART4_RXD (P9_11 - gpio30) and UART4_TXD (P9_13 - gpio31).

Why are you speificly going after UART pins? Are you wanting to actually use
the UARTs?

>
>
> Dátum: streda 30. júna 2021, Ä as: 17:21:06 UTC+2, odosielateľ:
> > > Dátum: utorok 29. júna 2021, Ä as: 16:42:45 UTC+2, odosielateľ:
> > Robert Heller -- Cell: 413-658-7953 <(413)%20658-7953> GV: 978-633-5364
> > <(978)%20633-5364>

Radovan Chovan

unread,
Jul 1, 2021, 9:51:09 AM7/1/21
to BeagleBoard
I would like to trasmit data via UART4_TXD and receive viac UART4_RXD.

Btw, I try to write to gpio30 and I think I figured out finally how it use. Export -> Set Direction -> Read / Write -> Unexport.

Dátum: štvrtok 1. júla 2021, čas: 12:51:05 UTC+2, odosielateľ: hel...@deepsoft.com

Gwen Stouthuysen

unread,
Jul 1, 2021, 9:57:30 AM7/1/21
to beagl...@googlegroups.com
Then Linux and Java have other ways to deal with this.

The uart is known (should be) as a serial port in the OS, this is something you can instruct the OS to do.

Check out serial communication in Java and connect through the OS with the right port.

Gwen


Op do 1 jul. 2021 om 15:51 schreef Radovan Chovan <rad...@gmail.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...@googlegroups.com.

Robert Heller

unread,
Jul 1, 2021, 10:22:23 AM7/1/21
to beagl...@googlegroups.com, BeagleBoard, Robert Heller
If you want to use the UART, then you should config the pins as uart pins and
use the /dev/ttyS? devices.

At Thu, 1 Jul 2021 06:51:09 -0700 (PDT) beagl...@googlegroups.com wrote:

>
> I would like to trasmit data via UART4_TXD and receive viac UART4_RXD.
>
> Btw, I try to write to gpio30 and I think I figured out finally how it use.
> Export -> Set Direction -> Read / Write -> Unexport.
>
> Dátum: Å¡tvrtok 1. júla 2021, Ä as: 12:51:05 UTC+2, odosielateľ:
> hel...@deepsoft.com
>
> > At Wed, 30 Jun 2021 23:25:19 -0700 (PDT) beagl...@googlegroups.com wrote:
> >
> > >
> > > config-pin P9_26 gpio
> > > ERROR: open() for /sys/devices/platform/ocp/ocp:P9_26_pinmux/state
> > failed,
> > > No such file or directory
> > >
> > >
> > > write "in" to /sys/class/gpio/gpio14/direction (for input)
> > > write "out" to /sys/class/gpio/gpio14/direction (for output) ... Did you
> > > mean gpio15 (not gpio14)? gpio15 ... UART1_TXD
> > >
> > > I will try UART4_RXD (P9_11 - gpio30) and UART4_TXD (P9_13 - gpio31).
> >
> > Why are you speificly going after UART pins? Are you wanting to actually
> > use
> > the UARTs?
> >
> > >
> > >
> > > Dátum: streda 30. júna 2021, Ä as: 17:21:06 UTC+2, odosielateľ:
> > > > > Dátum: utorok 29. júna 2021, Ä as: 16:42:45 UTC+2,
> > odosielateľ:
> > <(413)%20658-7953> GV: 978-633-5364 <(978)%20633-5364>
Reply all
Reply to author
Forward
0 new messages