Open Yu-b opened 7 years ago
It is great to have example code to start with. I too am new to a lot of this and am racing to try to learn the various types of languages and interfaces. I have been able to do a fair amount with the bluefruit via the arduino ide, and am familiar with visual studio, but have never used node.js.
I installed and followed all the instructions, however I get a ton of errors when I run npm install in the soruce directory. The error says it fails on "node-gyp rebuild" Below is the output when trying npm install.
After I can at least get it to compile and run on windows 10, I will start looking at the code to see if I can update it to my needs. What I really want is just a simple UART interface, of which I'm most familiar with Visual Studio C++ / C# and have been able to do arduino interface programs via the serial port.
Thanks for any help you can provide,
`D:\ble>npm install
nslog@2.0.0 install D:\ble\node_modules\nslog node-gyp rebuild
D:\ble\node_modules\nslog>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
main.cc
nslog_win.cc
win_delay_load_hook.cc
d:\ble\node_modules\nan\nan_new.h(34): warning C4996: 'v8::Value::ToInt32': was declared deprecated (compiling source file ..\src\main.cc
) [D:\ble\node_modules\nslog\build\nslog.vcxproj]
c:\users\zac.node-gyp\6.10.3\include\node\v8.h(8202): note: see declaration of 'v8::Value::ToInt32' (compiling source file ..\src\main
.cc)
d:\ble\node_modules\nan\nan_new.h(39): warning C4996: 'v8::Value::ToUint32': was declared deprecated (compiling source file ..\src\main.c
c) [D:\ble\node_modules\nslog\build\nslog.vcxproj]
c:\users\zac.node-gyp\6.10.3\include\node\v8.h(8196): note: see declaration of 'v8::Value::ToUint32' (compiling source file ..\src\mai
n.cc)
d:\ble\node_modules\nan\nan_implementation_12_inl.h(49): warning C4996: 'v8::BooleanObject::New': was declared deprecated (compiling sour
ce file ..\src\main.cc) [D:\ble\node_modules\nslog\build\nslog.vcxproj]
c:\users\zac.node-gyp\6.10.3\include\node\v8.h(4008): note: see declaration of 'v8::BooleanObject::New' (compiling source file ..\src\
main.cc)
d:\ble\node_modules\nan\nan_implementation_12_inl.h(166): warning C4996: 'v8::ScriptCompiler::Compile': was declared deprecated (compilin
g source file ..\src\main.cc) [D:\ble\node_modules\nslog\build\nslog.vcxproj]
c:\users\zac.node-gyp\6.10.3\include\node\v8.h(1355): note: see declaration of 'v8::ScriptCompiler::Compile' (compiling source file ..
\src\main.cc)
d:\ble\node_modules\nan\nan_implementation_12_inl.h(173): warning C4996: 'v8::ScriptCompiler::Compile': was declared deprecated (compilin
g source file ..\src\main.cc) [D:\ble\node_modules\nslog\build\nslog.vcxproj]
c:\users\zac.node-gyp\6.10.3\include\node\v8.h(1355): note: see declaration of 'v8::ScriptCompiler::Compile' (compiling source file ..
\src\main.cc)
d:\ble\node_modules\nan\nan_implementation_12_inl.h(205): warning C4996: 'v8::String::NewFromOneByte': was declared deprecated (compiling
source file ..\src\main.cc) [D:\ble\node_modules\nslog\build\nslog.vcxproj]
c:\users\zac.node-gyp\6.10.3\include\node\v8.h(2336): note: see declaration of 'v8::String::NewFromOneByte' (compiling source file ..\
src\main.cc)
d:\ble\node_modules\nan\nan_implementation_12_inl.h(217): warning C4996: 'v8::String::NewExternal': was declared deprecated (compiling so
urce file ..\src\main.cc) [D:\ble\node_modules\nslog\build\nslog.vcxproj]
c:\users\zac.node-gyp\6.10.3\include\node\v8.h(2373): note: see declaration of 'v8::String::NewExternal' (compiling source file ..\src
\main.cc)
d:\ble\node_modules\nan\nan_implementation_12_inl.h(237): warning C4996: 'v8::ScriptCompiler::CompileUnbound': was declared deprecated (c
ompiling source file ..\src\main.cc) [D:\ble\node_modules\nslog\build\nslog.vcxproj]
c:\users\zac.node-gyp\6.10.3\include\node\v8.h(1336): note: see declaration of 'v8::ScriptCompiler::CompileUnbound' (compiling source
file ..\src\main.cc)
d:\ble\node_modules\nan\nan_implementation_12_inl.h(244): warning C4996: 'v8::ScriptCompiler::CompileUnbound': was declared deprecated (c
ompiling source file ..\src\main.cc) [D:\ble\node_modules\nslog\build\nslog.vcxproj]
c:\users\zac.node-gyp\6.10.3\include\node\v8.h(1336): note: see declaration of 'v8::ScriptCompiler::CompileUnbound' (compiling source
file ..\src\main.cc)
D:\ble\node_modules\nan\nan.h(262): error C2995: 'v8::LocalC:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe
failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:276:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Windows_NT 10.0.14393
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd D:\ble\node_modules\nslog
gyp ERR! node -v v6.10.3
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install"
npm ERR! node v6.10.3
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! nslog@2.0.0 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the nslog@2.0.0 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the nslog package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs nslog
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls nslog
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request: npm ERR! D:\ble\npm-debug.log`
same here, kurento libs trigger the error
Hi ! I've been able to connect my ble device with your software. I m trying to interact with my device directly through the console terminal with noble, but I ve not been able to succeed so far ...
Could you please provide the minimal code necessary to recognize ble devices and establish connection ?
That would help me a lot !!!