Close

Debian Stretch, mostly

A project log for Arcus-3D-C1 - Cable 3D printer

3D printable, Open Source Hardware, tripod kinematics, cable driven 3D printer

masterofnullMasterOfNull 11/01/2017 at 22:440 Comments

Machinekoder and the rest of the Machinekit folks have been busy.  

Supposedly I can now use the regular Debian stretch image and Machinekit will work.  

Here goes.

EDIT: Um... my config was missing stuff yes, but once I fixed that I discovered I had used the wrong kernel version.  I needed 4.4 to support the PRU bindings it uses.  I think I'll start over with the right one as an image with 4.4 exists.  Starting over with this.

Downloaded the latest image, from eLinux.org, put it on an sd card, stuck it in the BBGW and waited the 10 minutes it takes to re-flash the eMMC.

It shuts down after flashing is done.

Removed the sd card, and powered it up.  It booted.  That's a good sign as I previously had cleared the on-board eMMC so no confusion would happen.

A new wifi network named Beaglebone-<hash> appeared and I connected to it with the default wifi password of 'BeagleBone'.  It gave me an IP address as it's configured as a SoftAP out of the box.

Was able to ssh into it at debian@192.168.8.1 with a password of 'temppwd'.

daren@fred ~ $ ssh debian@192.168.8.1
debian@192.168.8.1's password: 
Linux beaglebone 4.9.59-ti-r73 #1 SMP PREEMPT Sat Oct 28 18:53:20 UTC 2017 armv7l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
debian@beaglebone:~$

Next, I connected it up to my home wifi so I could use it as a network bridge.

debian@beaglebone:~$ sudo connmanctl

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.

[sudo] password for debian:

Error getting VPN connections: The name net.connman.vpn was not provided by any 
connmanctl> enable wifi
Error wifi: Already enabled
connmanctl> scan wifi
Scan completed for wifi
connmanctl> services
    Arcus3D              wifi_2cf7f1062e1e_41726375733344_managed_psk
    6R6YK                wifi_2cf7f1062e1e_365236594b_managed_psk
connmanctl> agent on
Agent registered
connmanctl> connect wifi_2cf7f1062e1e_41726375733344_managed_psk
Agent RequestInput wifi_2cf7f1062e1e_41726375733344_managed_psk
  Passphrase = [ Type=psk, Requirement=mandatory ]
Passphrase? *************
Connected wifi_2cf7f1062e1e_41726375733344_managed_psk
connmanctl> quit

Verified I am indeed connected through the Beaglebone to the internet.  Yep.  

Wow.  That was so simple compared to what I remember back in the day.  :)

Followed the instructions for adding the Machinekit repo.

root@beaglebone:~# sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 43DDF224
Executing: /tmp/apt-key-gpghome.H81zUg6eUM/gpg.1.sh --keyserver hkp://keyserver.ubuntu.com:80 --recv 43DDF224
gpg: failed to start the dirmngr '/usr/bin/dirmngr': No such file or directory
gpg: connecting dirmngr at '/tmp/apt-key-gpghome.H81zUg6eUM/S.dirmngr' failed: No such file or directory
gpg: keyserver receive failed: No dirmngr
root@beaglebone:~# sudo sh -c \
>   "echo 'deb http://deb.machinekit.io/debian stretch main' > \
>   /etc/apt/sources.list.d/machinekit.list"
root@beaglebone:~# sudo apt-get update
Hit:1 http://repos.rcn-ee.com/debian stretch InRelease                         
Ign:2 http://deb.debian.org/debian stretch InRelease                           
Hit:3 http://deb.debian.org/debian stretch-updates InRelease
Get:4 http://deb.debian.org/debian-security stretch/updates InRelease [63.0 kB]
Hit:5 http://deb.debian.org/debian stretch Release                             
Get:6 http://deb.machinekit.io/debian stretch InRelease [3,377 B]
Ign:6 http://deb.machinekit.io/debian stretch InRelease   
Get:8 http://deb.machinekit.io/debian stretch/main armhf Packages [22.2 kB]
Fetched 88.5 kB in 5s (15.7 kB/s)   
Reading package lists... Done
W: GPG error: http://deb.machinekit.io/debian stretch InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY F81BD2B7499BE968
W: The repository 'http://deb.machinekit.io/debian stretch InRelease' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
root@beaglebone:~#

Installed a suitable rt-preempt kernel and rebooted.  Basically look for the current kernel with -rt- in it.

Then install the firmware it recommends.

root@beaglebone:~# uname -a
Linux beaglebone 4.9.59-ti-r73 #1 SMP PREEMPT Sat Oct 28 18:53:20 UTC 2017 armv7l GNU/Linux
root@beaglebone:~# apt-cache search linux-image-4.9.59-ti
linux-image-4.9.59-ti-r73 - Linux kernel, version 4.9.59-ti-r73
linux-image-4.9.59-ti-rt-r73 - Linux kernel, version 4.9.59-ti-rt-r73
root@beaglebone:~# apt-get install linux-image-4.9.59-ti-rt-r73
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Suggested packages:
  linux-firmware-image-4.9.59-ti-rt-r73
