Most recent activity
-
I used pip install nrfutil==5.2.0
See https://pypi.org/project/nrfutil/#history for moreBut as long as I don't get it running, I would not suggest to change provision.sh
-
After doing some searching in the web, BTW I'm working with ubuntu 18.04.4 LTS
Actual nrfutil version is 6, but with that I get errors around installing pc-ble-driverFigured out, that nrfutil V 5.22 can be installed.
Actual installation according to pip list is..... ..... nrfutil (5.2.0) .... .... pc-ble-driver-py (0.11.4) .... ....
I've got an error and somewhere I found to do this
export LC_ALL=C.UTF-8 export LANG=C.UTF-8
But now I'm running into problems inside py-sources.
Sometimes life is not as friendly as it could be ;-( -
-
I've tried to compile firmware for MDBT42Q.
Installation of nrfutil, copied from provision.sh, fails.
Any idea?sudo pip install --ignore-installed nrfutil .... .... Collecting pc_ble_driver_py>=0.14.2 (from nrfutil) Could not find a version that satisfies the requirement pc_ble_driver_py>=0.14.2 (from nrfutil) (from versions: 0.1.0, 0.2.0, 0.3.0, 0.4.0, 0.5.0, 0.6.0, 0.6.1, 0.6.2, 0.8.0, 0.8.1, 0.9.0, 0.9.1, 0.10.0, 0.11.0, 0.11.1, 0.11.2, 0.11.3, 0.11.4) No matching distribution found for pc_ble_driver_py>=0.14.2 (from nrfutil)
-
At least in my test, it did not matter, writing data or an empty string.
writing undefined or nothing gives an error, but, surprise,surprise, a file is created.
@fanoush, Data cannot be overwritten, thats a good point. I did not read this before.
BTW, try this:st.write("a","",0,10); =true >st.read("a"); ="\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF" >st.readArrayBuffer("a"); =new Uint8Array([255, 255, 255, 255, 255, 255, 255, 255, 255, 255]).buffer >st.write("a","AB",0); =true >st.read("a") ="AB" >st.readArrayBuffer("a"); =new Uint8Array([65, 66]).buffer >st.write("a","CD",2); Uncaught Error: Too much data for file size at line 1 col 20 st.write("a","CD",2); ^ >st.write("a",[66,67],2); Uncaught Error: Too much data for file size at line 1 col 23 st.write("a",[66,67],2); ^ >st.read("a"); ="AB" >
On the other hand, this works
>st.write("a","abcd",0,10); =true >st.readArrayBuffer("a"); =new Uint8Array([97, 98, 99, 100, 255, 255, 255, 255, 255, 255]).buffer >st.write("a","efg",4); =true >st.readArrayBuffer("a"); =new Uint8Array([97, 98, 99, 100, 101, 102, 103, 255, 255, 255]).buffer >st.read("a") ="abcdefg\xFF\xFF\xFF" >
Anyway, it works for me now ;-)
-
Supporting size again did not help.
I've a different hack ;-)I'm using Storage to save some images data from GraphicsBuffer.
Creating the file was seperated from writing data.//initialization of file storage var st = require("Storage"); var fn = "b"; st.write(fn,'X',0,1024); ...... ...... //write data to file for(y = 0; y < height; y++){ st.write(fn,data_for_one_line,y * width); // write one line of graphics data }
My hack is to remove write in initialization, and add size to write of first line.
-
My idea was to define a file in storage and use it free like this:
var st = require("Storage"); var fn = "b"; st.write(fn,'X',0,20); print(st.read(fn)); st.write(fn,[64,65,66],0); print(st.read(fn));
This only works fine, if 2nd write does not use 0 for offset.
Otherwise, size is reduced to data written. In this case 3, and not 20 as defined in first write.
got it running at the end (HIP HIP HURRAY)
IMHO at the end its all about PYTHON version hell. No idea, why python3.6 did not accept nrfutil 6.1.0. Testing with TensorFlow and Opencv might have been the root of problems
I'm pretty sure people with more knowhow around python could explain. People like me, that want to compile Espruino only, have to walk through dessert to find some water_
This is my way to find water:
now I've a folder ~/.local/lib/python3.8/site-packages.And nrfutil is installed in version 6.1.0
Next switched to folder with Espruino-installation and called
and it worked fine. I've got my zip for uploading to MDB42Q board