If you are working with Intel Edison then you must have already discovered that getting bluetooth to work in any sensible way in Edison is just a dead end. More so, if you are looking for a workaround with Node.js or node-red.
After hours of trail and errors, I could get it to work. So I am crating this page. Hope it saves someone’s precisous time!
I would tell you the logic first. Intel Edison Bluetooth does not have a Serial port service which is important for phone-Edison communication. Intel has a Python script that provides Serial port service. A mod of this python script was written to write the data to a named pipe which could then be read from programs like Arduino.
Now we install websocket and ws ( a client) with npm to enable Node.js to work with websockets. Using websocket client we listen to our deamon server.
Don’t get afraid. Steps aren’t too complicated. It works like a charm.