Avatar for billsalt

billsalt

Member since Jan 2017 • Last active May 2018
  • 11 conversations
  • 61 comments

Also known as "billsalt"
Bill Saltzstein
Code Blue Consulting/Code Blue Communications
Bluetooth and Medical Device Consultant
http://www.linkedin.com/in/billsaltzstei­n

Most recent activity

  • in General
    Avatar for billsalt

    @Gordon thanks! I'd suggest you add the dump() disable method. It is really handy for distribution.

    global.dump=function(){};E.dumpStr=funct­ion(){};

    • 5 comments
    • 74 views
  • in General
    Avatar for billsalt

    Thanks @Gordon! That's good enough.

    Bill

  • in General
    Avatar for billsalt

    Is there a way to disable dump()? I want to protect my code from download; just reasonable precautions, not trying to make it cybersecure. It seems all of the methods of save leave the ability to dump out the js code.

    I'd want it to be reenabled with any method of clearing flash...

    @Gordon?

    Thanks!
    Bill

  • in Other Boards
    Avatar for billsalt

    They all have JTAG output, though it isn't widely documented due to agreements with the Segger debugger. The nrf52-dk is a good choice, since it will natively run espruino as well.

  • in Other Boards
    Avatar for billsalt

    I used nrfjprog from the Nordic Semiconductor toolset using the Nordic Development Kit JTAG output. The SWD (SoftWare Debugger) pins are on the center connector X1 (loaded on the Pro version). Adafruit schematic: https://learn.adafruit.com/assets/52793.

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

    Thanks @Gordon! Yet another question somewhat related. It seems I can't use a const in NRF.setServices(). Is there a reason; I'd really rather not have to use a literal each time for the UUID strings?

    This works:

    NRF.setServices({
      "00001523-1212-EFDE-1523-785FEABCD123" : {
        "00001524-1212-EFDE-1523-785FEABCD123" : { // button
          value : 0x00, // optional
    ...
    

    This doesn't (and doesn't throw an error to the IDE when loaded):

    const  LBS_UUID  = "00001523-1212-EFDE-1523-785FEABCD123";
    const  LBS_BUTTON = "00001524-1212-EFDE-1523-785FEABCD123";
    const  LBS_LED = "00001525-1212-EFDE-1523-785FEABCD123";
    
    NRF.setServices({
      LBS_UUID : {
        "00001524-1212-EFDE-1523-785FEABCD123" : { // button
          value : 0x00, // optional
      ...
    
  • in Puck.js, Pixl.js and MDBT42
    Avatar for billsalt

    @Gordon, I think I got it by using your suggestion and disabling the UART advertisement with NRF.setServices({}, { uart: false });.

    I don't need to advertise my custom service, so I'll let the UART advertise instead.

    Odd question: IF I decide not to advertise the UART service (but leave it active), is there a way I can have the espruino Chrome IDE to try to connect to device that isn't advertising the UART service (but has it)?

    Thanks!!!
    Bill

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

    Thanks Gordon -- I forgot the UART service is a 128-bit UUID. Now that makes perfect sense. Same with overwriting with the two calls.

    I'm a bit confused about the interaction between NRF.setServices(..., {advertise:[ ... ]}) and the scan response package. What is normally/automatically put in the scan response? The documentation is kind of thin on this.

    I'm fine with not advertising the UART service (but having it useable). I'm actually fine with not advertising my service either, but having it show up once I connect. How can I control this a bit better?

    Maybe a short example if you have one?

    Thanks!
    Bill

Actions