Installing Machinekit on Beaglebone Black For Desktop Use

Hi all,
I have been struggling for the past ten days, as a brand new user, to get my Beaglebone Black rec C (element 14) to run Machinekit on my Win 8.1 PC. To save you the long story, I am totally lost. What I’ve been able to learn during my time playing with all the software and hardware around me from forums, blogs, sites, personal intuition, etc comes down to:

  • successfully flashing an image on a microSD card and then transfer them on to the BB-Black, so that it can run without the flash card inside,

  • connecting BBB to my PC via puTTY and to the internet (albeit, apparently Google only, as I cannot have puTTy download any packages)

Since I am desperately looking for some dummies pointers on the issues I have, I’m giving all the software/hardware coordinates I think are important:

The image I’m using is from here

My Questions are:

  1. BBB does show up on my PC with the default image it comes out with, and I can go through the instructions available on Beagleboard/getting started webpage, but once I replace it with another Image, it doesn’t seem to appear as a drive on my PC nor anywhere on the Device Manager. However, I can putty it to my PC, and share my PC WiFi with it. Given that I have installed the required drivers from BBoard Getting Started, Is this normal?!! If not, What is it that causes this? (I have searched high and low online, but haven’t come up with a concrete conclusion)

  2. I can use my PC WiFi to connect BBB to the Google per online instructions, yet any attempt, via puTTY, to download Machinekit Packages (Just in case, is the link right for my case?!!) from the related website leads in the error:

machinekit@beaglebone:~$ sudo apt-get install machinekit-xenomai
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package machinekit-xenomai

or

machinekit@beaglebone:~$ sudo apt-get install machinekit-posix
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package machinekit-posix

  1. I have downloaded the Machinekit Client on my PC. What else do I need? I can see online that I need download tightVNC viewer both on my PC and on the BBB via puTTY. right? Provided that I can do so, do I need to download a VCP (Visual Control Panel) like QtQuickVcp to use in conjunction with Machinekit? Should I install this on my PC or BBB or both?!!!

  2. My keyboard is misspelling on ThightVNC window. How can I fix this?

Any help, however small, would be appreciated.

Hello,

Look here: https://elinux.org/Beagleboard:BeagleBoneBlack_Debian#BBW.2FBBB_.28All_Revs.29_Machinekit.

Seth

P.S. That should help w/ the image and kernel you need. Also, there is a google groups section of Machine Kit. Here: https://groups.google.com/forum/#!forum/machinekit.

Oh and Sir,

You might want to try, b/c the typing on the X client is showing incorrect values, XFCE for your desktop client. I found that this works at times, too. Here: https://www.xfce.org/. If I am not mistaken, you can just use “sudo apt install xfce4.”

Seth

P.S. I need to double check the apt install xfce4 cmd but I think that is it. I will keep looking around for other info. I have been waiting to get into this idea, the Machine Kit stuff, but I have been unable to find time. I will reply soon.

Hello,

I see you are using Win 8.x. I have Win 10 and my drivers automatically download. If you use a new image, I am sure that you can get the BBB.org drivers they have produced instead of the Win drivers for the BBB.

And yes, step two at the bbb.io/getting-started should show the correct way to get those drivers since you are not on Win 10. Since we are on completely different OSs, I think I may be at an inefficient state. Well, if this helps at all, let me know.

Seth

P.S. I will return service once you have tried the drivers on that page and the xfce install on the BBB. If those help you on your journey, good. If not, I apologize.

Because of the length of my reply, I'm duplicating a paragraph from
below here, so it is the first thing seen!

"""
  However -- the following

claims to be instructions for setting up MachineKit on Debian 9 Stretch --
starting from the recent standard (flashable) OS image.
"""

On Wed, 13 Mar 2019 23:16:49 -0700 (PDT), Sardar Vayghannezgad
<sardar.svn@gmail.com> declaimed the
following:

