I’m having a lot of trouble getting the sandbox setup properly. After
make setup
I get a warning about the /home/user/.cache/pip not being owned by the current user.
The script ends with this output:
> # Install MicroWebSrv2
curl --location https://github.com/jczic/MicroWebSrv2/archive/v2.0.3.zip | tar -C ./dist-packages --strip-components=1 -xvf - MicroWebSrv2-2.0.3/MicroWebSrv2
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 123 0 123 0 0 201 0 --:--:-- --:--:-- --:--:-- 201
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
tar: This does not look like a tar archive
tar: Skipping to next header
100 722k 0 722k 0 0 210k 0 --:--:-- 0:00:03 --:--:-- 262k
tar: MicroWebSrv2-2.0.3/MicroWebSrv2: Not found in archive
tar: Exiting with failure status due to previous errors
tools/setup.mk:3: recipe for target 'download-requirements' failed
make: *** [download-requirements] Error 2
/>
How do I fix this? Does the MicroWebSrv2 need to be installed in Windows?
thanks for writing in and welcome to our community. We will have a look into the issues you are observing. I have deliberately amended your posts for better readability of the error messages.
Do you actually know a way how "make scan-serials" could be done from the command line? As far as I know, the Arduino IDE will make it easy for users to find the UART port their devices are attached to. Since recognizing this from other folks, I am regularly thinking about how we could replicate this kind of convenience suitable to fit into the current Make- and Python-based sandbox environment. ↩︎
Andreas,
Thank you for the rapid reply! I really appreciate it.
make setup completed (with the ownership warnings). make install seems to make it most of the way, but after connecting to the board it cycles several times through this sequence::
.venv3/bin/rshell --port /dev/ttyS5 --user micro --password python --buffer-size 2048 --file tools/upload-sketch.rshell
Using buffer-size of 2048
Connecting to /dev/ttyS5 (buffer-size 2048)...
Trying to connect to REPL connected
Testing if ubinascii.unhexlify exists ... Y
Retrieving root directories ... /flash/
Setting time ... Dec 02, 2019 21:16:59
Evaluating board_name ... pyboard
Retrieving time epoch ... Jan 01, 1970
The items of this sequence will vary on their --file argument. --file tools/upload-sketch.rshell is the last upload task. Everything is fine here, the output is just rather verbose right now.
You will have to establish a local settings.py which you can derive from settings.example.py or settings.example-bob.py first. We might think about improving this situation giving better feedback to the user.
Hm. This should just work, as the communication with the board seems to be successful as uploading works. Occasionally, you might want to reset the board when experiencing hiccups.
May I humbly ask which Pycom Firmware you are running? We recommend the Dragonfly Builds [1], the setup instructions [2] – while in German – can be easily machine-translated through the translation button below the post.
I had trouble getting the latest pycom pybytes versions to run. Forum help pointed to your project, so that is why I’m trying to set up the Terkin environment. I had to start from scratch setting up Ubuntu on WSL to get this far. Now I’m trying to figure out how to access the device itself and write code. I am guessing that Pymakr on Atom will not work when Ubuntu is running.
I’m still at the very beginning trying to figure out my first steps! I really appreciate your help!
I don’t see any problems here in general. However, one has to consider which features to use from which software. The commandline-based sandbox essentially gives you full control about the uploading process and drives the whole thing getting all the sources of Terkin and its third-party packages on bord.
On the other hand, Pymakr’s main functionality is also the file synchronization feature, please correct me if I am wrong on this detail. While we already have it on our agenda [1], the Terkin repository is not prepared to be used with Pymakr with respect to the file synchronization yet.
However, I would like to work on that if that will help the community. Maybe @poesel and you are the first ones ever actually asking for it. Nevertheless, I believe also @clemens and others might like it – so: This might be just the right time to finally start working on that aspect.
Apart from that, just editing in Atom and uploading it through the Sandbox should generally work flawlessly in parallel. However, access to the REPL must be exclusive and this is also used for uploading files.
So, to get more into a possible discussion around these details: Do you also like to use the integrated REPL shell within Atom? This might well block the uploading process, so I might see your point here if you are looking into this very direction.
For my part, I am editing in Pycharm and use make recycle / make repl to access the device at runtime, solely from the commandline [2].
Coming from there, I really would love to improve Terkin’s usage from within Pymakr/Atom to add more convenience for newcomers and users who would like to work within an integrated graphical environment. I would be happy to support you if this also resonates with you.
The main reason why I rejected to use Pymakr/Atom altogether when starting on Pycom and Terkin was its horrible robustness, mainly recognized by others who told me about their pains. That’s why @einsiedlerkrebs and I actually started the commandline-based Sandbox these days. ↩︎
Andreas,
I’m not locked into pymakr/atom at all. I do like atom and would use it as my editor, but I can use the command line environment once I figure it out.
One problem I have is Ubuntu on WSL. The whole file system on WSL seems to be difficult to access and getting atom to edit in that file system seems difficult. Perhaps it’s easier than I think, but I read somewhere that messing with the WSL file system with Windows tools is dangerous. Not sure why.
Perhaps I should ditch WSL and either run Ubuntu in a VM or as a dual boot.
As you have put in so much effort to create the sandbox, I would not ask you to work on pymakr/atom on my account. I’ll look into pycharm.
Thanks
Chris
This was in the past! Now is really easy. Type in the WSL Ubuntu shell
explorer.exe .
Yes, this is a Windows command and notice the dot at the end of the line. You will get the windows file explorer with the Ubuntu file system and you can securely edit your *.py files. You can also copy and paste the path in the file explorer to open a folder in Atom as a project folder!
However, the commandline-based tools can always be as companions to some more integrated tooling. In order to get the Terkin-Datalogger into the hands of more people, appropriate support for the popular IDEs would probably be worth some effort. We always wanted to go into that direction, see also Einsatz der MicroPython Firmware Releases mit IDEs.