Hi.
I have a BBB rev C, with Debian 8.3, kernel 4.1.15-ti-rt-r40. I am logged in as a regular user (not root). I loaded BB-UART1 overlay, to activate UART1 (tried to load cape-universal first, then apply BB-UART1, but could not do it both, so I have settled to BB-UART1). I have installed minicom, and uart works just fine (tested with link to a PC, via FTDI cable).
I wrote a script to check the UART, using Cloud9 editor on BBB. the Code follows:
//****************************
var uart1var = require("bonescript");
var port = '/dev/ttyO1';
var options = {
baudrate: 9600
};
uart1var.serialOpen(port, options, onSerial);
uart1var.serialWrite(port,'TEST');
function onSerial(x) {
if (x.err) {
console.log('***ERROR*** ' + JSON.stringify(x));
}
if (x.event == 'open') {
console.log('***OPENED***');
}
if (x.event == 'data') {
console.log(String(x.data));
}
}
//***********************************
When I run the script I get <***ERROR*** {"err":"Kernel does not include CapeMgr module"}>, and I don/t know why. Any ideas where to look and what to do?
Do I need to run a "
npm install -g serialport"? I understand that bonescript uses the same library, and is already installed.
If there is need for more info regarding the configuration of BBB, just say and will be done.
PS. The BBB will be a remote machine, so all configuration must be loaded at boot or run by scripts at boot by a regular user (not root). The script containing the code for UART will also be running automatically, and serve a web page, using
socket.io (the
socket.io part seems to work fine).