The image I'm using is from here
<Beagleboard:BeagleBoneBlack Debian - eLinux.org;

  - successfully flashing an image on a microSD card and then transfer
  them on to the BB-Black, so that it can run without the flash card inside,

  It is unclear if that image can be converted to a flasher image -- it
may be SD card only. My suggestion would be to FIRST get it working from
the SD card... THEN consider if it can be flashed to the eMMC.

  - connecting BBB to my PC via puTTY and to the internet (albeit,
  apparently Google only, as I cannot have puTTy download any packages)

  You don't use PuTTY to "connect[ing] BBB to my PC". PuTTY is a Secure
SHell/telnet client that is used to connect to remote systems -- so the
remote BBB must already be reachable via some network before PuTTY can get
to it.

  Since PuTTY is a text console, I don't understand how you claim to have
connectivity to Google -- you aren't running a browser on the BBB (or if
you are it must be an ancient text-only -- like lynx [which I just
installed to demo]).

debian@beaglebone:~$ sudo apt-get install lynx
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  lynx-common
The following NEW packages will be installed:
  lynx lynx-common
0 upgraded, 2 newly installed, 0 to remove and 8 not upgraded.
Need to get 1,672 kB of archives.
After this operation, 4,942 kB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 Index of /debian stretch/main armhf lynx-common all
2.8.9dev11-1 [1,098 kB]
Get:2 Index of /debian stretch/main armhf lynx armhf
2.8.9dev11-1 [575 kB]
Fetched 1,672 kB in 1s (1,034 kB/s)
Selecting previously unselected package lynx-common.
(Reading database ... 76303 files and directories currently installed.)
Preparing to unpack .../lynx-common_2.8.9dev11-1_all.deb ...
Unpacking lynx-common (2.8.9dev11-1) ...
Selecting previously unselected package lynx.
Preparing to unpack .../lynx_2.8.9dev11-1_armhf.deb ...
Unpacking lynx (2.8.9dev11-1) ...
Processing triggers for mime-support (3.60) ...
Setting up lynx-common (2.8.9dev11-1) ...
Setting up lynx (2.8.9dev11-1) ...
update-alternatives: using /usr/bin/lynx to provide /usr/bin/www-browser
(www-browser) in auto mode
debian@beaglebone:~$ lynx google.com
Looking up 'google.com' first
debian@beaglebone:~$

Today, I plugged BBB to another PC; checking the PC’s device manager, I could find a device titled Beaglebone (Black?), something that convinced me there is something wrong with my own PC.
The worst scenario I can find online about BBB driver installation is that BBB is recognized as an “Unknown device” under “Other devices” in the device manage window, not that it is not recognized at all, which happens to be my case. The good news is that, using this web page, now I have my own “Unknown Device” under Other devices" drop down! :slight_smile: This, I hope, already means a step forward.

2019-03-14_21h35_23.png

You have to apt-get update first.

Thanks a lot for your reply. What I end up seeing on puTTY after typing sudo apt-get install [no matter what!]" is the following:

`

Reading package lists… Done
Building dependency tree
Reading state information… Done

E: Unable to locate package xfce4
`
the last line, actually. And like I said in the original post, this happens still when I can ping to google. To the best of my knowledge if you can ping to google, you are connected, right?! And thus you must be able to download, but I am not. I’m coming to the conclusion that this primarily has something to do with BBB driver not appearing on my device manager, despite thatI have installed the drivers from BeagleBoard/getting-started.

  1. First, thanks a million for going to such great lengths to help.

A.

However – the following
https://machinekoder.com/machinekit-debian-stretch-beaglebone-black/
claims to be instructions for setting up MachineKit on Debian 9 Stretch –
starting from the recent standard (flashable) OS image.

I had come across the link you mentioned, and I knew it is more recent than the one I have on BBB now, but I found many people referring to debian-machinekit-8.7 as the latest, best, least-in-need-of-modification image out there, and so I opted that.

B.

