jadonk / jadonk/bonescript

USR0/1/2/3 aren't avalable on latest version of kernel

Open
#194 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
510
Forks
153
PR merge metrics
No merged PRs in 30d

Description

I've updated kernel for BeagleBone Black from https://debian.beagleboard.org/images/bone-debian-10.3-iot-armhf-2020-04-06-4gb.img.xz
Try execute next script
```
#!/usr/bin/env node
////////////////////////////////////////
// blinkLED.js
// Blinks the USR LEDs and P9_14.
// Wiring: P9_14 connects to the plus lead of an LED. The negative lead of the
// LED goes to a 220 Ohm resistor. The other lead of the resistor goes
// to ground.
// Setup:
// See:
////////////////////////////////////////
const b = require('bonescript');

//const leds = ["USR0", "USR1", "USR2", "USR3"];
const leds = ["P8_14"];

for(var i in leds) {
b.pinMode(leds[i], b.OUTPUT);
}

var state = b.HIGH;
for(var i in leds) {
b.digitalWrite(leds[i], state);
}

setInterval(toggle, 250);

function toggle() {
if(state == b.LOW)
state = b.HIGH;
else
state = b.LOW;
for(var i in leds) {
b.digitalWrite(leds[i], state);
}
}
```
And have next messages
```
error: Unable to find LED beaglebone:green:usr0
error: Unable to find LED beaglebone:green:usr1
error: Unable to find LED beaglebone:green:usr2
error: Unable to find LED beaglebone:green:usr3
error: Unable to find gpio: /sys/class/leds/beaglebone:green:usr0/brightness
error: Unable to write to /sys/class/leds/beaglebone:green:usr0/brightness
error: Unable to find gpio: /sys/class/leds/beaglebone:green:usr1/brightness
error: Unable to write to /sys/class/leds/beaglebone:green:usr1/brightness
error: Unable to find gpio: /sys/class/leds/beaglebone:green:usr2/brightness
error: Unable to write to /sys/class/leds/beaglebone:green:usr2/brightness
error: Unable to find gpio: /sys/class/leds/beaglebone:green:usr3/brightness
error: Unable to write to /sys/class/leds/beaglebone:green:usr3/brightness
error: Unable to write to /sys/class/leds/beaglebone:green:usr0/brightness
error: Unable to write to /sys/class/leds/beaglebone:green:usr1/brightness
error: Unable to write to /sys/class/leds/beaglebone:green:usr2/brightness
error: Unable to write to /sys/class/leds/beaglebone:green:usr3/brightness
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the provided blinkLED.js script with the BeagleBone Debian image, then inspect /sys/class/leds for the expected beaglebone:green:usr0 through usr3 entries. Compare those entries with the LED names bonescript uses; done means the USR LED operations work on the reported kernel or the incompatibility is clearly documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, linux
Domain
embedded-iot, operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.