Skip to content

Irrecord error #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Aurimaslu opened this issue May 12, 2014 · 8 comments
Closed

Irrecord error #2

Aurimaslu opened this issue May 12, 2014 · 8 comments

Comments

@Aurimaslu
Copy link

How fix this error:
irrecord: could not get file information for /dev/lirc
irrecord: default_init(): No such file or directory
irrecord: could not init hardware (lircd running ? --> close it, check permissions)

I try launch this code:
var IRRecord = require('infrared').irrecord;

var irrecord = new IRRecord();
irrecord.on('stdout', function(data) {
console.log(data);
});
irrecord.on('stderr', function(data) {
console.log(data);
});
irrecord.on('exit', function() {
// handle exit event
});
irrecord.start('remote', {disable_namespace: true});

@paulgration
Copy link
Owner

This looks like the standard output from irrecord when it can access the device. Does /dev/lirc definitely exist? And does the user account that is running node have access to the device? I think it would only need rw access.

@Aurimaslu
Copy link
Author

No, its not exist /dev/lirc only /dev/lirc0. Yes i have access.

@paulgration
Copy link
Owner

Running 'irrecord -d /dev/lirc -n' from the command line, you are able to produce the same error I assume?
If your device is recognised as /dev/lirc0 then when you initialise the IRRecord object you would specify the device in the settings argument passed to it:

var irrecord = new IRRecord({device: '/dev/lirc0'});

@Aurimaslu
Copy link
Author

I got this: irrecord: invalid argument count after: irrecord -d /dev/lirc -n. And i got new error, but i think this better:
irrecord: file "remote" does not contain valid data

@paulgration
Copy link
Owner

irrecord -d /dev/lirc -n nameofremotefile

@Aurimaslu
Copy link
Author

irrecord: could not get file information for /dev/lirc
irrecord: default_init(): No such file or directory
irrecord: could not init hardware (lircd running ? --> close it, check permissions)

@paulgration
Copy link
Owner

So either /dev/lirc doesn't exist, perhaps it is /dev/lirc0 or your account doesn't have permissions to access it so you could try as root with sudo?

@Aurimaslu
Copy link
Author

i try with sudo. Maybe i should set some settings or create file, because i install only lirc and node-infrared and then try your code get receive event.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants