• It sounds like you've got the master/central "c123" (the one doing the connecting) trying to connect to itself with ...filters: [{ name: 'Puck.js c123'...?

    I think you need: ...filters: [{ name: 'Puck.js ae23' instead and you should be ok?

  • oh, sorry, my copy/paste was wrong here :-(
    here is the test what I made, and I have the problem in this version:

    //======================================­========================================­========================================­=====================
    Slave:
    
    var on = 0;
    function toggle() {
      on = !on;
      digitalWrite(LED, on);
    }
    
    --> save();
    
    //======================================­========================================­========================================­=====================
    Master:
    
    // Are we busy?
    var busy = false;
    
    // Function to call 'toggle' on the other Puck
    function sendToggle() {
      if (!busy) {
        busy = true;
        digitalPulse(LED3, 1, 500); // light blue to show we're working
        NRF.requestDevice({ filters: [{ name: 'Puck.js ae23' }] }).then(function(device) {
          require("ble_simple_uart").write(device,­ "toggle()\n", function() {
            digitalPulse(LED2, 1, 500); // light green to show it worked
            busy = false;
          });
        }).catch(function() {
          digitalPulse(LED1, 1, 500); // light red if we had a problem
          busy = false;
        });
      }
    }
    
    // Call sendToggle when the button is pressed
    setWatch(sendToggle, BTN, { edge:"rising", debounce:50, repeat: true });
    
    --> save();
    
About

Avatar for Gordon @Gordon started