Avatar for David1234321

David1234321

Member since Apr 2020 • Last active Aug 2020
  • 8 conversations
  • 35 comments

First time user of this - seem very cool

Most recent activity

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

    I can see the phone with anoter device

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

    hello ,
    I have started a new project , and went back to basic because something isn't working for me
    simple scan for devices and print them
    this is the code:

    NRF.setAdvertising({}, {name: "Test3"});
    
    var s=setInterval(function(){
    LED1.write(false);
    NRF.findDevices(function(devices) {
      if (devices.length>0)
      {
        print("I found you :\n\r ");
        for(var i=0;i<devices.length;i++)
      {
        
        var time = (new Date()).toString();
        var rssi = devices[i].rssi;
        var MAC = devices[i].id;
        var name = devices[i].name;
        var manufacturer = devices[i].manufacturer;
        print (
             + " " +   time
             + " " +   MAC
             + " " +   rssi
             + " " +   name
             + "  " + manufacturer
        );
        
      } }
      LED1.write(true);    
     print ("**************************");               
    }, 1000);},5000);
    
    

    I can see devices found (none of them is my phone...)

    I found you :
    NaNMon Aug 10 2020 17:08:56 GMT+0300 00:0e:0b:0c:70:03 -77 undefined  19784
    NaNMon Aug 10 2020 17:08:56 GMT+0300 7c:9a:12:f8:57:c3 -85 undefined  76
    NaNMon Aug 10 2020 17:08:56 GMT+0300 28:af:35:20:89:9b -89 undefined  6
    NaNMon Aug 10 2020 17:08:56 GMT+0300 68:bd:35:87:b2:2c -87 undefined  6
    NaNMon Aug 10 2020 17:08:56 GMT+0300 60:d9:f3:7d:3e:a6 -87 undefined  76
    **************************
    

    everything is on the desk maybe 10 cm from the device
    the samsung phone bluetooth is open
    how could it be ?
    did I miss something in the code?

    Thanks ,

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

    great
    thank you
    I think you can post the code you post here as an easy to understand example
    or even first code jsut flahs it
    much more easy to understand ....

    so see I understand it correct:

    NRF.setAdvertising([
    require("ble_eddystone").get("http://www­.david.com"),
    {
    
    //this part is all the data I want to show using Hex , 
    // can take examples from here https://www.bluetooth.com/specifications­/gatt/characteristics/ - //right?
       0x180F : [NRF.getBattery()],
       0x1809 : [Math.round(E.getTemperature())]
      } 
    ],
    //this is the default setting I can cahnge - right ? this is the only setting I can change from here 
    {
       name  : "David",
       showName: true,
       discoverable : true,
       connectable : false,
       scannable : true,
       interval:100
    });
    

    so now:
    I can see the device in bluetooth normal scan (see the name only and can't connect to it because of connectable : false)
    I can see the data from "NRF-connect". which is what I want

    Thank you so so much for this!


    1. I'm tryin to play with this , and send more data
      just for the test I want to test this Hex(Got this from https://www.bluetooth.com/specifications­/gatt/characteristics/)

    Age org.bluetooth.characteristic.age 0x2A80 GSS
    and add this to the code:

      {//here I put the HEX data -https://www.bluetooth.com/specification­s/gatt/characteristics/
       0x180F : [NRF.getBattery()],
       0x1809 : [Math.round(E.getTemperature())],
       0x2A80 : "15"
      } 
    

    in the NRF I can see battery\temp but not age -jsut Service Data without name - why?
    just 20x2A80 0x31 0x35 (which is 15)
    is it standart?

    1. also can I set the time of the ble_eddystone for showing 2 websites?
      I did this

      require("ble_eddystone").get("http://www­.david1.com"),
      require("ble_eddystone").get("http://www­.Danny1.com"),
      

      if I want to make 1 min for website1 and 2 min for website 2?
      and meanwhile it will send data every 1 sec ?
      or I need to write a more complicated code for this ?

    2. also the battery shown 3%
      is it because I'm connecting using USB to the V+ (5V) and not to the battery input?
      can I know what the voltage I'm using ? beacuse I saw it can be power on

      will work off of 2.5 to 16 volts
      can I measure the input?

    Thanks,

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

    OK
    update the firmware to 2.05
    now how to continue?

    Thanks,

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

    Hello ,
    I have try and try but your support and documentation is not so understandble for first use....

    I'm using MDBT42Q version 2.04 (because I can't update using windows computer).
    this is what I want to do :
    publish my device using BLE , so whenever people will scan they will se my device
    simple as this
    I want people will be able to see:

    1. name of the devcie
    2. battery
    3. temp

    this is what I want to upload to the MDBT42Q (after reading 10 times on the support part)

    NRF.setAdvertising([
       require("ble_eddystone").get("http://www­.david.com"),
      {
       name  : "David",
       showName: true,
       discoverable : true,
       connectable : false,
       scannable : true,
       manufacturer: 0x0590 ,
       0x180F :  NRF.getBattery(),
       0x1809 : [Math.round(E.getTemperature())]
      } 
    ], {interval:100});
    

    but it doesn;t work
    I get error

    Uncaught Error: BLE error 0xc (DATA_SIZE)
    at line 13 col 20
    ], {interval : 100});

                   ^
    

    why?
    this is as the example you post

    so when I upload this it is working :

    NRF.setAdvertising([
       require("ble_eddystone").get("http://www­.Mako.co.il"),
      {
       name  : "David",
     //  showName: true ,
     //  discoverable : true,
       connectable : false,
     //  scannable : true,
      // manufacturer: "0x0590" ,
       0x180F :  NRF.getBattery(),
       0x1809 : [Math.round(E.getTemperature())]
      }
    ], {interval : 100});
    

    why?

    maybe I'm missing something so this are my questions about the code above:

    1. did I miss something ? just publish this information - this is whatI want to do.
    2. what is the different between
      discoverable \scannable - isn't all the same?
      if I disable showname - I will see every data except the devcie name - right?
    3. maybe I'm using the wrong app on my phone ?
      when I just search using bluethhoth scan - I don't see the device at all.
      when I search using "BLE Scanner" - I see the device (without any information ) but when I press "Open url" - it redirect my to my site . but no name\temp - nothing.
      when I use "nRF Connect" - I don't the name of the device just "Te" and the battery 3% temp 85

    so what is wrong?

    Thank you for your help!

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

    yes I do
    tablet with android 7 - will this works?

    I have also have a computer with win10 - better?

Actions