Avatar for Kartman

Kartman

Member since Sep 2018 • Last active Dec 2018
  • 4 conversations
  • 49 comments

Most recent activity

  • in Other Boards
    Avatar for Kartman

    hah! I just had a quick read of the datasheet and I think you're right - I didn't see any means of varying the cpu clock. I had expected the nrf52 would've had a pll like most other ARM devices.

  • in Other Boards
    Avatar for Kartman

    You might be able to use poke32() to manipulate the nrf52 registers directly.

  • in General
    Avatar for Kartman

    I'm struggling getting it to work reliably at the moment. There's just been new firmware released for the BC95 but I've yet to check to see if the problems I've encountered have been fixed. Then there's the challenge of updating the firmware - I've soldered some wires to bridge the BC95 serial to the usb->serial board so I can do this.

    The first trick to getting the BC95 working is to swap the gprs tx and rx pins (12 & 20) in rak8211.js. It's easy enough just to hand edit the min.js file as it is the first line.

  • in General
    Avatar for Kartman

    That code is like decoding a puzzle! I saw the 256 + bit and I'm thinking What!! Then I twigged that it is to ensure there's at least two hex chars. Thanks for the tips.

    Unfortunately the Quectel BC95 uses hex ascii. Why? Who knows. I can't think of any other AT module that does it that way.

    We were having some memory problems especially when receiving, so I had thought my code was not too efficient. I had it in my mind that there might be a simple way to use a byte array and cast it to a string. That way there's no copy and allocate.

  • in General
    Avatar for Kartman

    It's part of the build

  • in General
    Avatar for Kartman

    The Quectel BC95 module expects the data payload as hex strings. Are the following methods, the most memory efficient way of doing this?

    //convert to a hex string
        for (var i = 0; i < data.length; i++) {
          var s = data.charCodeAt(i).toString(16);
          while (s.length < 2) {
            s = '0' + s;
          }
          msg += s;
        }
    

    and conversely:

    for (let ndx = 0; ndx < (recvData[1] * 2); ndx += 2) {
        let i = parseInt("0x" + recvData[2].substring(ndx, ndx + 2)); //ascii hex to integer
        sockData[connection] += String.fromCharCode(i);          //build a string
      }
    
    

    From my limited understanding, this code would create a string, append and create a new string, rinse and repeat. This seems like a bit of overhead. I did consider typed arrays, but how do I convert these back to a string in one go?

  • in General
    Avatar for Kartman

    The reason i stumbled on this issue is I followed the build instructions - it seems the link gets the latest gcc release for osx. After the problems I found the earlier version that I was also using under Linux.

    This was for nrf52.

  • in Other Boards
    Avatar for Kartman

    I have the RAK8212 working fine whilst having the bluetooth disconnected.
    Bluetooth.setConsole(true) was the secret for me.

Actions