-
I used an nRF52-DK and the following but Windows 10 and chrome does not give a requester with the possibility to pair with the device
https://developer.mbed.org/teams/Bluetooth-Low-Energy/code/BLE_BatteryLevel/
https://googlechrome.github.io/samples/web-bluetooth/battery-level.htmlie a reference for if Windows 10 and Chrome and chrome://flags/#enable-experimental-web-platform-features does not give a promising result.
It is hoped for a "Owen you did it wrong: I got it to work" and life goes forward, or else another wait for the Windows Chrome BoT (Bluetooth of Things)
-
Chrome for windows has web ble http://forum.espruino.com/conversations/299715/
Except, it doesn't seem to work, so I need a reference machine.
Virtual Box Ubuntu. Ensure that the host Windows 10 is NOT using bluetooth, Devices->uninstall driver for bluetooth device and delete files.Then make sure that Virtual Box has Devices->USB->enable access to bluetooth adapter
However, nRF needs a certain type of adapter on all platforms it seems, not only windows.
So only supported on iPhone and Android as low energy and then it will work -
funny, after checking last night and working on "something else" this morning...
Windows 10 Chrome is ready to go for bluetooth.I play around for a while
chrome://flags/#enable-experimental-web-platform-features
Edit:
No sucess as yet with Web IDE https://www.espruino.com/ide/ no ports foundhttps://googlechrome.github.io/samples/web-bluetooth/ to check status of my Windows 10 chrome installation
Edit
https://googlechrome.github.io/samples/web-bluetooth/get-characteristics.html?service=device_information may be a "good test" puck.js doesn't show up in the pair list that Chrome presents in a requester
Even as DfuTarg, the puck.js does not appear, although in the ordinary windows show bluetooth, it apears as DfuTargEdit:
Double checked my puck.js with local installation of Web IDE and still working there when paired in Windows 10 OS -
Breadcrumbs
https://github.com/NordicSemiconductor/secure-dfu-web-bluetooth with Espruino as a package.json keyword leads to aError: No compatible USB Bluetooth 4.0 device found! at BluetoothHciSocket.bindUser (C:\Users\owen\source\repos\github\NordicSemiconductor\secure-dfu-web-bluetooth\node_modules\bluetooth-hci-socket\lib\usb.js:70:11)
A google on bluetooth-hci-socket gives a https://github.com/sandeepmistry/node-bluetooth-hci-socket
And a WIP which does not need any comments: I just edit this post to document for myself where the trail lead on Windows 10
Edit
The bluetooth in my device is supported:Intel Wireless Bluetooth 7265 0x8087 0x0a2a
Edit:
zadig did it's work: bluetooth not available to Windows 10, and hoping available for the node of thingsEdit:
Don't skip steps, go thru the doc and examples to make sure the base of DFU works when there, even if unnessary (DFU could work) time well spent
https://github.com/sandeepmistry/node-bluetooth-hci-socketEdit:
Ensure pre-req for node-bluetooth-hci-socket by doing https://github.com/nodejs/node-gyp#installation for WindowsEdit:
"Waiting for installers..." and have done for a long time. May have to bail out and cross fingers.Microsoft Windows [Version 10.0.14393] (c) 2016 Microsoft Corporation. All rights reserved. C:\WINDOWS\system32>npm install --global --production windows-build-tools > windows-build-tools@1.1.0 postinstall C:\Users\owen\AppData\Roaming\npm\node_modules\windows-build-tools > node ./lib/index.js Downloading BuildTools_Full.exe Downloading python-2.7.11.msi [============================================>] 100.0% of 18.64 MB (2.87 MB/s) Downloaded python-2.7.11.msi. Saved to C:\Users\owen\.windows-build-tools\python-2.7.11.msi. Starting installation... Launched installers, now waiting for them to finish. This will likely take some time - please be patient! Waiting for installers... \Successfully installed Visual Studio Build Tools. Waiting for installers...
Edit:
Bailed out but the following gave something I have to understand:owen@DESKTOP-O5H58VV MINGW64 /c/source/repos/github/sandeepmistry/node-bluetooth-hci-socket (master) $ node examples/le-connection-test.js data: 040e0402030c00, 7 bytes data: 040f0400020d20, 7 bytes
owen@DESKTOP-O5H58VV MINGW64 /c/source/repos/github/sandeepmistry/node-bluetooth-hci-socket (master) $ node examples/le-scan-test.js data: 040e04000c200c data: 040e04000b2000 LE Scan Parameters Set data: 040e0402030c00 data: 040e04020c2000 LE Scan Enable Set
owen@DESKTOP-O5H58VV MINGW64 /c/source/repos/github/sandeepmistry/node-bluetooth-hci-socket (master) $ node examples/le-advertisement-test.js isDevUp = false write: 010a200100 write: 0106200fa000a0000000000000000000000700 write: 01092020190909657374696d6f74650e160a182eb8855fb5ddb601000200000000000000 write: 010820201e0201061aff4c000215b9407f30f5f8466eaff925556b57fe6d00010002b600 write: 010a200101 data: 040e04000a200c data: 040e0400062000 LE Advertising Parameters Set data: 040e0401092000 LE Scan Response Data Set data: 040e0400082000 LE Advertising Data Set data: 040e0402030c00 data: 040e04020a2000 LE Advertise Enable Set
Edit:
owen@DESKTOP-O5H58VV MINGW64 /c/source/repos/github/NordicSemiconductor/secure-dfu-web-bluetooth (master) $ npm install ../../sandeepmistry/node-bluetooth-hci-socket/ $ npm install
Edit:
Coffee time and find out what it all means
Although, I could maybe use an nRF52-DK to solve my case, it requires the device and no "solution" for others that do not have a device to use.owen@DESKTOP-O5H58VV MINGW64 /c/source/repos/github/NordicSemiconductor/secure-d fu-web-bluetooth (master) $ npm test > secure-dfu@0.0.0 test C:\source\repos\github\NordicSemiconductor\secure-dfu-web-bluetooth > mocha --reporter spec (node:10904) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): requestDevice error: adapter not enabled [#file_utils](https://forum.espruino.com/search/?q=%23file_utils) 1) should un-zip test_resources/dfu_test_app_hrm_s132.zip and print it's contents. 2) should parse the manifest.json file passed to it and return a json object. (node:10904) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 3): Error: ENOENT: no such file or directory, open 'C:\source\repos\github\NordicSemiconductor\secure-dfu-web-bluetooth\tmp\manifest.json' (node:10904) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 4): Error: ENOENT: no such file or directory, open 'C:\source\repos\github\NordicSemiconductor\secure-dfu-web-bluetooth\tmp\nrf52832_xxaa.dat' 3) should parse a .bin / .dat file into an array of bytes. Checks that the first and last bytes are correct. [#index](https://forum.espruino.com/search/?q=%23index) -- NOTE: requires nRF52 device running secure_dfu_secure_dfu_ble_s132_pca10040_debug.hex in range of computer. 4) should test littleEndian. √ should test littleEndianUInt32. (node:10904) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 6): requestDevice error: adapter not enabled 5) should succesfully scan for, connect to, and discover the services/characteristics of the DFU target device. 6) should succesfully enable notifications on the control point characteristic. 7) should send create command. 1 passing (4s) 7 failing 1) [#file_utils](https://forum.espruino.com/search/?q=%23file_utils) should un-zip test_resources/dfu_test_app_hrm_s132.zip and print it's contents.: Error: ENOENT: no such file or directory, lstat 'C:\source\repos\github\NordicSemiconductor\secure-dfu-web-bluetooth\tmp' at Error (native) at Object.fs.lstatSync (fs.js:982:18) at Context.it (test\test.js:16:15) 2) [#file_utils](https://forum.espruino.com/search/?q=%23file_utils) should parse the manifest.json file passed to it and return a json object.: Uncaught SyntaxError: Unexpected token u in JSON at position 0 at Object.parse (native) at ReadFileContext.fs.readFile [as callback] (utils\file_utils.js:37:20) at FSReqWrap.readFileAfterOpen [as oncomplete] (fs.js:365:13) 3) [#file_utils](https://forum.espruino.com/search/?q=%23file_utils) should parse a .bin / .dat file into an array of bytes. Checks that the first and last bytes are correct.: Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. 4) [#index](https://forum.espruino.com/search/?q=%23index) -- NOTE: requires nRF52 device running secure_dfu_secure_dfu_ble_s132_pca10040_debug.hex in range of computer. should test littleEndian.: AssertionError: expected '0,1,2,3' to equal '3,2,1,0' + expected - actual -0,1,2,3 +3,2,1,0 at Context.it (test\test.js:47:31) 5) [#index](https://forum.espruino.com/search/?q=%23index) -- NOTE: requires nRF52 device running secure_dfu_secure_dfu_ble_s132_pca10040_debug.hex in range of computer. should succesfully scan for, connect to, and discover the services/characteristics of the DFU target device.: Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. 6) [#index](https://forum.espruino.com/search/?q=%23index) -- NOTE: requires nRF52 device running secure_dfu_secure_dfu_ble_s132_pca10040_debug.hex in range of computer. should succesfully enable notifications on the control point characteristic.: TypeError: Cannot read property 'controlPointCharacteristic' of undefined at Context.it (test\test.js:106:41) 7) [#index](https://forum.espruino.com/search/?q=%23index) -- NOTE: requires nRF52 device running secure_dfu_secure_dfu_ble_s132_pca10040_debug.hex in range of computer. should send create command.: TypeError: Cannot read property 'controlPointCharacteristic' of undefined at Context.it (test\test.js:120:30) npm ERR! Test failed. See above for more details.
Edit
puck.js DF:F5:A5:EC:43:1B Returning to Zadig and waiting for a system restoration pointEdit:
https://github.com/sandeepmistry/node-bluetooth-hci-socket/pull/54Edit:
Getting to nobel, and make sure one see's a video
https://www.youtube.com/watch?v=mL9B8wuEdms
Edit:
All pre-req met and using Zadig (again)
https://github.com/nodejs/node-gyp#installation
https://github.com/sandeepmistry/nobleEdit:
noble failure, no adapter, regress to https://github.com/sandeepmistry/node-bluetooth-hci-socket and ensure simple stepsEdit:
noblerm -fr npm_modules npm install <path to hci> npm install
And ....
C:\source\repos\github\sandeepmistry\noble>node examples\advertisement-discovery.js peripheral discovered (dff5a5ec431b with address <df:f5:a5:ec:43:1b, random>, connectable true, RSSI -70: hello my local name is: Puck.js 431b can I interest you in any of the following advertised services: ["6e400001b5a3f393e0a9e50e24dcca9e"]
Edit:
This is probably bad and I have to find a way to update the puck.js (where I started)C:\source\repos\github\sandeepmistry\noble>node examples\advertisement-discovery.js (no reply with battery off, button, battery on, green, release button, red)
-
I can confirm https://www.nordicsemi.com/eng/Products/Bluetooth-low-energy/nRF-Connect-for-desktop :
- on windows, the nRF connect is an electron app, asar package
- on ubuntu/linux, the nRF connect is an electron app, luckly not asar: pack out and cherry pick js
- on OS X, I have not enough money for an apple :)
It seems the techy aspects of bluetooth with browser is Wait for Chrome but does that give the techy "serialized softdevice commands" with two outcomes:
- puck.js can only be updated by an android/iPhone app that is not within Espruino control (no windows possible)
- something may work in windows os: but don't hold yr breath timeframes and possibilities are unknown
Roll on Windows Desktop on Canonical Ubuntu: Xenix returns, with possible internal MS project name "Phoenix": but this is outside of the problem at hand.
Edit: package.json
"author": "Nordic Semiconductor ASA", "license": "Proprietary",
Edit:
A lot of code on Nordics github and unknown if "what is needed" is there.Edit:
DFU seems to be https://github.com/NordicSemiconductor/secure-dfu-web-bluetooth
with a keyword Esruino in the package.json - on windows, the nRF connect is an electron app, asar package
-
-
-
nRF Connect v1.1: no support for Windows 10 without a dongle
so looks like I have to find an android or iThingy in the cupboard: no problemHi,
Yes, nRF Connect v1.1 does support connection to BLE devices on
Windows 10, but it does require a nRF51/52 DK/dongle for
communication. Built-in BLE HW will not work as nRF Connect relies on
serialized softdevice commands and not HCI.Look at the documentation in our inforcenter.
Best Regards,
Martin
Edit:
Probably something like this https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v12.0.0%2Flib_serialization.html -
I have spent all day holding the top green board (mostly cos I have problems) but the size of a shield seems right
It is a bit bigger than the ORIGINAL ESPRUINO 54mm x 41mm (2.2in x 1.6in - half business card)If I am write in Gordon wants the PCB as the same size as a shield with arduino pinouts
And if the area that is not with connector pins is a prototype area, I can allways break it of to make it square for a cubebit.js :)
-
nRF Connect v1.1 is available for windows but seems not to support bluetooth
https://www.nordicsemi.com/eng/Products/Bluetooth-low-energy/nRF-Connect-for-desktop (anyone can download)
http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.tools%2Fdita%2Ftools%2FnRF_Connect%2FnRF_Connect_intro.html&cp=4_2
It is not possible to click "Start Scan" on my machine :(I have made a case at nordicsemi
https://www.nordicsemi.com/index.php/eng/supportcase/view/34266 -
As a newbie, I presumed the GUI would update the device, clearer indication that the puck.js is not flasher-able: so very easy as the receiver of a puck.js just to look thru the GUI and think "great, flasher" (until one reads what is clearly written)
Better yet, use the info from "Request board details on connect" and allow for specific menu/dialogs in question with Flasher. (I will remember to make an issue of this)
-
- nRF Connect v1.1 for windows does not allow me to use "Start Scan"
- the puck.js apears as DfuTarg on Windows when put into the correct mode.
I try and do forum scans at nordic/google.
https://devzone.nordicsemi.com/question/94468/nrf-connect-for-windows-10/
Evidence of problems before the so called anniversity version of windows 10https://devzone.nordicsemi.com/question/95258/nrf-toolbox-doesnt-work-properly-on-windows-phone/
Funny how windows phone turns people offmy case at nordicsemi
https://www.nordicsemi.com/index.php/eng/supportcase/view/34266 - nRF Connect v1.1 for windows does not allow me to use "Start Scan"
-
-
-
-
The code "works" ie it give me some nice LED's
The problem is, it stops working after a time.// our main function function puckLeds(){ let leds= 0; let timerId = null; digitalWrite([LED3,LED2,LED1], leds); // watch for the Big Red Button setWatch(function() { if ( timerId !== null){ clearTimeout(timerId); } leds = (leds + 1)%7; digitalWrite([LED3,LED2,LED1], leds); timerId = setTimeout(function () { digitalWrite([LED3,LED2,LED1], 0); }, 10000); }, BTN, {edge:"falling", debounce:100, repeat:true}); } // ensure that the code is available after reload or whatever E.on('init', function() { console.log("hello"); puckLeds(); }); save();
Edit after input below.
Placement of pulldown did not seem to work
pinMode(BTN,"input_pulldown");function puckLeds(){ let leds= 0; let timerId = null; digitalWrite([LED3,LED2,LED1], leds); setWatch(function() { // pinMode(BTN,"input_pulldown"); if ( timerId !== null){ clearTimeout(timerId); } leds = (leds + 1)%7; digitalWrite([LED3,LED2,LED1], leds); timerId = setTimeout(function () { digitalWrite([LED3,LED2,LED1], 0); }, 10000); }, BTN, {edge:"falling", debounce:100, repeat:true}); pinMode(BTN,"input_pulldown"); } E.on('init', function() { console.log("hello"); puckLeds(); }); save();
-
-
Arduino footprint
Yep: a pcb with full footprint with some thought to allow for a reduced pcb by reuse of a well thought out placement of components in relation to the risers on the board.
Any cubebit.js ideas can buy (some of) the stuff from espruino and tailer to own wishes.
The pic is posted before somewhere, but shows that when one has something in the hand to look at, one can better feel what is right.I make a cardboard mock up for myself of the size of a cubebit.js and maybe makes some schematic/pcb with the only intension being to see if things look right.
Edit:
Of course, the pdb should give value in comparison to the nRF52-dk which has a known price with pros/cons in order to achieve "bottom dollar" for espruino -
Arduino footprint has many merits : I am evaluating on the nRF52-DK.
However, it could be "nice" for a tight PCB with the io bought out into an easy expansion.
It could be nice to have a smaller Arduino io footprint if possible: the shield is quite big and a tight PCB is definable as small if this is what one wants.
I have to look thru the different versions of a standard Arduino footprint to see if there is enough on a smaller footprint ie tighter PCB -
Honestly I'd like to keep the PCB as simple as possible -
I agree, a PCB that just works.
But can a PCB just work and allow for something else with a layered design of building blocks.ie whatever Gordon is comfortable is the best, and whatever happens can happen if more comfortable with whatever is created.
-
node.js on windows is not painful : one just has to do it correctly :)
nw.js was under my radar and I have to do a "catch up" in the area: I think that Gordon is usually right, so my "catch up" has to hurry up.
electron is no bed of roses: I take Gordons comments very seriously.
Background information:
All the kids in the local council are getting chrome books, the same devices they will use when I do volunteer teaching so I need "problem free" usage: I take Gordons comments very seriously.In general, I focus on Windows problem free usage (teachers) and will be doing chromebook (pupils) analysis so the kids can play and learn with teachers that can also follow what they are doing.
-
And another forum ;)
https://thethingsnetwork.slack.com/archives/hardware/p1486094789001000 -
The 9250 was in my sights until someone recommended the bosh
https://github.com/NordicSemiconductor/nrf52-quadcopter
Thank you puck, yes, I am VERY intrested