App loader not working

Posted on
of 2
/ 2
  • Wed 2020.03.25

    This is an observation only.

    Ref post #12

    While I found the Puck.debug=3 setting a nice find, I receive a different output on my PC.

    <BLE> ERROR: NotFoundError: User cancelled the requestDevice() chooser.
    puck.js:362 <BLE> Device Name:       Bangle.js 157c
    puck.js:362 <BLE> Device ID:         dz/kKr6HEWvSHQN22FFfTg==
    puck.js:362 <BLE> Connected
    > Puck.debug=3

    Tried twice and waited five minutes.


    These work:
    E.showMessage("Hello","A Title")

    So in my case am connected and communicating via the WebIDE, but debug=3 doesn't render as suggested in:

    'never getting to the puck.js:362 Got service line - which is where the connected device is scanned for the 'services' is'

  • Wed 2020.03.25

    ref post #13    'If I go to chrome://bluetooth-internals, go to 'Devices' and click 'Start Scan' it finds 'Bangle.js 03ed'. Then if I click 'Inspect' it shows stuff, and then sits with a loading spinner in the 'Services' section. So, something does seem to be wrong with it scanning for services.'

    If this is any reassurance, I just loaded the internals page and attempt to click on the 'Inspect' link for my Bangle. Rather than populate the dialog box (I double checked the 6 hex address) with info on Bangle, the scan is for a completely different device!!

    Does the same thing happen on your inpsection?

    It does identify a previously paired but not connected Puck, and the same error condition applies there also.

    love this @Raik post #11 find:

    DfuTarg F0:93:94:0A:15:7D Unknown Unknown Not Connected InspectForget

    Bangle.js 157c F0:93:94:0A:15:7C Unknown Unknown Connected InspectForget

    not correct Status box - note incorrect address

    Name:  Unknown or Unsupported Device (0D:E6:DC:C9:EF:22)
    Address:  0D:E6:DC:C9:EF:22
    GATT Connected:  Not Connected
    Latest RSSI:  Unknown
    Services:  Unknown

    Starting to appear to be Chrome or 'internals' on Windows10

  • @Robin did you hit Enter after Puck.debug=3? Looks like you didn't to me :/

    It's probably best not to sidetrack this thread into a chrome://bluetooth-internals inspection.

    @Paul, stab in the dark here, but did you change any settings in the Bangle? Maybe change them all back to defaults. I seem to recall that if you turned HID on, that could cause some issues on Windows.

    I use an Intel Bluetooth radio here and it's fine, so that by itself isn't going to be the issue.

    I'm not sure if it's already been suggested, but have you tried:

    • Restarting the computer
    • Turning the computer's Bluetooth off and back on?
  • Wed 2020.03.25

    'did you hit Enter after Puck.debug=3?'

    I typed 'Puck.debug=3' then pressed the 'Enter' key.

    The console then inserted the output as shown, pushing down the 'Puck.debug=3' line, so that is the reason it appears after. I thought odd, so I performed a new tab instance test to confirm.

    Wasn't attempting to: 'best not to sidetrack this thread' and I indicated that in post #26 as an observation only, but providing detail to @Paul as in post #12 the comment was:

    'It's possibly something that you could report to the Chrome team.'

    which is unnecessary, as I am pointing out isn't needed, as the Chrome console outputs the same for me as it seems to be what Paul indicated. Mine works with not complete output, his fails. Never gets to:

    puck.js:362 <BLE> Got service

    either, but I can happily code, he can't connect.

    Google Chrome is up to date
    Version 80.0.3987.149 (Official Build) (64-bit)

    With reference to Chrome and internals, the 'Inspect' link isn't trustworthy for the output post #27 that is in error for the simple test I performed. That page also reports devices that aren't even there!! It is flawed. Don't rely on it!!

    I'm simply pointing out after the many tens of wasted hours over the last six months with intermittent BLE, and now we have three users reporting in the same thread.

    See post #21 Window10, Chrome and BLE, inconsistent, intermittent issues

  • Hmm. OK, so I found a Windows App called Bluetooth LE Explorer in the App Store.

    If I pair the Bangle to my Windows, and use Bluetooth LE Explorer to connect to the Bangle, everything looks fine (as far as I can tell), and it seems to be able to enumerate services:

    So, given that that's with the same laptop, same Windows, same Bangle, same Bluetooth adapter, that would tend to suggest that Chrome (or the Javascript) is the problem factor here.

    I don't suppose anyone for whom the web IDE works fine could see if Bluetooth LE Explorer gives the same services for their Bangle?

    Eg, I don't know if the 'AccessDenied' error for the HID service is relevant or not

    1 Attachment

    • 2020-03-26_15-46-57.png
  • Thr 2020.03.26

    Will do @Paul, but would be nice to see what 'enumerate services' we should compare. The DropBox link preview error 401

    I've uploaded images from local drive using 'Upload a file' link above 'Cancel' button.

    downloading now

    The link in #32 does show an image

    See upload below

    The only obvious item that sticks out is the shortened second characteristic.

    1 Attachment

    • BLE20200326BangleServices.png
  • 'enumerate services' we should compare.

    Can you not see the image I uploaded under "seems to be able to enumerate services:"? It looks fine to me

    Try this link instead?­g/2020-03-26_15-46-57.png

  • Thr 2020.03.26

    see ouput in post #31 and note the 'not connected' banner

    @Paul, note that I tried for ten minutes to get that BLE tool to 'Refresh' or 'Pair' with my Bangle, with no success. BLE is enabled in the Bangle device menu, tried turning off-on, tried restarting BLE app, but haven't rebooted PC, which I can't do just yet. I can use the native WebIDE and connect and upload code however. So, again another instance of different functionality, despite we have same Win10 OS version and same Chrome current update. Makes me laugh recalling the 'works on my machine' comment, yet obviously it isn't. I feel for you regarding this frustration, but there must be a logical answer we just haven't uncovered yet.

    Gordon mentioned in post #28 about turning off HID in the Bangle. Can we confirm?
    ref AccessDenied error within characteristic

    also note that the first .png in post #30 now is visible along with the additional image that was uploaded as an edit to that post

  • note that I tried for ten minutes to get that BLE tool to 'Refresh' or 'Pair' with my Bangle, with no success

    The UI is a bit confusing.

    Ignore the 'Pair' button. Click the square with the tablet/phone screen in it. Took me a few random clicks to find it :-) That square is a button, even though it doesn't look like it

    Note that (I think) you have to pair the Bangle with Windows first, using the standard Windows Bluetooth UI

    also note that the first .png in post #30 now is visible along with the additional image that was uploaded as an edit to that post

    Yeah, I was trying random things - they were all showing for me, but not, apparently, for you, so I didn't know what, if anything, would work ;-)

  • Gordon mentioned in post #28 about turning off HID in the Bangle. Can we confirm?
    ref AccessDenied error within characteristic

    I've tried it with HID turned on and off in the Bangle. Both are the same in the Web IDE (and both give the 'Access Denied' for the HID service in the Bluetooth LE Explorer)

    Oddly you don't have the HID service in yours at all. Maybe the 'access denied' in mine is what's upsetting the Web IDE?

  • Hmm. I think I've got somewhere.

    I did a 'Reset Settings' in the settings. Made no difference. The HID service still showed (no access) and the Web IDE etc failed.

    But then I did a 'reboot without loading any software', and, now, the Bluetooth LE Explorer doesn't show the HID service at all.

    AND, now, the Web IDE and app loader work fine... Including showing the correct debug output in the JS console.

    I did try doing the 'Rebooting without loading any software' previously, and that made no difference. Apparently resetting the settings first made a difference.

    Now, I can reboot it normally (loading all the default apps) and it still works fine.

    So, that's a result, but very odd. The settings were all what I thought they should be, and look to be the same now. Maybe there are some hidden settings which were wrong, which were fixed by the 'reset settings' and then a reboot.

    Not knowing the details of how things work, my guess is it may be that the unavailable HID service was upsetting the Windows Chrome Web BT, but the Android Chrome didn't care (your Android phone doesn't support a mouse, for instance), so didn't get upset by it. So, that's why Android worked, but Windows didn't.

  • Ok, great! Thanks for the update!

    So in your case it was to do with HID. It is possible there's some issue with the firmware not completely removing the HID service, but more likely what happens is:

    Windows 'claims' the HID device because it thinks it is a keyboard. It then stays connected, and Bangle.js can't remove the HID service because a device is connected to it, and it doesn't disconnect either. The two-button reset does a proper reset and kills the connection, allowing it to come up without HID.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview

App loader not working

Posted by Avatar for Paul @Paul