It is unclear if that image can be converted to a flasher image – it may be SD card only. My suggestion would be to FIRST get it working from the SD card… THEN consider if it can be flashed to the eMMC.

Typing hostnamectl, when no mSD card is inside the BBB, gives me :
`

machinekit@beaglebone:~$ hostnamectl
Static hostname: beaglebone
Icon name: computer
Machine ID: f4ee2c0f817c4a6e91d28c4d1c48a642
Boot ID: 928edadc13894c9e815ac34f9fffabc7
Operating System: Debian GNU/Linux 8 (jessie)
Kernel: Linux 3.8.13-xenomai-r83
Architecture: arm

`
I thought this already means I have flashed onto eMMC. Am I wrong?

C.

you claim to have connectivity to Google

By connecting, I meant pinging, actually. Isn’t that connecting? Although I cannot “browse” and, in layman’s terms, see anything from the net on the puTTY window (!), but it IS connected to give out such data:

machinekit@beaglebone:~$ ping 8.8.8.8 PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data. 64 bytes from 8.8.8.8: icmp_seq=1 ttl=116 time=29.5 ms 64 bytes from 8.8.8.8: icmp_seq=2 ttl=116 time=27.1 ms 64 bytes from 8.8.8.8: icmp_seq=3 ttl=116 time=26.6 ms 64 bytes from 8.8.8.8: icmp_seq=4 ttl=116 time=37.0 ms 64 bytes from 8.8.8.8: icmp_seq=5 ttl=116 time=59.8 ms 64 bytes from 8.8.8.8: icmp_seq=6 ttl=116 time=28.3 ms

And, yes, I’m doing this by commanding

sudo /sbin/route add default gw 192.168.7.1

I got this from here and here.

D.

SSH is a network protocol, so is not related to having anything show up on your PC as a “device”.

Even if not as a drive, shouldn’t BBB be ever listed somewhere on my device manager page. People out there have reported to have seen this, under “ports” or “other devices” at least.

E.

What does the network info show? From Windows command line:

How can I check that? (I’m starting feeling like a time traveler from some 200 year ago! Is this something I should know?!!)
However, my ifconfig :
`
machinekit@beaglebone:~$ ifconfig
eth0 Link encap:Ethernet HWaddr 84:eb:18:eb:eb:ec
UP BROADCAST MULTICAST DYNAMIC MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:40

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:195488 errors:0 dropped:0 overruns:0 frame:0
TX packets:195488 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:15052336 (14.3 MiB) TX bytes:15052336 (14.3 MiB)

usb0 Link encap:Ethernet HWaddr 84:eb:18:eb:eb:ee
inet addr:192.168.7.2 Bcast:192.168.7.3 Mask:255.255.255.252
inet6 addr: fe80::86eb:18ff:feeb:ebee/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:30126 errors:0 dropped:0 overruns:0 frame:0
TX packets:3012 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3523513 (3.3 MiB) TX bytes:740524 (723.1 KiB)

`

F.

did you do a
sudo apt-get update

