Avatar for AkosLukacs


Member since Dec 2015 • Last active Jul 2020
  • 17 conversations

Most recent activity

  • in Bangle.js
    Avatar for AkosLukacs

    Update to the latest, a lot has improved since 2v05.87 in my experience.

  • in Bangle.js
    Avatar for AkosLukacs

    What firmware version and what apps do you have on the bangle?
    Got similar issues 1-2 months ago (without connect/disconnect messages on the watch), but has been better lately. If you have an older FW version, definitely try to update the firmware and clean all apps.

    And could be an issue with your laptop / computer. For example my phone (Huawei P10, nothing fancy) is much much better at bluetooth connectivity than my laptop (a Lenovo Thinkpad Edge gen2). Totally offtopic, but my wife's 10 year old Dell has much better wifi than a newer Dell I had...

  • in Porting to new Devices
    Avatar for AkosLukacs

    Ok, what do you mean by "flashing does not work" ? If flashing won't work, nothing will work :)
    After flashing Espruino, the dongle shows up as a virtual COM port, nothing special, Windows says the driver is by Microsoft, so you shouldn't need any special driver I think. Or BLE, no driver needed at all.

    So, I'm lazy to type so just use nRF Connect desktop's "Programmer". You can use the command line tools, the GUI is calling that, so the result should be the same...

    1. The hex's SHA1 should be: 57B9580CE13F18498255EFE8BEDF3370FF040ADB­. Re-download if it's different! There is a tiny chance of wrong download...
    2. This will work if your dongle still has the original USB bootloader. If you have completely erased, or uploaded a different bootloader that doesn't work with nrfjprog, you will need an SWD programmer. But the end result should be the same.
    3. Plug-in the dongle, and press the reset button (the one sideways). The red LED should start pulsing.
    4. Launch nRF Connect & programmer. Select the device (top-left). The contents of the dongle's memory should be visible on the left. See the screenshot
    5. Press "Clear files" if you have previously added any file. "Add HEX file" (top-right), select the dongle's hex and hit write. Should take half a minute or so.
    6. Unplug & re-plug the dongle!
    7. Now you should be able to connect to the dongle via BLE or USB. USB feels a bit not-so-perfect: I have to send an extra character sometimes to get the full response from the dongle. Didn't have this issue with BLE tho...

    The programmer's log output should look like this:

    2020-06-26T06:41:00.428Z INFO Using USB SDFU protocol to communicate with target
    2020-06-26T06:41:00.446Z INFO Protocol Version:  1 found
    2020-06-26T06:41:00.447Z INFO Hardware: 52840 found
    2020-06-26T06:41:00.452Z INFO Firmware: Bootloader found
    2020-06-26T06:41:00.452Z INFO Firmware: SoftDevice found
    2020-06-26T06:41:00.453Z INFO Firmware: Application found
    2020-06-26T06:41:17.200Z INFO Parsing HEX file:  C:\dev\espruino\_firmware\nRF52840\espru­ino_2v06.6_nrf52840_dongle.hex
    2020-06-26T06:41:17.201Z INFO File was last modified at  23/06/2020, 18:24:22
    2020-06-26T06:41:17.475Z INFO SoftDevice detected, id 0xA9 (S140 v6.0.0)
    2020-06-26T06:42:36.283Z INFO Does not need to be reloaded:  C:\dev\espruino\_firmware\nRF52840\espru­ino_2v06.6_nrf52840_dongle.hex
    2020-06-26T06:42:36.294Z INFO SdReq for SoftDevice is set as 0x00.
    2020-06-26T06:42:36.296Z INFO Hash is generated by SHA256
    2020-06-26T06:42:36.298Z INFO Hash is generated by SHA256
    2020-06-26T06:42:36.311Z INFO Performing DFU. This may take a few seconds
    2020-06-26T06:42:36.380Z INFO DFU procedure starts. This may take a few seconds.
    2020-06-26T06:42:44.785Z INFO DFU for SoftDevice completed successfully!
    2020-06-26T06:42:44.786Z INFO 1 dfu package(s) left.
    2020-06-26T06:42:44.787Z INFO Waiting for device
    2020-06-26T06:42:44.899Z INFO DFU procedure starts. This may take a few seconds.
    2020-06-26T06:42:59.791Z INFO DFU for Application completed successfully!
    2020-06-26T06:42:59.791Z INFO 0 dfu package(s) left.
    2020-06-26T06:42:59.792Z INFO Waiting for device
    2020-06-26T06:43:04.793Z ERROR Reopen device failed: Timeout while waiting for device  C132E264CC6B to be attached and enumerated
    2020-06-26T06:43:04.793Z INFO Nordic DFU Trigger Interface was not found.Please physically reset device.
    2020-06-26T06:43:04.796Z ERROR Device not found due to failure during DFU
    2020-06-26T06:43:04.810Z INFO Target device closed.

    Small correction, looks like I lost my latest board file, so BTNs and LEDs are the same as on the devkit, and that's not correct. But for example D6.toggle() does toggle the green LED. Just look up the pin numbers in the dongle's user guide.

  • in Porting to new Devices
    Avatar for AkosLukacs

    You have to build the firmware yourself, but just built one two days ago, see the attached hex. The board file is above somewhere.
    Just plug it in a USB port, press the button to get into bootloader mode, and you can program it with Nordic's programmer.
    And start hacking. USB and BLE both work.

  • in Projects
    Avatar for AkosLukacs

    Pretty cool :)
    Just some nitpicking: You wrote "java" twice, but it's javascript, not java :)
    And I think there is a bug in train_direction: if the value is 100, 200, 300, 400 or 500, sendvalue will stay at the initial [0x08, 0x00, 0x81, 0x00, 0x01, 0x51, 0x00, 0x00]. Probably would be hard to move the slider to that exact position, but still :)

  • in Other Boards
    Avatar for AkosLukacs

    :( but totally understandable. Thanks!

  • Avatar for AkosLukacs

    Take a look at the source code, might help: https://github.com/espruino/EspruinoDocs­/blob/master/devices/SX127x.js
    IIRC it's just sx.tx(...), and sx.rx(...), but could be wrong...
    If you have the time to add some more docs / tutorial, just send a PR :)

  • in Other Boards
    Avatar for AkosLukacs

    Looks like it's working!
    Tried to merge Nordic's long-range demo with Espruino, but no luck. Any chance of getting BLE long-range in Espruino? Would be great :)

  • in Interfacing
    Avatar for AkosLukacs

    Check http://www.espruino.com/Troubleshooting#­i-typed-save-but-my-connected-device-doe­sn-t-work-at-power-on
    and the next two items in the troubleshooting.

    Do you have any console.log or print in your code?

  • in Interfacing
    Avatar for AkosLukacs

    Looks like that has a regulator and level shifter, probably designed for 5V systems. Can you read the part number on the IC (the one on the lower part of the image)?
    Would be hard to get it working without soldering, but if you can bypass the regulator and the level shifter, should just work.
    Or - might not be easy without soldering - you could use uSD -> SD adapter, like in the docs: http://www.espruino.com/File+IO#wiring