sivann-tw / hiver-iot-kit-ble

this is a quick start sample codes for hiver ble modules using ble-shepehrd.js
MIT License
0 stars 2 forks source link

Error: "toString()" failed #1

Open mochechan opened 7 years ago

mochechan commented 7 years ago

The following error msg sometimes occurs without keying in any option [1-4].

Hiver IoT starter Kit for BLE Application.

hiver-iot-kit-ble v:1.0.0 plugin-meter-relay v:1.0.0 plugin-gassensor v:1.0.1 plugin-weatherstation v:1.0.0 plugin-remotecontrol v:1.0.0 BLE Module Demo Option Menu.

   1.  Power Meter Relay       
   2.  Weather Station         
   3.  Gas Alarm               
   4.  Remote Controller       

Please key in your option [1-4] and hit enter:

  _____              __      __                  
 / ___/ __  ___  ___/ /____ / /  __ __ ___       
/ (_ // _ \/ _ \/ _  //___// _ \/ // // -_)   
\___/ \___/\___/\_,_/     /_.__/\_, / \__/ 
                               /___/             

>>> This is a simple demonstration of how the shepherd works.
>>> Please visit the link to know more about this project:   
>>>   https://github.com/bluetoother/ble-shepherd

/home/pi/hiver-iot-kit-ble/node_modules/nedb/lib/datastore.js:77 if (err) { throw err; } ^

Error: "toString()" failed at Buffer.toString (buffer.js:495:11) at tryToString (fs.js:451:15) at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:442:12)

EasonChangOP commented 7 years ago

Which one did you use to run this program, MAC or raspberry? It's fine with raspberry. Could you describe how this condition happened for more detail? HW, OS, node version? Did you use sudo node app.js to run without modification the program?

mochechan commented 7 years ago

Linux raspberrypi 4.4.38-v7+ #938 SMP Thu Dec 15 15:22:21 GMT 2016 armv7l GNU/Linux