Even doing so, gives :
`
machinekit@beaglebone:~$ sudo apt-get update
Err http://deb.machinekit.io jessie InRelease

Err http://security.debian.org jessie/updates InRelease

Err http://ftp.us.debian.org wheezy-backports InRelease

Err http://deb.dovetail-automata.com wheezy InRelease

Err http://deb.machinekit.io jessie Release.gpg
Could not resolve ‘deb.machinekit.io
Err http://repos.rcn-ee.com jessie InRelease

Err http://security.debian.org jessie/updates Release.gpg
Could not resolve ‘security.debian.org
Err http://deb.dovetail-automata.com wheezy Release.gpg
Could not resolve ‘deb.dovetail-automata.com
Err http://ftp.us.debian.org wheezy-backports Release.gpg
Could not resolve ‘ftp.us.debian.org
Err http://repos.rcn-ee.com jessie Release.gpg
Could not resolve ‘repos.rcn-ee.com
Err http://httpredir.debian.org jessie InRelease

Err http://httpredir.debian.org jessie-updates InRelease

Err http://httpredir.debian.org jessie Release.gpg
Could not resolve ‘httpredir.debian.org
Err http://httpredir.debian.org jessie-updates Release.gpg
Could not resolve ‘httpredir.debian.org
Reading package lists… Done
W: Failed to fetch http://httpredir.debian.org/debian/dists/jessie/InRelease

W: Failed to fetch http://httpredir.debian.org/debian/dists/jessie-updates/InRelease

W: Failed to fetch http://security.debian.org/dists/jessie/updates/InRelease

W: Failed to fetch http://deb.machinekit.io/debian/dists/jessie/InRelease

W: Failed to fetch http://repos.rcn-ee.com/debian/dists/jessie/InRelease

W: Failed to fetch http://deb.dovetail-automata.com/dists/wheezy/InRelease

W: Failed to fetch http://ftp.us.debian.org/debian/dists/wheezy-backports/InRelease

W: Failed to fetch http://deb.machinekit.io/debian/dists/jessie/Release.gpg Could not resolve ‘deb.machinekit.io

W: Failed to fetch http://security.debian.org/dists/jessie/updates/Release.gpg Could not resolve ‘security.debian.org

W: Failed to fetch http://ftp.us.debian.org/debian/dists/wheezy-backports/Release.gpg Could not resolve ‘ftp.us.debian.org

W: Failed to fetch http://deb.dovetail-automata.com/dists/wheezy/Release.gpg Could not resolve ‘deb.dovetail-automata.com

W: Failed to fetch http://repos.rcn-ee.com/debian/dists/jessie/Release.gpg Could not resolve ‘repos.rcn-ee.com

W: Failed to fetch http://httpredir.debian.org/debian/dists/jessie/Release.gpg Could not resolve ‘httpredir.debian.org

W: Failed to fetch http://httpredir.debian.org/debian/dists/jessie-updates/Release.gpg Could not resolve ‘httpredir.debian.org

W: Some index files failed to download. They have been ignored, or old ones used instead.

`

THANKS FOR ALL THE EFFORT and TIME YOU PUT in ANSWERING MY QUESTIONS. I LEARNED A LOT FROM YOU.

Hello Sir,

I am about to test the xfce4 on my distro from BBB.io/latest-images. Maybe just using the SD Card would be beneficial at first, i.e. just to test and get online. Then, after updating and getting packages, you can then turn the image into a flasher image on your eMMC.

Anyway…xfce4 works on my machine. I just use apt to install it.

I am sorry but currently I am using Stretch w/ the updated image they have on the bbb.io site.

So, I am thinking that you are not online just yet. As you have typed, you have not been able to get online. I understand that it is upsetting (for now).

Just for precaution, the xfce4 environment is large (even though they say it is lightweight). They have many packages that have been released w/ a new candidate in 2015. 256MB is the size. This will take out a large section of the eMMC on your BBB.

Four years ago seems to be a while back. But, the BBB and tightvnc work well w/ it.

I just read the rest of your info. on this post. Um, I do not ping or ping to google for that fact. I use the Ethernet connections for my BBBs and the connmanctl dialog to connect to WiFi on the BBBW.

I am kind of out of the loop on pings and not being online while pings come through and no packets are being lost.

Seth

P.S. I have not used Win 8.1 ever. So, I am really out of the loop on this situation. Maybe some other people can give better advice on connection issues and connecting to older images/kernels. I have been using 4.14.x via BBB w/ PuTTY and while under Win 10.

You aren’t pinging Google.com, you’re pinging 8.8.8.8. You haven’t got your dns resolve configured properly. What’s in /etc/resolv.conf? It needs to have a line in there like

nameserver 8.8.8.8

Then the apt-get update and other commands will work… Better.

Hello,

https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-vnc-on-debian-9 is something else I just found.

Seth

P.S. I am about to try it out.

Hello Again Sir,

Yes Sir, I know this is getting repetitious.

