enocean-js / node-enocean

an enocean implementation for node.js
GNU General Public License v2.0
29 stars 14 forks source link

support for ttyS0 on raspberry pi 3 #24

Closed nemr closed 7 years ago

nemr commented 7 years ago

Hello ,

Thanks again for providing this great npm .

It worked perfectly on my raspberry pi when I used the EnOcean USB dongle and accessed the data through ttyUSB0

However , I currently trying to use the enocean pi . I'm using raspberry pi 3 , therefore the ttyAMA0 is used the the built in BLE . So the the EnOcean pi is on ttyS0.

I tested the basic code which is :

var enocean      = require("node-enocean")();
enocean.listen("/dev/ttyS0");
enocean.on("data",function(data){   
    console.log(data)
});

it only works for a few seconds and then doesn't console log any thing after that . Any ideas for why this is happening ?

nemr commented 7 years ago

turned out I had to add the following in the pi config using this command : $ sudo nano /boot/config.txt add : force_turbo=1