Avatar for user94249


Member since Sep 2018 • Last active Jan 2019
  • 2 conversations

Most recent activity

  • Avatar for user94249

    I'm using Puck.js (Espruino v2.01) and I want to be able to manipulate variables based on data that is written to the NFC tag using NFCrx.
    If I use the 'NFCon' event, and console log based on that, everything works when I scan NFC:

    >NRF.on('NFCon', () => { console.log("test"); });

    But when I use the NFCrx event instead, after NFCStart of course, the event callback is not called (almost as if the event is not registered):

    =new Uint8Array([95, 193, 71, 81, 42, 138, 1, 165, 4, 3]).buffer
    >NRF.on('NFCrx', (rx) => { console.log(rx); });
    >NRF.on('NFCrx', (rx) => { NRF.nfcSend("test"); });
    >NRF.on('NFCrx', (rx) => { console.log("test"); });

    What am I missing?
    Thanks in advance

  • in General
    Avatar for user94249

    Ah of course! I know the code, but for some reason it completely slipped my mind that disabling the UART service would have that effect (duh).
    Cheers Gordon.

  • in General
    Avatar for user94249

    We actually have a bunch of Espruino Bluetooth devices here - which is why it's a bit confusing. The IDE actually worked for someone else with a Mac yesterday, but I can't for the life of me get it working - after trying on two separate Ubuntu machines and a Mac. See the attached image for our Espruino Bluetooth devices (prefixed with SB) showing up on the Web Bluetooth Example (gonna call it WBE so I don't have to keep typing that out)

  • in General
    Avatar for user94249

    Hi Gordon,

    When I click the connect icon, it says "select a port", with the (only) option being "web bluetooth". When clicked, it then opens the modal saying "no compatible devices found" (see attached image).
    But when I use the testing page mentioned before, the same prompt shows many devices. I can provide a screenshot of that too if you need.

    Thanks for the quick response!

  • in General
    Avatar for user94249


    I'm using the Espruino Web IDE on Google Chrome Version 69.0.3497.100 (Official Build) (64-bit) with Ubuntu 18.04.1.
    I have tried enabling web Experimental Web Platform features, running bluetoothd in experimental mode, and I still get the same error:

    Handling URL "https://www.espruino.com/ide/"
    Couldn't connect to wss://localhost:31234 - disabling websockets for this session
    ERROR: getURL("/serial/ports") error : Not Found
    /serial/ports doesn't exist - disabling WebSocket support
    ERROR: serial_frame: getPorts timeout, disabling
    >>> Connecting...
    Set Slow Write = true

    EDIT - From the browser console:

    index.js:81181 WebSocket connection to 'wss://localhost:31234/' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED
    ensureConnection @ index.js:81181
    index.js:78249 Couldn't connect to wss://localhost:31234 - disabling websockets for this session
    /serial/ports:1 Failed to load resource: the server responded with a status of 404 (Not Found)
    index.js:78259 getURL("/serial/ports") error : Not Found
    console.error @ index.js:78259
    index.js:78249 /serial/ports doesn't exist - disabling WebSocket support
    index.js:78259 serial_frame: getPorts timeout, disabling

    This isn't an issue with the browser's connection to the bluetooth adapter, as I can successfully find devices using the web-bluetooth testing page, so I know it's specifically a problem with the web IDE.

    I tried this on my Mac too, and the same problem occurred. Is the service down at the moment or ?

    I can provide screenshots upon request.

    Thanks in advance