Machinekit issue with config-pin on BBB

77 views
Skip to first unread message

Jim Craig

unread,
Apr 9, 2020, 7:19:08 PM4/9/20
to Machinekit
I am trying out Machinekit on the BBB. I am wanting to keep the HDMI output on the board.

I have the uEnv enable_uboot_cape_universal = 1

I do not have an actual cape on the BBB at this time.

I am trying to run the CRAMPS sample configuration. I am getting the following error.

sudo: no askpass program specified, try setting SUDO_ASKPASS
Cannot write gpio direction file: /sys/class/gpio/gpio66/direction.
CRAMPS.hal:12: program 'config-pin' failed, returned 1

In the CRAMPS.bbio file the first pin it tries to configure is P8_07 which equates to gpio66. If I comment out that line it gives the error for the next pin gpio67 or P8_08.

These pins should not be conflicting with the HDMI cape.

What is the issue with this set of errors.

I do see something in the CRAMPS.hal file that concerns me after this. it says the following.

loadrt hal_bb_gpio output_pins=816,822,823,824,825,826,914,923,925 input_pins=807,808,809,810,817,911,913

I don't understand why it is trying to set pins 822,823,824,825 as gpio. What are the "servo" signals used for that are connected to these pins. I don't see a purpose. Then you would not have to disable the eMMC.

Mainly looking for help on the SUDO_ASKPASS issue and not being able to write to the gpio pins using config-pin.

Thanks,

Jim

Robert Nelson

unread,
Apr 9, 2020, 7:55:22 PM4/9/20
to Jim Craig, Machinekit
On Thu, Apr 9, 2020 at 6:19 PM Jim Craig <jimcra...@windstream.net> wrote:
>
> I am trying out Machinekit on the BBB. I am wanting to keep the HDMI output on the board.
>
> I have the uEnv enable_uboot_cape_universal = 1
>
> I do not have an actual cape on the BBB at this time.
>
> I am trying to run the CRAMPS sample configuration. I am getting the following error.
>
> sudo: no askpass program specified, try setting SUDO_ASKPASS
> Cannot write gpio direction file: /sys/class/gpio/gpio66/direction.
> CRAMPS.hal:12: program 'config-pin' failed, returned 1

What user are you using when you do this? There should be a udev rule
kicking off the gpio class permiossoins...

Regards,

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

Jim Craig

unread,
Apr 9, 2020, 9:24:47 PM4/9/20
to Machinekit


On Thursday, April 9, 2020 at 6:55:22 PM UTC-5, Robert Nelson wrote:

What user are you using when you do this? There should be a udev rule
kicking off the gpio class permiossoins...


I am using machinekit as the username. I have changed the password from the default machinekit.
I created this user from the original debian image. I followed the steps located in this tutorial.
https://machinekoder.com/machinekit-debian-stretch-beaglebone-black/

looking at the udev rules it appears that they apply to users in the "gpio" group. My machinekit user is not in the "gpio" group. I tried to add this user to the "gpio" group using

sudo su
usermod -aG gpio machinekit
exit

When i list groups the machinekit user is still not in the "gpio" group.

I read the group change is not immediately changed so a reboot is required. logout and login would also work.

After reboot machinekit is in the "gpio" group

After this machinekit runs with the CRAMPS.ini configuration. I commented out the eMMC pins that were set up for "servo" use.

Robert, thanks for the nudge in the right direction. ; )

Jim


Reply all
Reply to author
Forward
0 new messages