The following NEW packages will be installed:
  linux-image-4.9.59-ti-rt-r73
0 upgraded, 1 newly installed, 0 to remove and 3 not upgraded.
Need to get 23.3 MB of archives.
After this operation, 91.4 MB of additional disk space will be used.
Get:1 http://repos.rcn-ee.com/debian stretch/main armhf linux-image-4.9.59-ti-rt-r73 armhf 1stretch [23.3 MB]
Fetched 23.3 MB in 53s (440 kB/s)                                              
Selecting previously unselected package linux-image-4.9.59-ti-rt-r73.
(Reading database ... 73804 files and directories currently installed.)
Preparing to unpack .../linux-image-4.9.59-ti-rt-r73_1stretch_armhf.deb ...
Unpacking linux-image-4.9.59-ti-rt-r73 (1stretch) ...
Setting up linux-image-4.9.59-ti-rt-r73 (1stretch) ...
update-initramfs: Generating /boot/initrd.img-4.9.59-ti-rt-r73
zz-uenv_txt: Updating /boot/uEnv.txt [uname_r=4.9.59-ti-rt-r73]
root@beaglebone:~# apt-get install linux-firmware-image-4.9.59-ti-rt-r73
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  linux-firmware-image-4.9.59-ti-rt-r73
0 upgraded, 1 newly installed, 0 to remove and 4 not upgraded.
Need to get 182 kB of archives.
After this operation, 557 kB of additional disk space will be used.
Get:1 http://repos.rcn-ee.com/debian stretch/main armhf linux-firmware-image-4.9.59-ti-rt-r73 armhf 1stretch [182 kB]
Fetched 182 kB in 0s (244 kB/s)                           
Selecting previously unselected package linux-firmware-image-4.9.59-ti-rt-r73.
(Reading database ... 76687 files and directories currently installed.)
Preparing to unpack .../linux-firmware-image-4.9.59-ti-rt-r73_1stretch_armhf.deb ...
Unpacking linux-firmware-image-4.9.59-ti-rt-r73 (1stretch) ...
Setting up linux-firmware-image-4.9.59-ti-rt-r73 (1stretch) ...
root@beaglebone:~# reboot

And... it took forever to boot.  I think this was partly because connmanctl was now trying to get on my wifi during boot, and it was kinda far from the router.

Got back on via ssh, became root again, and installed Machinekit.

root@beaglebone:~# sudo apt-get install machinekit-rt-preempt
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  blt bwidget freeglut3 gir1.2-atk-1.0 gir1.2-freedesktop gir1.2-gdkpixbuf-2.0
  gir1.2-glib-2.0 gir1.2-gst-plugins-base-1.0 gir1.2-gstreamer-1.0
  gir1.2-gtk-3.0 gir1.2-pango-1.0 gnome-mime-data graphviz
  gstreamer1.0-plugins-base iso-codes libann0 libart-2.0-2 libbonobo2-0
  libbonobo2-common libbonoboui2-0 libbonoboui2-common libboost-python1.62.0
  libboost-serialization1.62.0 libboost-system1.62.0 libboost-thread1.62.0
  libcanberra0 libcdparanoia0 libcdt5 libcgraph6 libczmq4
  libgirepository-1.0-1 libgnome-2-0 libgnome2-common libgnomecanvas2-0
  libgnomecanvas2-common libgnomeui-0 libgnomeui-common libgnomevfs2-0
  libgnomevfs2-common libgnomevfs2-extra libgstreamer-plugins-base1.0-0
  libgstreamer1.0-0 libgtkglext1 libgtksourceview2.0-0
  libgtksourceview2.0-common libgts-0.7-5 libgts-bin libgvc6 libgvpr2
  libidl-2-0 libjansson4 libmodbus5 liborbit-2-0 liborbit2 liborc-0.4-0
  libpango1.0-0 libpangox-1.0-0 libpangoxft-1.0-0 libpathplan4 libpgm-5.2-0
  libprotobuf10 libsodium18 libtcl8.6 libtk-img libtk8.6 libvisual-0.4-0
  libvte-common libvte9 libxdot4 libzmq5 machinekit python-avahi
  python-configobj python-dbus python-gconf python-gdbm python-gi
  python-gnome2 python-gst-1.0 python-gtkglext1 python-gtksourceview2
  python-imaging python-opengl python-pil python-pil.imagetk
  python-pkg-resources python-protobuf python-pydot python-pyftpdlib
  python-pyorbit python-pyparsing python-sendfile python-simplejson python-six
  python-tk python-vte python-xlib python-zmq python3-cairo python3-gi
  python3-gi-cairo tcl tcl-tclreadline tcl8.6 tk tk8.6 tk8.6-blt2.5 xdot
  yapps2-runtime
Suggested packages:
  blt-demo gsfonts graphviz-doc isoquery libbonobo2-bin libcanberra-gtk0
  libcanberra-pulse libgnomevfs2-bin libvisual-0.4-plugins gstreamer1.0-tools
  libtk-img-doc python-configobj-doc python-dbus-dbg python-dbus-doc
  python-gnome2-doc python-gdbm-dbg python-gi-cairo libgtksourceview2.0-dev
  libgle3 python-pil-doc python-pil-dbg python-pil.imagetk-dbg
  python-setuptools python-pyparsing-doc tix python-tk-dbg
