Avatar for wminarik

wminarik

Member since Oct 2013 • Last active Jan 2022
  • 1 conversations
  • 5 comments

Montreal, Canada

Most recent activity

  • in Pico / Wifi / Original Espruino
    Avatar for wminarik

    For some reason I'm not able to embed images or attach them. Here are the links to the images in case anyone would like to see what I came up with:
    https://github.com/wminarik/images/blob/­master/1206Resistor_LED.JPG
    https://github.com/wminarik/images/blob/­master/HM18_LED.JPG
    https://github.com/wminarik/images/blob/­master/LED_BLE_Connect.JPG

  • in Pico / Wifi / Original Espruino
    Avatar for wminarik

    HM-18 Module installs with the same pins as the HM-10 module. It’s advertised as BLE 5.0, and mine arrived with firmware v116, and there doesn’t seem to be an update for this module on the manufacturer’s website(http://jnhuamao.cn/download_rom_en.asp?i­d=1).
    Like the HM-10, it is configured using AT commands, and has only two modes; iBeacon and a proprietary UART service. The AT commands can configure the module for lower-power and sleep modes. Gordon has posted iBeacon JS code at: http://forum.espruino.com/conversations/­252971/

    I initially wired up a button and pull-up resistor to the System Key, pin 23. According to the data sheet, pulling to ground either disconnects a connected module or resets to a default configuration if already disconnected. Power cycling the module also disconnects, so I removed the button.

    I’ve configured a surface mount LE and 1206 resistor to shine through one of the board’s through-holes. Clear nail polish insulates the connections from the board, and the board still lays flat on a surface. The LED blinks when not connected, and stays on when connected.
    A simple script to control the on-board red LED can be controlled via the nRF Connect app to verify operation.

    
    function onInit() {
        USB.setConsole();
    }
    
    Serial1.on('data', function(data) {
        if (data=="o") LED1.write(true); 
        if (data=="f") LED1.write(false); 
        }
    );
    

    Pretty nifty that a $5 add-on adds BLE communication to the versatile classic Espruino board!

  • Avatar for wminarik

    There are great instructions for adding a BLE 4.0 connection to an Espruino original board using the HM-10 module. Has anyone attempted to add a BLE 4.2/5.0 module such as the HM-18?
    It uses a CC2640 combatible chip.

  • in Bangle.js
    Avatar for wminarik

    The GNSS receiver on my Bangle.js 2 was able to get a fix fairly quickly. However it only finds 5-8 satellites at a time (I've occasionally had up to 10, briefly). Looking at the output NMEA sentences:
    $GNGSA,A,3,01,07,08,17,21,30,,,,,,,3.4,1­.7,2.9,1*33
    $GNGSA,A,3,,,,,,,,,,,,,3.4,1.7,2.9,4*3E
    $GPGSV,3,1,10,01,49,149,28,07,52,194,20,­08,39,058,14,10,05,035,,0*6A
    $GPGSV,3,2,10,13,17,304,,14,43,298,25,17­,26,242,36,21,57,097,29,0*67
    $GPGSV,3,3,10,27,08,060,,30,61,255,27,0*­6C
    $BDGSV,1,1,00,0*74
    $GPTXT,01,01,01,ANTENNA OPEN*25

    It's found 10 GPS satellites ($GPGSV) but only 6 are used for the fix ($GNGSA; sats 01,07,08,17,21,30). It doesn't look like it's even trying to find GLONASS satellites; there's a line for Beidou ($BDGSV) but no satellites are listed. Galileo satellites are also missing. uBlox receivers allow the choice of frequencies; the inexpensive ones allow the choice of two (e.g. GPS and GLONASS or GPS and Beidou). There must be a way to turn on at least the GLONASS frequency.

    The last line worries me a bit:
    $GPTXT,01,01,01,ANTENNA OPEN*25

    From the datasheet Gordon linked in, the choices are:
    示例 $GPTXT,01,01,01,ANTENNA OPEN*25
    表示天线状态(开路)
    $GPTXT,01,01,01,ANTENNA OK*35
    表示天线状态(良好)
    $GPTXT,01,01,01,ANTENNA SHORT*63
    表示天线状态(短路)

    This implies that part of our problem is that the antenna is not connected, or that there is no antenna (open circuit). If anyone has done a teardown of the production units, this could be verified.

Actions