Ruuvitag, dModule is not defined (LIS2DH12)

Posted on
  • I am trying to access accelerometer with Espruino, but when I import module Ruuvitag:

    var Ruuvitag = require("Ruuvitag");

    this error occurs:

    Uncaught ReferenceError: "dModules" is not defined
      at line 1 col 10
      1dModules.addCached("LIS2DH12","function­ f(c,a,d){this.r=c;t...

    Ruuvitag is flashed to the latest firmware, V1.99.
    I tried with different tags, same problem.

  • Which OS are you accessing from, which type of Web IDE, and which version is it? This looks like it's more likely a communications problem than some specific Ruuvi issue

  • OS: macOS High Sierra 10.13.4
    Browser: Chrome 69.0.3497.81 (Official Build) (64-bit)
    Espruino web IDE: Web IDE version 0.70.3

    Same error on colleagues computer, but is running macOS too though

  • @ojousima What IDE/OS are you folks using? Does it upload ok using the Espruino CLI tools? You say you tried earlier IDEs - are they broken too?

    This would appear to be some issue with the first few bluetooth packets that are sent getting lost. I did make some changes to the bluetooth comms but that was a few weeks ago, so I wonder whether Chrome has pushed some changes that have broken it?

    I'm in my first week's holiday in 12 mo+ so there will be some delays responding though...

  • Same problem here.
    OS: OSX El Capitan 10.11.6
    Browser: Chrome 68.0.3440.106 (Official Build) (64-bit)
    Espruino web IDE: Web IDE version 0.70.3

    Tried also ruuvitag firmwares from 1v95 to 1v99

  • Please can someone on a non-mac give this a try? Or a Mac with the command-line tools (npm install -g espruino)...

    I'd be amazed if this was Ruuvitag specific - especially if it affects other firmware versions that 1v99 (which it seems to).

  • Ok, I think I've found the issue. Hang on a few minutes and I'll see if I can fix it

  • @Gordon MAC OSX / Chrome, 0.70.2 served from & 0.70.3 from Espruino page.
    I've not tried CLI tools, but I might get a chance to give it a go over the weekend.

    Enjoy your holidays, I'm sure this can wait for a week :)
    [EDIT]: Oh, apparently the fix is already in the works, thanks!

  • Sure, running on Linux Mint

    1 Attachment

  • Ok, so it should be fixed now. It was an issue with a tweak that changed the way line numbers were being added to improve debugging, and it would have applied to pretty much any module upload on any platform. Changes were made 2 weeks ago but I guess it's just trickling through.

    If you refresh the IDE webpage (you may have to do a 'full' refresh) then the IDE should report version 70.4, and uploads will work.

    The Chrome Web App should also update over the next few hours, however I can't update the native Windows app from here so the 70.4 version of that will have to wait until I get back next week. If you still have issues, just turn off Store line numbers in Communications in the IDE settings, and it should work.

  • Works beautifully, thanks a lot for the fix @Gordon!

  • Same here, many thanks @Gordon

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

Ruuvitag, dModule is not defined (LIS2DH12)

Posted by Avatar for miha @miha