-
• #2
Have you updated your firmware? As it comes the Puck.js firmware had some issues keeping the pulldown resistor on the button.
-
• #3
No update: as supplied to ensure I know what gets supplied to my friends if they order one :)
I update it via the GUI. -
• #4
Or RTFM and find it is not via GUI :)
And find that "FIRMWARE UPDATES" has no info for windows (I create PR if wished)."FIRMWARE UPDATES" could do with a quick link instead of reading down the page.
I use the already installed sw for windows and give it a go.
-
• #5
OK: you are going to love this ...
I only have a Windows mobile and a Windows PC.
nRF Connect v1.1 for Windows needs to be googled more: doesn't seem to have bluetooth, just usbI get back on this one.
-
• #6
- 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"
-
• #7
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)
-
• #8
I presumed the GUI would update the device
It will do eventually - however I'm waiting for:
- Chrome to implement Web Bluetooth for Windows (which they will do soon hopefully)
- Nordic to implement a Secure Firmware update for Web Bluetooth - which they also say they're doing
I don't mention Windows because I don't believe the Nordic tools offer it for Windows yet - at least not unless you have an nRF-DK. I did ask them if it were possible and they said they might look into it.
use the info from "Request board details on connect" and allow for specific menu/dialogs in question with Flasher.
This is exactly what the IDE does for other boards, but I've turned it off for now because it'll just annoy everyone if they can't update with the IDE.
If you want to fix it without a firmware update, just add
pinMode(BTN,"input_pulldown")
aftersetWatch
- Chrome to implement Web Bluetooth for Windows (which they will do soon hopefully)
-
• #9
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 -
• #10
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 -
• #11
but it does require a nRF51/52 DK/dongle for communication
Since you have an nRF52DK you could just use that?
-
• #12
Yep: that was what I was thinking (also thinking of comments concerning uses of a nRF52X PCB :) from Espurino)
-
• #13
And that it looks like the nRF Connect is a node product with an nRF core js
-
• #14
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
3 Attachments
- on windows, the nRF connect is an electron app, asar package
-
• #15
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)
-
• #16
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
2 Attachments
-
• #18
Thank you puck, yes, I am VERY intrested
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"]
-
• #19
Using the nRF52-DK as a bluetooth "proxy" from Windows 10.
puck.js now works with init and leds
Only problem now is my 8yr old daughter keeps steeling puck to play with
1 Attachment
The code "works" ie it give me some nice LED's
The problem is, it stops working after a time.
Edit after input below.
Placement of pulldown did not seem to work
pinMode(BTN,"input_pulldown");