Avatar for user98419

user98419

Member since Mar 2019 • Last active Jun 2019
  • 1 conversations
  • 5 comments

Most recent activity

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

    Hi Gordon,

    It turns out I'd make a mistake. No issue to see here!

    Thanks!

    Nic

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

    Hi Gordon. Thank for the reply.

    I had already tried adding more packets and varying the order of things but didn't have any success. It was a bit of a frantic day but I am pretty certain my changes were minor and unrelated to the advertising/iBeacon code.

    Nonetheless, I do have that version. With a clear mind I'll have another go and see if I can get to the bottom of it.

    I was sure this code was and had been runnning correctly up until I re-uploaded the code. Very strange.

    I'll let you know how I get on.

    Thanks,

    Nic

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

    Hi Gordon,

    I was sure this was working... I've just done some code tweaks and found it to be unreliable again. I flashed to the newest edge build in case further issues had been rectified but alas I can't get it to work.

    Here's my code:

    function AdvertiseData(Interval) {
        NRF.setAdvertising([require("ble_ibeaconĀ­").get({
              uuid : UUID, // iBeacon UUID
              major : 0x0001, // optional
              minor : 0x0001, // optional
              rssi : -79 // optional RSSI at 1 meter distance in dBm
            })],{manufacturer: 0x0590, manufacturerData:[SensorID, Light, Temperature, Battery, ActionID, Active_Press_Action, Stuck], interval:Interval});
    

    Noble detects the iBeacon as the manufacturer data and the array of data is never picked up. If I pad it with another value preceeding the iBeacon like so:

    function AdvertiseData(Interval) {
        NRF.setAdvertising([{0x180F : [0]},
            require("ble_ibeacon").get({
              uuid : UUID, // iBeacon UUID
              major : 0x0001, // optional
              minor : 0x0001, // optional
              rssi : -79 // optional RSSI at 1 meter distance in dBm
            })],{manufacturer: 0x0590, manufacturerData:[SensorID, Light, Temperature, Battery, ActionID, Active_Press_Action, Stuck], interval:Interval});
    
    }
    

    Noble picks up the array of values but the iBeacon isn't working.

    Any ideas?

    Thanks

    Nic

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

    Hi Gordon,

    Typically my tests probably always included an even number of messages. I flashed to .69 and it works now as expected.

    Thank you for your help!

    Nic

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

    Hi,

    I'm trying to use a collection of pucks as both iBeacons and to report sensor information. I use them to automate lights, heating and track our position in the house. My implementation is rather hacky at the moment. I'm trying to refactor the code but I'm struggling to utilise setAdvertising as shown in the examples across the documentation.

    In the two examples shown below I'm led to believe I can send both iBeacon and sensor readouts in sequential packets.

    NRF.setAdvertising([
      {0x180F : [Puck.getBatteryPercentage()]}, // normal advertising, with battery %
      require("ble_ibeacon").get(...), // iBeacon
      require("ble_eddystone").get(...), // eddystone
    ],{interval:500});
    
    NRF.setAdvertising([
      require("ble_ibeacon").get(...),
      require("ble_eddystone").get(...),
      {} // this will add a 'normal' advertising packet showing name/etc  
      ], {interval:100});
    

    I'm using Noble on a RPi to pick up the broadcasts and the reason I post both examples is because the first does not work for me at all. If any packet exists before the iBeacon package then I don't seem to pick anything up.

    I have more success with the second example code but Noble only seems to pick up the iBeacon broadcast and not the temperature. If I drop the iBeacon require then the temperature broadcast is picked up as expected.

    The actual code I want to run is a little more involved, and didn't work, which led me to use the basic examples exactly as shown above just to make sure I was on the right track, but I can't get them to work. To be clear I've limited the code to exactly the code above and am having no success.

    Am I missing something? Really I'm looking for reassurance that something isn't broken at a deeper level than I can fix/understand. If it's my setup then I can investigate further but fear at this stage I might be wasting my time.

    Deeply greatful to anyone who replies or has any ideas of something I can try.

    Thanks,

    Nic

Actions