Re: [beagleboard] GPIO JAVA library for Beaglebone Black

2021-06-24 Thread Robert Heller
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) [email protected] wrote:

> 
> At Thu, 24 Jun 2021 03:47:49 -0700 (PDT) [email protected] 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ľ: 
> > [email protected]
> > 
> > > 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 :
> > >
> > >> 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
> > >>
> > >>> On Wed, Jun 23, 2021 at 8:39 AM Radovan Chovan  
> > >>> 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/ 
> > >>>
> > >> -- 
> > >> 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/08bc6689-17dd-47f6-bcad-094c9774ee53n%40googlegroups.com
> > >>  
> > >> 
> > >> .
> > >

Re: [beagleboard] GPIO JAVA library for Beaglebone Black

2021-06-24 Thread Robert Heller
At Thu, 24 Jun 2021 03:47:49 -0700 (PDT) [email protected] 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ľ: 
> [email protected]
> 
> > 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 :
> >
> >> 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
> >>
> >>> On Wed, Jun 23, 2021 at 8:39 AM Radovan Chovan  
> >>> 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/ 
> >>>
> >> -- 
> >> 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/08bc6689-17dd-47f6-bcad-094c9774ee53n%40googlegroups.com
> >>  
> >> 
> >> .
> >>
> >
> 

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

-- 
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/20210624111759.ABD0F220C73%40sharky4.deepsoft.com.


Re: [beagleboard] GPIO JAVA library for Beaglebone Black

2021-06-24 Thread Radovan Chovan
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ľ: 
[email protected]

> 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 :
>
>> 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
>>
>>> On Wed, Jun 23, 2021 at 8:39 AM Radovan Chovan  
>>> 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/ 
>>>
>> -- 
>> 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/08bc6689-17dd-47f6-bcad-094c9774ee53n%40googlegroups.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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/5842d6d4-68a3-40f3-bef1-e920eaf83683n%40googlegroups.com.


Re: [beagleboard] GPIO JAVA library for Beaglebone Black

2021-06-24 Thread Andrew McRae
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

On Thu, 24 Jun 2021 at 18:47, Gwen Stouthuysen 
wrote:

> 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 :
>
>> 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
>>
>>> On Wed, Jun 23, 2021 at 8:39 AM Radovan Chovan 
>>> 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/
>>>
>> --
>> 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/08bc6689-17dd-47f6-bcad-094c9774ee53n%40googlegroups.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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beagleboard/CAFfeaG9DU-haRtLeEEf%2Bt9%2Bw5Y48tsibUApqnmPmiJV%3DtA%3DS1A%40mail.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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CA%2BNkvar%2BxAqiJsM-mwyOecM9Ce4F6rJFJudUbFCD7%3DKBbnV2Cg%40mail.gmail.com.


Re: [beagleboard] GPIO JAVA library for Beaglebone Black

2021-06-24 Thread Gwen Stouthuysen
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 :

> 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
>
>> On Wed, Jun 23, 2021 at 8:39 AM Radovan Chovan  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/
>>
> --
> 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/08bc6689-17dd-47f6-bcad-094c9774ee53n%40googlegroups.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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CAFfeaG9DU-haRtLeEEf%2Bt9%2Bw5Y48tsibUApqnmPmiJV%3DtA%3DS1A%40mail.gmail.com.


Re: [beagleboard] GPIO JAVA library for Beaglebone Black

2021-06-23 Thread Radovan Chovan
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

> On Wed, Jun 23, 2021 at 8:39 AM Radovan Chovan  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/
>

-- 
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/08bc6689-17dd-47f6-bcad-094c9774ee53n%40googlegroups.com.


Re: [beagleboard] GPIO JAVA library for Beaglebone Black

2021-06-23 Thread Robert Nelson
On Wed, Jun 23, 2021 at 8:39 AM Radovan Chovan  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/

-- 
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/CAOCHtYgdnmBWtyH8t13YobJRkWDauo89FOe57Qqd_%2BMAMNay1w%40mail.gmail.com.


[beagleboard] GPIO JAVA library for Beaglebone Black

2021-06-23 Thread Radovan Chovan
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

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.

-- 
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/fd43d1c6-3f5a-4ea1-8761-a5fcc5dffcf6n%40googlegroups.com.