• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

Bluetooth connections with noble

Scheduled Pinned Locked Moved Development
8 Posts 3 Posters 5.6k Views 4 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    SvenSommer
    last edited by Jan 23, 2017, 6:41 PM

    with the help of @dfuerst we were able to solve this issue by rebuilding electron with a special version:

    sudo npm rebuild --runtime=electron --target=1.4.6 --disturl=https://atom.io/download/atom-shell --abi=50
    

    Looking for some building inspiration?
    Check out my large, thin and metal framed mirror on robstechlog.com.

    Modules released:
    MMM-GoogleAnalytics
    MMM-GrafanaChart
    MMM-GrafanaGauges

    1 Reply Last reply Reply Quote 0
    • Y Offline
      yawns Moderator
      last edited by yawns Jan 23, 2017, 7:18 PM Jan 23, 2017, 7:18 PM

      Great. That’s what I was aiming for.

      1 Reply Last reply Reply Quote 0
      • S Offline
        SvenSommer
        last edited by Jan 23, 2017, 9:40 PM

        So noble is working fine. I find all bluetooth devices as expected, as long it’s not running within the MM-framework.

        It seems like noble isn’t able to power on the bluetooth adapter on the raspberry pi3 board when started by magicmirror.

        Any ideas?

        Here is a minimal example:

        var noble = require('noble');
        
        console.log('stateChange is: ' + noble.state);
        noble.on('stateChange', function(state) {
          console.log('changed state to: ' + noble.state);
          if (state === 'poweredOn') {
            noble.startScanning();
          }else  {
            noble.stopScanning();
          }
        });
        console.log('stateChange is: ' + noble.state);
        
        

        leeds to:

        stateChange is: unknown
        stateChange is: unknown
        
        

        Looking for some building inspiration?
        Check out my large, thin and metal framed mirror on robstechlog.com.

        Modules released:
        MMM-GoogleAnalytics
        MMM-GrafanaChart
        MMM-GrafanaGauges

        1 Reply Last reply Reply Quote 0
        • D Offline
          dfuerst
          last edited by Jan 24, 2017, 7:33 AM

          maybe using hcitool with the syntax for pairing a device before would solve this issue, have you tried that?
          as far as i understand the rpi3 bluetooth is on, at startup, but you have to pair the devices every startup, unless you use hcitool with the corresponding syntax for direct pairing within your .js

          1 Reply Last reply Reply Quote 0
          • S Offline
            SvenSommer
            last edited by Jan 31, 2017, 3:35 PM

            We were able to solve this issue by ruinning the MM² with sudo-right. See here for details.

            Looking for some building inspiration?
            Check out my large, thin and metal framed mirror on robstechlog.com.

            Modules released:
            MMM-GoogleAnalytics
            MMM-GrafanaChart
            MMM-GrafanaGauges

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            • First post
              Last post
            Enjoying MagicMirror? Please consider a donation!
            MagicMirror created by Michael Teeuw.
            Forum managed by Sam, technical setup by Karsten.
            This forum is using NodeBB as its core | Contributors
            Contact | Privacy Policy