Saving on 1v91 and pairing on 1v92 with windows 10 #2236
Replies: 20 comments
-
Posted at 2017-06-16 by @gfwilliams What actually happens when you type As a sanity check, can you run this on the Puck that's having trouble?
It'll clear out any saved code, but also the bonding region (which might be causing problems after the 1v92 update) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-06-16 by Boydy Before running that flash code it was writing to the terminal noticeably slower. Now it is speedy and the save function works! Thank you. Does 1v91 support the HID on windows? It was doing nothing when I typed save() before. Completely froze up. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-06-16 by @gfwilliams Wow, strange about the crash. Were you doing anything strange before that you think could have caused this?
No, but now you've run that code, 1v92 may well work just fine.
It depends on what firmware you have...
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-06-16 by Boydy OK so i tried updating the firmware from 1v91 to 1v92 and as soon as it was done uploading three leds are blinking at me. I won't connect now. I tried re-flashing 1v92 but the three lights persist. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-06-16 by Boydy At the moment I am using this code and the winnus library on nodejs to connect throught the bluetooth in a crude way to send key commands to demonstrate the capability of the puckjs for our application. Puckjs code
Nodejs code:
Obviously not an ideal solution. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-06-16 by Boydy Ok so i figure out that the three light flashing when I upgraded the firmware is occuring with this code loaded:
But with my other code that I posted there were no lights flashing at me. When I loaded this code with 1v92 it then tried to re-pair with windows it fails and the light stopped blinking on the puck. And I get the error "Try connecting your device again." It won't re pair no matter what mode I put it in on 1v92. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-06-16 by @gfwilliams I'm not sure I understand exactly what happens with what code and what firmware... When you upload this code on 1v92:
did you type |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-06-16 by @gfwilliams Also, can you try running 1v92, then copy/pasting this code on to the left-hand side of the ide again:
and then uploading your last bit of code and |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-06-16 by Boydy Sorry Gordon I am mixing in three different issues. 1st issue was the not saving issue which was fixed with the Flash code. 2nd issue was the pairing issue when i'm using the 1v92 code pairing with windows 10. It just won't pair no matter what I do. This is the real issue for me. 3rd issue was something I noticed when upgrading from 1v91 to 1v92 that made the 3 lights blink. When I had the HID code loaded on 1v91 and then upgraded to 1v92 it made the 3 lights blink continuously. Not really a big problem if the code isn't loaded when upgrading firmware. All three are I think are independent of each other. I will have to wait till Monday to give it a try as I left everything at the office. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-06-19 by @gfwilliams Ahh - right. Hopefully that code above might help with the pairing. I've got an issue open in GitHub at the moment to make the new firmware image wipe existing code - so hopefully with the upgrade to 1v93 you won't get that. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-06-19 by Boydy That definitely sounds like the right strategy, starting from a known state. I ran the flash in code #9 and loaded the new firmware, then ran the code again and initially eveything was ok. It paired after being un-paired everything worked as expected, yay. Then I loaded the HID code in #8 and then un-paired and re-paired, everything seemed to be working it appeared as a keyboard device but I tested it and the button was not registering key commands. Un-paired it and tried to repair but this time it wasn't re-pairing, damn. Seems to be something to do with being a HID device. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-06-19 by @gfwilliams Got it I think. You're doing:
but
There is no concept of upper of lower case keys - just a letter itself, and then whether you apply the SHIFT modifier itself. Confusingly If you upload the modified code then it might start working? Failing that, please could you try using the HID example unmodified, direct from the website in case there's something I missed? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-06-19 by Boydy Ah yep that is likely the reason it didn't register when it did connect. But I just can't connect 1v92 reliably to windows 10. My procedure:
Didn't even get to the part where I upload the HID code. What am I doing wrong?Attachments: |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-06-19 by @gfwilliams Are you sure the IDE itself has disconnected? It could be it's still hanging on to the connection? After you run the flash code, could you try resetting the puck? So just lift the edge of the battery a bit and when you release it the red LED should flash. Since you're basically deleting all the saved data, it's possible that the Puck's software gets confused when you then try and pair straight away. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-06-19 by Boydy ahah! Yes the IDE was holding on to the connection. So now it connects with 1v92. And I am now trying the HID software from your example:
NB the device is not appearing in the list of keyboard devices Attachments: |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-06-19 by Boydy Also tried resetting the puck with no differences, and turning the bluetooth off and on. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-06-19 by Boydy If I reconnect to the device using the WEB IDE then push the button I get this error:
This should be normal through as the HID is not enabled if it is not connected as a HID device. unpairing, re-pairing doesn't enable it. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-06-19 by @gfwilliams Ahh, ok - the code you posted (with Also, as before - you need to reboot after running the flash code. But hopefully now it's done you'll have no need for it. Try:
it's different from the example (as it initialises stuff in
I've literally just tried it here and it works for me. If you wanted to use the BLE example code you should be able to do the same steps without typing |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-06-19 by Boydy It works! Thank you for your help! So the way it runs is different when it is saved vs just uploaded ? I'm guessing the onInit function is called on start up of the device, but not called if just uploaded. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-06-19 by @gfwilliams Great! Yes, that's the idea. Normally, you upload to RAM and When you type Ideally it should reload all the HID stuff (the call to |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-06-16 by Boydy
Hello,
I have 3 puckjs devices that I am experimenting with but I have having issues with the new releases of firmware.
1v91 - Can't save any program by typing "save()" into the terminal using the Espruino Web IDE.
1v92 - Won't connect to windows 10 if un-paired and re-paired.
I am using nRF Toolbox on iOS to update the firmware and using the "espruino_1v91_puckjs.zip" and "espruino_1v92_puckjs.zip" firmwares.
None of these issue present themselves on the two puck devices that are running 1v88. Just the one I have been changing the firmware on.
Ideally I want to be running 1v92 so that I can use the pucks as a keyboard button. But 1v88 doesn't support windows HID.
Beta Was this translation helpful? Give feedback.
All reactions