Avatar for DanDyse

DanDyse

Member since Nov 2021 • Last active Mar 2024
  • 10 conversations
  • 59 comments

Most recent activity

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

    Thanks, makes no difference unfortunately ... this is what the list looks like (filter set to 4C):

    [
      BluetoothDevice: {
    	"id": "68:8e:9f:41:ed:04 private-resolvable",
    	"rssi": -85,
    	"data": new Uint8Array([2, 1, 26, 2, 10, 12, 12, 255, 76, 0, 16, 7, 61, 31, 172, 239, 186, 118, 120]).buffer,
    	"manufacturer": 76,
    	"manufacturerData": new Uint8Array([16, 7, 61, 31, 172, 239, 186, 118, 120]).buffer
       },
      BluetoothDevice: {
    	"id": "55:9d:8f:7b:45:a1 private-resolvable",
    	"rssi": -62,
    	"data": new Uint8Array([2, 1, 26, 26, 255, 76, 0, 12, 14, 8, 3, 143, 238, 224, 193, 184, 184, 230, 42, 244, 112, 20, 89, 16, 5, 75, 28, 13, 209, 32]).buffer,
    	"manufacturer": 76,
    	"manufacturerData": new Uint8Array([12, 14, 8, 3, 143, 238, 224, 193, 184, 184, 230, 42, 244, 112, 20, 89, 16, 5, 75, 28, 13, 209, 32]).buffer
       },
      BluetoothDevice: {
    	"id": "31:7e:10:d1:55:67 private-nonresolvable",
    	"rssi": -45,
    	"data": new Uint8Array([2, 1, 26, 11, 255, 76, 0, 9, 6, 3, 58, 192, 168, 20, 104]).buffer,
    	"manufacturer": 76,
    	"manufacturerData": new Uint8Array([9, 6, 3, 58, 192, 168, 20, 104]).buffer
       },
      BluetoothDevice: {
    	"id": "36:c2:b6:c2:32:23 private-nonresolvable",
    	"rssi": -90,
    	"data": new Uint8Array([2, 1, 26, 11, 255, 76, 0, 9, 6, 3, 5, 192, 168, 1, 47]).buffer,
    	"manufacturer": 76,
    	"manufacturerData": new Uint8Array([9, 6, 3, 5, 192, 168, 1, 47]).buffer
       },
      BluetoothDevice: {
    	"id": "54:24:6f:a9:f3:a0 private-resolvable",
    	"rssi": -49,
    	"data": new Uint8Array([2, 1, 26, 2, 10, 12, 10, 255, 76, 0, 16, 5, 71, 28, 200, 62, 162]).buffer,
    	"manufacturer": 76,
    	"manufacturerData": new Uint8Array([16, 5, 71, 28, 200, 62, 162]).buffer
       },
      BluetoothDevice: {
    	"id": "73:c9:92:18:1f:b6 private-resolvable",
    	"rssi": -28,
    	"data": new Uint8Array([2, 1, 26, 2, 10, 7, 11, 255, 76, 0, 16, 6, 87, 30, 133, 239, 171, 122]).buffer,
    	"manufacturer": 76,
    	"manufacturerData": new Uint8Array([16, 6, 87, 30, 133, 239, 171, 122]).buffer
       },
      BluetoothDevice: {
    	"id": "e5:a2:61:4d:88:81 random",
    	"rssi": -28,
    	"data": new Uint8Array([7, 255, 76, 0, 18, 2, 0, 3]).buffer,
    	"manufacturer": 76,
    	"manufacturerData": new Uint8Array([18, 2, 0, 3]).buffer
       },
      BluetoothDevice: {
    	"id": "74:be:34:49:3d:37 private-resolvable",
    	"rssi": -28,
    	"data": new Uint8Array([2, 1, 26, 13, 255, 76, 0, 22, 8, 0, 143, 10, 199, 38, 46, 176, 112]).buffer,
    	"manufacturer": 76,
    	"manufacturerData": new Uint8Array([22, 8, 0, 143, 10, 199, 38, 46, 176, 112]).buffer
       },
      BluetoothDevice: {
    	"id": "c4:b1:75:d5:55:41 random",
    	"rssi": -47,
    	"data": new Uint8Array([30, 255, 76, 0, 18, 25, 32, 249, 117, 54, 221, 67, 90, 101, 94, 4, 49, 34, 203, 36, 161, 116, 116, 86, 147, 200, 222, 188, 59, 1, 65]).buffer,
    	"manufacturer": 76,
    	"manufacturerData": new Uint8Array([18, 25, 32, 249, 117, 54, 221, 67, 90, 101, 94, 4, 49, 34, 203, 36, 161, 116, 116, 86, 147, 200, 222, 188, 59, 1, 65]).buffer
       },
      BluetoothDevice: {
    	"id": "de:c3:1d:ad:f1:ed random",
    	"rssi": -47,
    	"data": new Uint8Array([7, 255, 76, 0, 18, 2, 36, 0]).buffer,
    	"manufacturer": 76,
    	"manufacturerData": new Uint8Array([18, 2, 36, 0]).buffer
       },
      BluetoothDevice: {
    	"id": "f4:36:f6:2b:1d:7b random",
    	"rssi": -56,
    	"data": new Uint8Array([7, 255, 76, 0, 18, 2, 0, 3]).buffer,
    	"manufacturer": 76,
    	"manufacturerData": new Uint8Array([18, 2, 0, 3]).buffer
       },
      BluetoothDevice: {
    	"id": "6d:8f:cd:d6:fb:9f private-resolvable",
    	"rssi": -88,
    	"data": new Uint8Array([2, 1, 26, 2, 10, 4, 11, 255, 76, 0, 16, 6, 77, 29, 159, 243, 222, 40]).buffer,
    	"manufacturer": 76,
    	"manufacturerData": new Uint8Array([16, 6, 77, 29, 159, 243, 222, 40]).buffer
       },
      BluetoothDevice: {
    	"id": "fe:ab:ab:74:da:31 random",
    	"rssi": -85,
    	"data": new Uint8Array([7, 255, 76, 0, 18, 2, 0, 0]).buffer,
    	"manufacturer": 76,
    	"manufacturerData": new Uint8Array([18, 2, 0, 0]).buffer
       },
      BluetoothDevice: {
    	"id": "48:f0:f4:6b:28:58 private-resolvable",
    	"rssi": -85,
    	"data": new Uint8Array([2, 1, 26, 13, 255, 76, 0, 22, 8, 0, 129, 159, 50, 7, 139, 249, 66]).buffer,
    	"manufacturer": 76,
    	"manufacturerData": new Uint8Array([22, 8, 0, 129, 159, 50, 7, 139, 249, 66]).buffer
       }
     ]
    

    How come there is no "name" at all?

  • in Other Boards
    Avatar for DanDyse

    Hehe, after some more trying it works ... the IDE is sometimes a bit "unruly" ... thank you @fanoush!

    • 5 comments
    • 136 views
  • in Puck.js, Pixl.js and MDBT42
    Avatar for DanDyse

    Hi again,

    I want my puck to wait a little longer before going into code that changes its name and advertising behaviour. But want it to wait only if a certain device is around (e.g. my iPhone).
    So I tried to do a scan or a request ... but this never returns ANY names of the devices, even with higher timeouts and "active" being true?!
    "namePrefix" does not make a difference when using findDevices – it just lists all, regardless of what I set. "namePrefix" does the opposite when using requestDevice – it never finds any, even if I just set one letter. Yes, I can see plenty of devices around using nRF-Connect including the ones I want the Puck to find.
    This is what I have tried:

    NRF.findDevices(function(devices) { console.log(devices);}, {timeout : 5000, active : true, filters : [{ manufacturerData:{0x004c:{}} }] });
    

    --> puts out a rather large list, but without names

    NRF.findDevices(function(devices) { console.log(devices);}, {timeout : 5000, active : true, filter : [{ namePrefix: 'S' }] });
    

    --> shows the same full list without names, although only two devices would fit.

    NRF.requestDevice({timeout : 5000, active : true, filters : [{ namePrefix: 'S' }] });
    

    --> times out without any result

    I have tried setting timeout to 10 or even 30 seconds – no difference. I must be doing something fundamentally wrong. Please advise.

  • in Other Boards
    Avatar for DanDyse

    Understand ... and I have tried to do so:
    I can see it starting up, advertising as Espruino, let's me choose to connect via IDE, tries to, says "Connected to BLE" but does not finish let alone me programming it / uploading new code. It just hangs there until the timeout comes and executes my "old code" ... which sets a new name, non-connectable etc.
    Am I missing something?
    Shall I set advertising to something specific to make it "more willing" to connect before the timeout runs my other code?
    And if the connecting works, will it stop the timeout or will I have to upload before to avoid further execution?

  • in Other Boards
    Avatar for DanDyse

    Hi,
    I know it is not official: I have the E73 from Ebyte flashed with Espruino successfully, it works like a charme.
    When I load my code via IDE to RAM, I can easily get back by disconnecting power so the device gets into bootloader (I believe) waiting to get new code.
    The code makes the device non-connectable on purpose. So when I save() it to "Flash" changing the code needs a reset.
    Now I am having big trouble resetting it by applying power or GND to a specific pin (E73 datasheet says RST is pin 26 which corresponds to P0.18 of nRF52840). Whenever I do this I can see the device advertising as Espruino but just for a few (milli)seconds ... it quickly "falls back" and executes my old code instead. Or I am doing something wrong / not long enough / whatever.
    But even if this would work, resetting the device by fiddling with a specific PIN is a real pain, especially if it is already built in somewhere.
    Long talk short question: can I instead code it so when powered up to stay in "waiting for IDE connection" for maybe 10 seconds after that it goes on switching to not-connectable and continues with whatever it is used for? So every time I power it up, I get a chance to upload new code?
    Maybe this is super easy I have just not found how to do it?
    Any help is appreciated.

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

    Although it seems to work okay, I may have indeed screwed something ... I surely once mixed +/- and I have fiddled around with the Puck quite a lot (bought it in 2021 I believe). I'll buy another one and try more. However, I have seen that taking the average of three measurements comes very close to what the battery actually has. Still need to check lower voltages though. Actually, I only need to know when battery is close to its lower limit to know when to charge.

    Someone I talked to about the measurements asked me "how do you use the ADC? Any voltage divider resistors, filter capacitors?" ... guess Puck does not?

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

    So, measured voltage with LED1 on and off ... same results.

Actions