The following NEW packages will be installed:
  blt bwidget freeglut3 gir1.2-atk-1.0 gir1.2-freedesktop gir1.2-gdkpixbuf-2.0
  gir1.2-glib-2.0 gir1.2-gst-plugins-base-1.0 gir1.2-gstreamer-1.0
  gir1.2-gtk-3.0 gir1.2-pango-1.0 gnome-mime-data graphviz
  gstreamer1.0-plugins-base iso-codes libann0 libart-2.0-2 libbonobo2-0
  libbonobo2-common libbonoboui2-0 libbonoboui2-common libboost-python1.62.0
  libboost-serialization1.62.0 libboost-system1.62.0 libboost-thread1.62.0
  libcanberra0 libcdparanoia0 libcdt5 libcgraph6 libczmq4
  libgirepository-1.0-1 libgnome-2-0 libgnome2-common libgnomecanvas2-0
  libgnomecanvas2-common libgnomeui-0 libgnomeui-common libgnomevfs2-0
  libgnomevfs2-common libgnomevfs2-extra libgstreamer-plugins-base1.0-0
  libgstreamer1.0-0 libgtkglext1 libgtksourceview2.0-0
  libgtksourceview2.0-common libgts-0.7-5 libgts-bin libgvc6 libgvpr2
  libidl-2-0 libjansson4 libmodbus5 liborbit-2-0 liborbit2 liborc-0.4-0
  libpango1.0-0 libpangox-1.0-0 libpangoxft-1.0-0 libpathplan4 libpgm-5.2-0
  libprotobuf10 libsodium18 libtcl8.6 libtk-img libtk8.6 libvisual-0.4-0
  libvte-common libvte9 libxdot4 libzmq5 machinekit machinekit-rt-preempt
  python-avahi python-configobj python-dbus python-gconf python-gdbm python-gi
  python-gnome2 python-gst-1.0 python-gtkglext1 python-gtksourceview2
  python-imaging python-opengl python-pil python-pil.imagetk
  python-pkg-resources python-protobuf python-pydot python-pyftpdlib
  python-pyorbit python-pyparsing python-sendfile python-simplejson python-six
  python-tk python-vte python-xlib python-zmq python3-cairo python3-gi
  python3-gi-cairo tcl tcl-tclreadline tcl8.6 tk tk8.6 tk8.6-blt2.5 xdot
  yapps2-runtime
0 upgraded, 110 newly installed, 0 to remove and 0 not upgraded.
Need to get 34.8 MB of archives.
After this operation, 146 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
WARNING: The following packages cannot be authenticated!
  machinekit-rt-preempt machinekit
Install these packages without verification? [y/N] y
Get:1 http://deb.debian.org/debian stretch/main armhf libart-2.0-2 armhf 2.3.21-2 [60.3 kB]

..... lots and lots trimmed .....

Setting up python-pil.imagetk:armhf (4.0.0-4) ...
Setting up libgnomeui-0:armhf (2.24.5-3.1) ...
Setting up python-gnome2 (2.28.1+dfsg-1.2) ...
Setting up machinekit-rt-preempt (0.1.1509172789.gitfd30aa2-1~stretch) ...
Setting up machinekit (0.1.1509172789.gitfd30aa2-1~stretch) ...
[ ok ] Restarting udev (via systemctl): udev.service.
Processing triggers for libc-bin (2.24-11+deb9u1) ...
Processing triggers for rsyslog (8.24.0-1) ...
root@beaglebone:~#

Enabled the remote interface for Machinekit.

root@beaglebone:~# sed -i 's/^REMOTE\s*=\s*0/REMOTE=1/' /etc/linuxcnc/machinekit.ini
root@beaglebone:~#

Stopped being root, went back to my home dir, and git cloned the config and interface.

root@beaglebone:~# exit
debian@beaglebone:~$ cd ~
debian@beaglebone:~$ git clone https://github.com/machinekoder/Arcus-3D-C1-BeBoPr.git
Cloning into 'Arcus-3D-C1-BeBoPr'...
remote: Counting objects: 27, done.
remote: Compressing objects: 100% (17/17), done.
remote: Total 27 (delta 10), reused 25 (delta 8), pack-reused 0
Unpacking objects: 100% (27/27), done.
debian@beaglebone:~$ git clone https://github.com/qtquickvcp/Machineface.git
Cloning into 'Machineface'...
remote: Counting objects: 552, done.
Receiving objects: 100% (552/552), 437.85 KiB | 0 bytes/s, done.
remote: Total 552 (delta 0), reused 0 (delta 0), pack-reused 552
Resolving deltas: 100% (364/364), done.
debian@beaglebone:~$ 

It starts, then dies.

But my config is broken again since I didn't push after my last changes and blew them away by flashing.  

Doh.  

Working on it.

Discussions