Avatar for migsanvi

migsanvi

Member since May 2019 • Last active Aug 2019
  • 3 conversations
  • 18 comments

Most recent activity

  • in Puck.js, Pixl.js and MDBT42
    Avatar for migsanvi

    Yes! everything works correctly in the Puck.js and the MDBT42Q module (updated to firmware version 2v03.32)

    When the Puck-js runs out of battery, I just have to turn off the bluetooth on the TELO 580 and turn it on again so that the whole system will work again. Although this is because of the TELO not of the Puck.js

    Thanks for the effort and support!

    • 27 comments
    • 1,403 views
  • in Puck.js, Pixl.js and MDBT42
    Avatar for migsanvi

    These are the results I have obtained with the new firmware (checked several times):

    With the TELO 580 paired, I remove the battery from the Puck-js until the bluetooth icon of the TELO 580 indicates that no device is connected. I wait about 10 seconds with the Puck-js battery removed. Then I put the battery back (Red LED lights once) but the program does not start.

    In some test, after a few seconds, the program has returned to work without doing anything. However, if I turn off the bluetooth of the TELO 580 and turn it on again, it automatically connects to the Puck.js and the program works again without having to execute the load () in the WebIDE.

  • in Puck.js, Pixl.js and MDBT42
    Avatar for migsanvi

    I have uploaded the firmware version in the Puck.js and it has worked!

    Effective, now when the TELO 580 is linked, when removing the battery to the Puck.js and put it back, it no longer gives the internal error (all the LEDs off) although the saved program does not load anymore I do not have to do a hard reset.

    For the Puck.js to work again, I just have to connect to the Web IDE and execute:

    load ();
    

    Is this firmware compatible with the MDBT42Q module? I have made the prototype with Puck.js but the final version is with the module.

    Thank you!

  • in Puck.js, Pixl.js and MDBT42
    Avatar for migsanvi

    Hi @Gordon!

    This morning (sorry for the delay!), I have loaded the firmware espruino_2v03.20_puckjs.zip into my Puck.js.

    >reset(true);
    Erasing saved code.
    Done!
    =undefined
     ____                 _
    |  __|___ ___ ___ _ _|_|___ ___
    |  __|_ -| . |  _| | | |   | . |
    |____|___|  _|_| |___|_|_|_|___|
             |_| espruino.com
     2v03.20 (c) 2019 G.Williams
    >
    

    This is the output with the new version:

    NRF ERROR 0x3202 at targets/nrf5x/bluetooth.c:1957
    REBOOTING.
    NRF ERROR 0x3202 at targets/nrf5x/bluetooth.c:1957
    REBOOTING.
    NRF ERROR 0x3202 at targets/nrf5x/bluetooth.c:1957
    REBOOTING
    

    I hope it works.

    Thanks for your support and the inconvenience

  • in General
    Avatar for migsanvi

    Hi at all!

    The following program has a button connected to pin D25 (MDBT42Q firmware 2v03). When the button is pressed, the "volumeUp" command is sent to the device connected by BLE. Only when button is pressed.

    I have tried the program in both Puck.js and MDBT42Q.

    var controls = require("ble_hid_controls");
    
    // Clean all previous watches
    clearWatch();
    
    // Configure PIN D25 with internal pulldown resistence
    // Wiring to VCC.
    pinMode(D25, "input_pulldown");
    
    NRF.setServices(undefined, {hid: controls.report});
    
    setWatch(function (ptt) {
      if (ptt.state) {
        LED.set();
        NRF.sendHIDReport(32, () => {});
      } else {
        LED.reset();
        NRF.sendHIDReport(0, () => {});
      }
    }, D25, {edge: "both", debounce: 50, repeat: true});
    

    However, when loading the code with WebIDE with the option of "Minification" Esprima (offline) an error occurs when the button is pressed for the first time. The program keeps sending the "volumeUp" command continuously.

    This is the minimized code that returns dump ():

    // Code saved with E.setBootCode
    Modules.addCached('ble_hid_controls','fu­nction b(a,b){NRF.sendHIDReport(a,function(){NR­F.sendHIDReport(0,b)})}exports.report=ne­w Uint8Array([5,12,9,1,161,1,21,0,37,1,117­,1,149,5,9,181,9,182,9,183,9,205,9,226,1­29,6,149,2,9,233,9,234,129,2,149,1,129,1­,192]);exports.next=function(a){b(1,a)};­exports.prev=function(a){b(2,a)};exports­.stop=function(a){b(4,a)};exports.playpa­use=function(a){b(8,a)};exports.mute=fun­ction(a){b(16,a)};exports.volumeUp=funct­ion(a){b(32,a)};exports.volumeDown=funct­ion(a){b(64,a)}');var controls=require('ble_hid_controls');cle­arWatch(),pinMode(D25,'input_pulldown'),­NRF.setServices(undefined,{hid:controls.­report}),setWatch(function(a){a.state?(L­ED.set(),NRF.sendHIDReport(32,()=>;)):(L­ED.reset(),NRF.sendHIDReport(0,()=>;));}­,D25,{edge:'both',debounce:50,repeat:!0}­);
    

    For now, the size of the code is not a problem but I would like to apply the best possible optimization.

    Any ideas?

    Thanks in advance

  • in Puck.js, Pixl.js and MDBT42
    Avatar for migsanvi

    Hi @Gordon!

    For my part, there's no problem. If you give me a binary to load that gives us more information, I could load it and pass on the data you need.

    Thank you!

  • in Puck.js, Pixl.js and MDBT42
    Avatar for migsanvi

    Hi @Gordon,

    The TELO580 is not a device purchased directly from the factory and I'm not sure the manufacturer will personalize a firmware ...

    A question. Why does the first time connect correctly and the error only occurs when the Puck.js is restarted? Does not the MAC check the first time?

    Thanks,

  • in Puck.js, Pixl.js and MDBT42
    Avatar for migsanvi

    Hi @Gordon,

    Yes, you're right. The rush is not good... (Spanish expression: "Las prisas no son buenas"). Sorry...

    The result of the code above is as follows:

    >console.log(devices);
    [
      "e4:b3:18:0b:a6:de public",  <-- PC
      "28:43:68:5e:7a:8a",               <-- TELO580
      "e4:b3:18:0b:a6:de public",  <-- PC
      "28:43:68:5e:7a:8a",               <-- TELO580
      "e4:b3:18:0b:a6:de public",  <-- PC
      "36:35:66:a1:6d:c9",               <--TELO580 (Bluetooth off and then on)
      "e4:b3:18:0b:a6:de public", <-- PC
      "12:ca:65:a3:45:24",               <--TELO580 (Bluetooth off and then on)
    ]
    =undefined
    

    When the TELO bluetooth is turned off and on again, the MAC changes, although none of them is the real one (real MAC of TELO: 7e:eb:46:03:35:1c).

    Thanks!

Actions