0

Circuit Python 4.x rc1 on nRF52840 dongle install?
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Circuit Python 4.x rc1 on nRF52840 dongle install?

by rando on Tue Apr 30, 2019 11:04 pm

Howdy,

Floundering around trying to simply install the latest and greatest CircuitPython 4.x rc1 on the nRF52840 Dongle (10059?)

I have a good binary file (I think, built without error), so was thinking I could use adafruit-nrfutil to take advantage the native dfu bootloader in the chip, but can't seem to find the relevant instructions.

https://github.com/adafruit/circuitpyth ... /README.md

I tried it from a linux vm, but did not get "CIRCUITPY" drive on reset.

Any advice how proceed? I'll post some output from my "successful" dfu upload from the VM. I think I've combined two disparate procedures, with out having a clear understanding of what's actually going on is the problem. :(

Well worth the trouble, I think, however!
Attachments
VirtualBox_Ubuntu 18.04.1 2nd. _30_04_2019_22_20_35.png
VirtualBox_Ubuntu 18.04.1 2nd. _30_04_2019_22_20_35.png (220.27 KiB) Viewed 305 times

rando
 
Posts: 38
Joined: Thu Jan 20, 2011 2:03 pm

Re: Circuit Python 4.x rc1 on nRF52840 dongle install?

by rdagger on Wed May 01, 2019 9:58 am

I don't think the Nordic bootloader will accept a replacement that is not vendor signed. However, you can use the serial wire debug interface to replace it with the Adafruit nRF52 bootloader. I made a video on how to do it with OpenOCD.

rdagger
 
Posts: 24
Joined: Mon Nov 30, 2015 5:44 pm

Re: Circuit Python 4.x rc1 on nRF52840 dongle install?

by rando on Wed May 01, 2019 10:02 am

I'll check it out! Thanks for the consideration of your reply.

Also I wondering if there's a way to OTA Circuit Python up to the Dongle wireless?

rando
 
Posts: 38
Joined: Thu Jan 20, 2011 2:03 pm

Re: Circuit Python 4.x rc1 on nRF52840 dongle install?

by rando on Fri May 03, 2019 2:39 pm

Howdy all,

This appears to be a good go forward:

https://github.com/adafruit/Adafruit_nRF52_Bootloader

If I can get the appropriate build of the Adafruit nRF52 bootloader installed, I should be able to drag and drop everything I need onto the Dongle (I think)

But I think I am chasing my tail with the DFU uploade route. I guess it requires being able to use the appropriate Segger JTAG, or similar, to flash program it, because it's not "signed". Sorry new to this, and rough sledding to get all my ducks in a row. This is exactly in line with rdigger's astute recommendation.

See attached.

R.

Ps. The video link above is fantastic, all his videos are a cut above, and very well worth the time.
Attachments
nRF52840 Dongle failed to DFU program, sign issue.JPG
nRF52840 Dongle failed to DFU program, sign issue.JPG (142.21 KiB) Viewed 185 times

rando
 
Posts: 38
Joined: Thu Jan 20, 2011 2:03 pm

Re: Circuit Python 4.x rc1 on nRF52840 dongle install?

by rando on Thu Aug 01, 2019 5:07 pm

I did stumble on a procedure to use the pca10059, and the latest Micropython to at least get a REPL working ... not very practical.

https://forum.micropython.org/viewtopic.php?f=12&t=5364&hilit=Scanner+ble

"Here's what I did to get Bluetooth REPL running on a pca10059 dongle (beginning with a fresh git clone):

git clone https://github.com/micropython/micropython.git
cd micropython
git submodule update --init
make -C mpy-cross
cd boards/nrf
./drivers/bluetooth/download_ble_stack.sh
modify bluetooth_conf.h

Code: Select all

#elif (BLUETOOTH_SD == 140)

#define MICROPY_PY_BLE (1)
#define MICROPY_PY_BLE_NUS (1)

make BOARD=pca10056 SD=s140

Open nRF Connect, connect to the dongle running in DFU mode, add both
micropython/ports/nrf/build-pca10056-s140/firmware.hex and
micropython/ports/nrf/drivers/bluetooth/s140_nrf52_6.0.0/s140_nrf52_6.0.0_softdevice.hex
and flash the to the dongle.

The dongle now comes up and advertises as "mpus".

I connected to it using Google Chrome running on an Android phone, via the website https://aykevl.nl/apps/nus/. Certainly an enviable amount of free memory!

Quess I will try and connect with a Chromebook next. There is a facility to load files via BLE to the Micropython instance, not tested yet...

Screenshot_20190801-170442.png
Screenshot_20190801-170442.png (35.74 KiB) Viewed 31 times

rando
 
Posts: 38
Joined: Thu Jan 20, 2011 2:03 pm

Please be positive and constructive with your questions and comments.