{"id":1081,"date":"2024-02-12T10:26:35","date_gmt":"2024-02-12T10:26:35","guid":{"rendered":"https:\/\/bechele.de\/?page_id=1081"},"modified":"2026-02-07T17:38:01","modified_gmt":"2026-02-07T17:38:01","slug":"installing-the-bechele-software-from-scratch","status":"publish","type":"page","link":"https:\/\/bechele.de\/?page_id=1081","title":{"rendered":"Installing the bechele software from scratch"},"content":{"rendered":"\n<p><strong>For additional details for Software version 3.0 see also the file README in the \/usr\/local\/bin\/bechele directory after installing the tar ball.<\/strong><br>You will find the tar ball here:<br><a href=\"https:\/\/my.hidrive.com\/share\/pc-obnpvxa\" target=\"_blank\" rel=\"noreferrer noopener\"><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-purple-color\">https:\/\/my.hidrive.com\/share\/pc-obnpvxa<\/mark><\/strong><\/a><\/p>\n\n\n\n<p>My recommendation is to use one of the images provided for download. However, if you want to use a different mini PC, where no image is provided for, you may also install the bechele software from scratch via git or from the provided gzipped tar file from the download page. Generally you need to expect things not running nicely trough, at least I always had to struggle around with different things like missing devices, not activated i2c, kernel modules to load etc. Since we need support for several devices and methods, be prepared for some &#8220;adds&#8221;<\/p>\n\n\n\n<p>The following assumes an installation on Raspbian &#8211; on a different disribution it might be slightly different.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">apt-get update\napt-get upgrade (select all default)\napt-get install vim\napt-get install libi2c-dev\napt-get install minicom\napt-get install mpg123\napt-get install git\n\ngit clone https:\/\/github.com\/wiringpi\n\nHow to build wiringPi:\nTo get it running on a Raspi 3b (it ran nicely on a 1b) I had to modify the file wiringPi.c in the wiringpi\/wiringPi directory. Line 768 and 769 I had to comment out:\n\n<strong><em>\/\/ Start by looking for the Architecture to make sure we're really running\n\/\/      on a Pi. I'm getting fed-up with people whinging at me because\n\/\/      they can't get it to work on weirdFruitPi boards...\n\n  while (fgets (line, 120, cpuFd) != NULL)\n    if (strncmp (line, \"Hardware\", 8) == 0)\n      break ;\n\n \/\/ if (strncmp (line, \"Hardware\", 8) != 0)   &lt;&lt;&lt;&lt;&lt;&lt; modified\n \/\/   piGpioLayoutOops (\"No \\\"Hardware\\\" line\") ; &lt;&lt;&lt;&lt;&lt;&lt; modified\n\n  if (wiringPiDebug)\n    printf (\"piGpioLayout: Hardware: %s\\n\", line) ;<\/em><\/strong>\n\n# cd wiringpi\n# .\/build clean\n# .\/build \n\napt-get install cpanminus\ncpanm RPi::MultiPCA9685\ncpanm WiringPi::API\napt-get install libncurses5-dev libncursesw5-dev\ncpanm Curses::UI\ncpanm Device::SerialPort --verbose (otherwise we get into a timeout)\ncpanm File::Find::Rule\ncpanm Linux::Joystick\ncpanm Time::HR\ncpanm Audio::Play::MPG123\n\nIn addition I had to activate some special stuff:\n\njoystick device: I had to load the kernel module joydev with \"modprobe joydev\"\nin addition it was necessary to add a udev rule to \/etc\/udev\/rules.d\/99-js0.rules: The following entry was required: KERNEL==\"js0\" SYMLINK+=\"js0\"\n\ni2c-device: \nI had to uncomment \/ add the follwing line in \/boot\/firmware\/config.txt:\ndtparam=i2c_arm=on \nOn some other it was necessary to add the referring dtoverlay\n\nserial device: \nI had to uncomment \/ add the follwing line in \/boot\/firmware\/config.txt:\nenable_uart=1\non Armbian it was in \/boot\/armbianEnv.txt:\noverlays=i2c-1 i2c-0 uart3\n\nOn some I had to add entries in \/etc\/modules.load.d:\n<strong>joydev\ni2c-dev<\/strong>\n\nAs really weird worked out, that obviously the default configuration for the serial port pins 8 and 10 on the GPIO header on RaspberryPi3b is instable. Means the port frequency follows the vcore frequency and is therefore variable, that results in unstable serial communication. ( I just ask myself who ever tested this ?!)\nFinally it helped to disable Bluetooth:\nedit \/boot\/config.txt\nAdd at the end of the file:\n<strong>dtoverlay=disable-bt<\/strong>\nAnd disable:\n<strong>systemctl disable hciuart<\/strong>\n\nsee also: https:\/\/www.abelectronics.co.uk\/kb\/article\/1035\/serial-port-setup-in-raspberry-pi-os \n\nfinally copy the provided tar ball to \/ and unpack with:\ntar -xvzf bechele3.tar.gz\nThe binaries should end up in \/usr\/local\/bin ...\nThe sample files should end up in \/home\/bechele3\n\nAfter editing\/adapting \/usr\/local\/bin\/bechele\/Modules\/CondigL.pm to your needs, you should be able to run the software.\n\nPerhaps it may be helpful to add the \/usr\/local\/bin\/bechele directory to your PATH variable. This makes it easier to run the commands.\n\nGood luck ....\n<\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>For additional details for Software version 3.0 see also the file README in the \/usr\/local\/bin\/bechele directory after installing the tar ball.You will find the tar&hellip;<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":1060,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1081","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/bechele.de\/index.php?rest_route=\/wp\/v2\/pages\/1081","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bechele.de\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/bechele.de\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/bechele.de\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/bechele.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1081"}],"version-history":[{"count":3,"href":"https:\/\/bechele.de\/index.php?rest_route=\/wp\/v2\/pages\/1081\/revisions"}],"predecessor-version":[{"id":1499,"href":"https:\/\/bechele.de\/index.php?rest_route=\/wp\/v2\/pages\/1081\/revisions\/1499"}],"up":[{"embeddable":true,"href":"https:\/\/bechele.de\/index.php?rest_route=\/wp\/v2\/pages\/1060"}],"wp:attachment":[{"href":"https:\/\/bechele.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1081"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}