After you find a way to get online, this is the set of commands to get your system up and running w/ a Desktop Env. on the BBB.

sudo apt install xfce4 tightvncserver

I am sure you already have the realvnc viewer on your Desktop client.

Seth

P.S. If this is getting boring, I am looking into more options but try the SD Card w/ MachineKit and a Ethernet cable.

Hello Sir,

Okay. This is as much as I know right now. Ethernet works on MachineKit b/c I can update and upgrade via online capabilities.

Seth

P.S. Use Ethernet! If you cannot use Ethernet, try to find the good out of the bad when testing the Internet over USB.

Sir,

The driver for Windows is not used any longer. BBB.io people made their own drivers available, I think.

Seth

P.S. My machine, the BBB, does not show up either as of now but it can update and upgrade via apt.

A good and a bad piece of news. The good news is my BBB is up and running now with a neat connection to the net. The bad news is it connected for no clear reason I can explain. Today I just used the same update command I had been putting in during this whole time -and boom -it started updating!! The mere clue I can think of is that I was fumbling with my PC’s device manager yesterday to get BBB to show up with its name somewhere on the list but with no luck. Anyway it is connected now. However, the VCP issues are there. I’ll give that a try soon.

Thanks a million for your support. Like I just posted, I’m connected now.

you already have the realvnc viewer on your Desktop client

Actually, I have tightvnc viewer. Isn’t this different than “realvnc viewer”, which you mentioned? Was that a typo, or should I install realvnc on my desktop too?!

On Thu, 14 Mar 2019 13:10:24 -0700 (PDT), Sardar Vayghannezgad
<sardar.svn@gmail.com> declaimed the
following:

However -- the following
Machinekit with Debian Stretch on the BeagleBone Black - Machine Koder
claims to be instructions for setting up MachineKit on Debian 9 Stretch --
starting from the recent standard (flashable) OS image.

I had come across the link you mentioned, and I knew it is more recent
than the one I have on BBB now, but I found many people referring to
debian-machinekit-8.7
<Beagleboard:BeagleBoneBlack Debian - eLinux.org; as
the latest, best, least-in-need-of-modification image out there, and so I
opted that.

  For a pre-built system, that may be best, but since I'm not familiar
with what is in it, I can't say. The other link is designed to start with a
regular working up-to-date Debian and build MachineKit onto it -- and for
debugging your situation, it helps to start from a known working
configuration. That is: start with flashing (you'll have to follow the
instructions to turn that image into a flasher) that image -- then making
sure IT has full network connectivity. Preferably without using Internet
Connection Sharing -- your problems could be that ICS is not providing
gateway and name-server information to the BBB.

Typing hostnamectl, when no mSD card is inside the BBB, gives me :
machinekit@beaglebone:~$ hostnamectl
  Static hostname: beaglebone
        Icon name: computer
       Machine ID: f4ee2c0f817c4a6e91d28c4d1c48a642
          Boot ID: 928edadc13894c9e815ac34f9fffabc7
Operating System: Debian GNU/Linux 8 (jessie)
           Kernel: Linux 3.8.13-xenomai-r83
     Architecture: arm
I thought this already means I have flashed onto eMMC. Am I wrong?

  It shows something, but there are multiple ways to get a changed kernel
without getting the rest...

By connecting, I meant pinging, actually. Isn't that connecting? Although I
cannot "browse" and, in layman's terms, see anything from the net on the
puTTY window (!), but it IS connected to give out such data:

machinekit@beaglebone:~$ ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=116 time=29.5 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=116 time=27.1 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=116 time=26.6 ms
64 bytes from 8.8.8.8: icmp_seq=4 ttl=116 time=37.0 ms
64 bytes from 8.8.8.8: icmp_seq=5 ttl=116 time=59.8 ms
64 bytes from 8.8.8.8: icmp_seq=6 ttl=116 time=28.3 ms

