Before I start inventing the wheel again did anyone out there modify ETCs arch linux from fixed IP node with WiFi server to a Wifi-client with DHCP?
I have to admit, that I am quite annoyed of the edit handling.
To read python documentation or similar in the net I have always to switch the network.
To transport images to the USB stick I have to shut down ETC, move the stick to the computer, copy, move back, boot,…
It would be much easier, if the network setup would be a wifi client with DHCP or fixed IP address. Then one could run a ftp or ssh daemon running (instead of the webserver), and upload and organize all files. Editing could be done with my favorite editor. etc. pp.
replacing name and pw with those of network. now it should join existing network. make sure network is 2.4 GHz!
ssh still not available, but you can run this mode to enable ssh. This also creates a web file manager running at whatever the ip is for transferring files (check on screen display for ip). The editor will still be running on port 8080. ssh user and pw is root.
that’s clear. No, I meant which link do I have to call after I invoked the 0-webfiles Mode.
It must be something like 192.168.12.1:8080/static/fm/index.html
(at least this subdir exists on the static-subfolder of the 0-webfiles dir, and it contains the right index.html).
But meanwhile I choose to go a different direction.
I use the WiFi client configuration explained above by @oweno which allows me to access the USB-drive in the ETC directly from my machine. At the moment I use ssh/scp, but I will export the filesystem on the ETC, and mount the directory directly on my Mac Book.
That is much easier for the filetransfer than the webbased GUI (at least for me, as I have to handle Linux / Unix in my dayjob).
You create /etc/exports and add the path which shall be exported (in this case /usbdrive)
Then you start the nfs-server (systemctl nfs-server.service enable or start)
On the Mac side it is simply adding a remote filesystem
BTW: I found that sometimes the python process hangs in this network configuration. It happens about two or three seconds after the first Mode started. While these few seconds I can use the knobs and buttons, but after that the screen freezes and the buttons do no longer react. The linux itself is running fine.
It does not always but it happens.
I added stdout and stderr redirection to the start command in /root/ETC_Sys/scripts/start-etc.sh like echo "#################date############" >> /tmp/etc.log python2 main.py >> /tmp/etc.log 2>&1 &
But the output is quite poor
#################Sat Oct 17 01:07:27 UTC 2015############
Failed to symlink /root/.config/pulse/0ad93370e24141368e4ae814b5796c88-runtime.tmp to /tmp/pulse-PKdhtXMmr18n: Read-only file system
Failed to symlink /root/.config/pulse/0ad93370e24141368e4ae814b5796c88-runtime.tmp: Read-only file system
libpng warning: iCCP: known incorrect sRGB profile
dmesg doesn’t report anything unusual.
Do we have any other possibility to see, what python is doing here? Do truss / tusc / strace / trace exist in arch linux?
is python crashing? (i.e. is the python process still running after its freezing?)
you could install strace via pacman
I actually quite like the web editor, the only thing i dont like is the left hand pane, where the files and save options are… I think the save options, probably should be buttons at the top, so they are always available without having to scroll thru the whole mode list.
I think when I get time I might take at look at improving the editor, as its pretty sound otherwise, and the workflow when developing modes is really fast
btw… if you do want to edit remotely, you’ll also want to look at the osc messages that is used to tell ETC/python that the file has change, and so to reload the mode… you can find this either in the web editor code, or osc.py.
(sorry cant remember the message off-hand)
btw… if your going down the route of remote editing , Id also recommend switching to using the sdcard for storing modes, see my organelle post on this… this only requires a very small change in etc_system.py, my experience is the sdcard is much more reliable than usbsticks.
(and frees up the usb ports for midi controller(s) without needing to carry around a usb hub as well )
The process still exists, but it needs a kill -9. I can’t say whether it hangs in a loop or is really stuck. That is, why I’d like to strace it.
Btw: I have the same opinions on the webbased editor (if you ever move the save buttons to the top, then please also make the sort order alphabetical). My goal is not to replace the editor, but I mostly want to handle image files or fonts and also organizing modes (adding / removing / renaming …) is much easier with a usual filesystem access.
hmm, and its not animating still? or just not responding to controls?
if its not animating, probably an issue with pygame - perhaps blocked in its main loop.
if it just not responding to controls it could be the etc daemon process has crashed (this routes from the micro controller to python via osc)
as you say, hard to know without more info… anyway strace should be installable, it is on my organelle.
(sorry i dont have an ETC to test with so cant look into the real cause, as it’ll be different on the organelle/otc)
web editor, yeah agreed…
what I do when i want to organise things (or do quick edits ;)) is log in via SSH and then do them directly on the box - its faster for me, than using remote filesystems etc.
… also means I can restart processes where necessary, which you sometimes have to do as ETC caches things in memory.
It is not animating. So it looks like the pygame is blocked.
I will install strace as next step. (I hope I won’t destroy the linux installation )
Yepp. I recognized that too. I made an mistake in programming, corrected it, but the behaviour stayed the same. I found that it helps, if I remove the pyc file, befor I save the Mode. It looks like python refills its caches when it compiles.
I just wanted let you know the solution for the hang:
I found that it is not wise to start the Network client (dhcpcd in the example given by @oweno above), while python is running already.
So I moved the WiFi initialisation in /root/ETC_Sys/scripts/setup.sh in front of the start-etc.sh:
It is nowlike this:
#etc-start moved after Wifi.sh
# try to start wifi if there is a config file
# and start the web interface
if [ -f /usbdrive/WiFi.sh ]; then
echo "wifi usb adapter found"
if [ -f /usbdrive/WiFi.sh ]; then
I am happy that I can help to make this nice product even better.
I found that out, when I replaced python2 main.py in start-etc.sh by strace -o /tmp/strace_etc.out.txt python2 main.py. This causes python to run much slower.
With this “slowed down version” of python, the problem did not appear.
My interpretation is, that there is a kind of Xserver running, to which the display of python is sent. If we change the network setting we change in consequence maybe also the $DISPLAY setting (if I had the on screen display activated I still saw the 127.0.0.1 though I could access the ETC under its 192.168… address) Python might not like it, that the IP / display variable change happens while it is trying to write one of the 30 frames.
With the move of the WLAN startup the new $DISPLAY variable is already set, when python starts.
I’m reviving this old topic, because I can’t seem to enable the SSH server. I’m running the 0-WebFiles mode, and the “Organelle Patches” (LOL) web server runs fine, but SSH seems to still be off, giving me “connection refused”.
Is the sshd set to a different port by default?
Also, there is a mention in this thread of using a keyboard to drop to command-line. How do I do this?