theoctal / octalbonescript

A more stable, continuously tested and better node.js library for scripting your BeagleBone
MIT License
57 stars 9 forks source link

Error reading directory /sys/devices/platform/ocp #52

Closed elimbaum closed 8 years ago

elimbaum commented 8 years ago

I just installed octalbonescript and can't get it to work.

Even the following barebone program:

 var obs = require('octalbonescript');

throws

Error reading directory /sys/devices/platform/ocp

/var/lib/cloud9/node_modules/octalbonescript/lib/bone.js:182
                throw new verror(err2, 'Unable to read from CapeMgr slots');
                      ^
VError: Unable to read from CapeMgr slots: ENOENT, no such file or directory '/sys/devices/platform/bone_capemgr/slots'
    at onReadSlots (/var/lib/cloud9/node_modules/octalbonescript/lib/bone.js:182:23)
    at readSlots (/var/lib/cloud9/node_modules/octalbonescript/lib/bone.js:176:13)
    at Object.module.exports.load_dt_sync (/var/lib/cloud9/node_modules/octalbonescript/lib/bone.js:167:9)
    at Object.<anonymous> (/var/lib/cloud9/node_modules/octalbonescript/index.js:31:12)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)

Shouldn't we be looking at bone_capemgr.9, not bone_capemgr? ocp is also nonexistent on my operating system, as mentioned above. Do I need to run some setup command prior to using OBS?

I'm using a fresh install of the most recent BBB OS.

adityapatadia commented 8 years ago

Hi, it's likely that you are running kernel 3.8. New OBS v1.1.1 was released yesterday to be compatible with kernel 4.1. If you have to use 3.8 kernel, you should use v1.0.x of OBS. You can also upgrade to latest 4.1 kernel by installing debian 8.2 as described in readme.