And, yes, I'm doing this by commanding

  This is direct IP# pinging of the Google provided name-server. But it
is not pinging "google.com" by name. As another response indicates, you may
not have a working name-server to translate names into IP#s

debian@beaglebone:~$ cat /etc/resolv.conf
# Generated by Connection Manager
search attlocal.net attlocal.net
nameserver 192.168.1.254
nameserver 2600:1700:e630:890::1
nameserver 2600:1700:e630:890::1
debian@beaglebone:~$

{Again, I am NOT using USB Internet Connection Sharing -- I have a CAT-5
cable directly connected to my router [well, technically, to an 8-port
switch that connects to the router]. Note that this file states it is
created during the connection}

sudo /sbin/route add default gw 192.168.7.1

I got this from here

<https://ofitselfso.com/BeagleNotes/HowToConnectBeagleboneBlackToTheInternetViaUSB.php&gt;
and here
<https://www.digikey.com/en/maker/blogs/how-to-connect-a-beaglebone-black-to-the-internet-using-usb&gt;
.

  A proper system shouldn't need manual routing (and/or nameserver)
changes.

debian@beaglebone:~$ sudo /sbin/route
[sudo] password for debian:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use
Iface
default dsldevice.attlo 0.0.0.0 UG 0 0 0
eth0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0
eth0
dsldevice.attlo 0.0.0.0 255.255.255.255 UH 0 0 0
eth0
192.168.6.0 0.0.0.0 255.255.255.252 U 0 0 0
usb1
192.168.7.0 0.0.0.0 255.255.255.252 U 0 0 0
usb0
debian@beaglebone:~$

Even if not as a drive, shouldn't BBB be ever listed somewhere on my device
manager page. People out there have reported to have seen this, under
"ports" or "other devices" at least.

  I'm using a stock Debian (the "latest image" page) which does create
that pseudo "drive"... Device manager shows I have:

Disk drives
  Linux File-Stor Gadget USB Device

Network Adapters
  Linux USB Ethernet/RNDIS Gadget

Portable devices
  BEAGLEBONE

Ports
  Gadget Serial (COM7) flagged as no driver installed warning
  USB Serial Device (COM8)

{Just removed COM7 -- we'll see if it comes back in the future}

E.

What does the network info show? From Windows command line:

How can I check that? (I'm starting feeling like a time traveler from some
200 year ago! Is this something I should know?!!)

  Yes -- you should know how to open a Windows command line -- or
PowerShell command line if you want to learn PowerShell <G>.

  <right-click>Start\Run cmd

{though Win10 has it under

  Start\Windows System\Command Prompt

I have a permanent short-cut for it, so it opens with my customized size
and font; the application is found in

    %windir%\system32\cmd.exe
}

  As I showed, on Windows, the command for network stuff is ipconfig, not
ifconfig.

did you do a
        sudo apt-get update

Even doing so, gives :
machinekit@beaglebone:~$ sudo apt-get update
Err http://deb.machinekit.io jessie InRelease

Err http://security.debian.org jessie/updates InRelease

  Which reinforces the concept that you do not have either a valid
name-server, or you do not have full network connectivity.

W: Failed to fetch http://deb.machinekit.io/debian/dists/jessie/Release.gpg
Could not resolve 'deb.machinekit.io'

  And that indicates name-server problems

Hello,

I think any vnc viewer should work. I use realvnc b/c of its simplicity plus their updates are nice. They have made it a long way from scrap to market place in time.

Seth

P.S. Did you ever get your updates to work? If so and if you are updating, did you ever install the xfce4 via apt or apt-get? I installed it and on my BBB, I still needed a tightvncserver install to make the desktop work.

Hi
You have been of much help for me. Thanks for all the information.
Because I thought “apt” was a typo on your part, I installed via apt-get! Honestly, I have been gathering heaps of information so far here and there online, and that’s why I don’t have apparently a clear understanding of what I’m doing with all the software and gadgetry around me. Are you saying apt installs different things than what apt-get would?