Porting espruino to a custom nrf52 device

Posted on
  • Hi all,

    I am trying to port espruino to a nrf52 based iTracker board that I recently got from RAK wireless.
    The setup of the board is very similar to the Puckjs board and p0.28 and p0.29 are the rx/tx pins. So i tried building the firmware for the board.

    However once I have built the firmware (bootloader included) and flashed the device using nrfjprog, I am able to see the device correctly on my android device (I am using nrf connect app) and also able to see the nordic BLE UART service + characteristics, but I am not able to get the Espruino Serial output on this UART service.

    I also tried connecting the NRF UART app on android to the iTracker board but still not able to see the REPL interface

    So after snooping around, In the PUCKJS board py file, i was able to see a comment like so:

    'D28' : "If pulled up to 1 on startup, D28 and D29 become Serial1",

    Do I need to pull D28 to a HIGH (+3.3v) to enable the Serial port ?

    Please let me know if I am missing something here.
    I also plan to dedicate some of my time to add support for this board into the Espruino mainline. Is there a way I can do so by sending PR for the board after the necessary changes to include a BOARDS.py file. I just want to give back to the awesome open source community behind Espruino.

    Regards
    Naresh K

  • i tried connecting to the Espruino using the Espruino command line on my raspberry pi and here is the output

    pi@ttn-gateway:~ $ espruino --list

    Espruino Command-line Tool 0.0.36

    PORTS:
    /dev/ttyAMA0
    pi@ttn-gateway:~ $ espruino -p /dev/ttyAMA0

    Espruino Command-line Tool 0.0.36

    Connecting to '/dev/ttyAMA0'
    No result found - just got ""
    Connected

    Not sure why i am getting the " just got "" " line
    ideally it should shows the REPL-like interface right ??

  • Hi All

    I was able to get the Espruino IDE working from an android mobile (samung s7) and was able to see the repl interface come up correctly on to the console on the left.

    TO debug what was wrong from the PC side, I tried runing a couple of Google Web Bluetooth demos (https://googlechrome.github.io/samples/w­eb-bluetooth/) and they are able to see the device but while enumerating the characteristics, there is some issue. Maybe its my bluetooth dongle or some other isssue. Will keep this port updated as i progress. Maybe it can serve as a learning for other devs.

    I will start adding the pin defintion and related jswrap files for the itracker to enable the use of the NBIoT module and the GPS module on it. Then proceed to add the various sensors as well. Hopefully will be able to get a new board support into Espruino.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Porting espruino to a custom nrf52 device

Posted by Avatar for narioinc89 @narioinc89

Actions