{"id":1107,"date":"2022-08-10T09:18:47","date_gmt":"2022-08-10T16:18:47","guid":{"rendered":"https:\/\/jasonsblog.access.ly\/?p=1107"},"modified":"2022-11-05T09:24:07","modified_gmt":"2022-11-05T16:24:07","slug":"how-to-manually-download-and-compile-mmdvmhost-or-any-of-the-other-components-of-pi-star","status":"publish","type":"post","link":"https:\/\/jasonsblog.ddns.net\/index.php\/2022\/08\/10\/how-to-manually-download-and-compile-mmdvmhost-or-any-of-the-other-components-of-pi-star\/","title":{"rendered":"How to Manually Download and Compile MMDVMHost or Any of the Other Components of Pi-Star"},"content":{"rendered":"\n<p>Andy Taylor, MW0MWZ, who maintains <a aria-label=\"Pi-Star (opens in a new tab)\" href=\"https:\/\/www.pistar.uk\/\" target=\"_blank\" rel=\"noreferrer noopener\" class=\"ek-link\">Pi-Star<\/a> uses old versions of <a aria-label=\"MMDVMHost (opens in a new tab)\" href=\"https:\/\/github.com\/g4klx\/MMDVMHost\" target=\"_blank\" rel=\"noreferrer noopener\" class=\"ek-link\">MMDVMHost<\/a> and <a aria-label=\"DMRGateway (opens in a new tab)\" href=\"https:\/\/github.com\/g4klx\/DMRGateway\" target=\"_blank\" rel=\"noreferrer noopener\" class=\"ek-link\">DMRGateway<\/a> probably for stability, but I&#8217;ve taken to using the latest versions with all the bug fixes on my Pi-Star hotspots. Really what Andy maintains with Pi-Star for the community is the web dashboard interface as well as scripts for updating with the compiled binaries on Github  and also all packaged up in an image to be installed on your microSD card. Andy has also done a fair bit of customization to the OS and BASH prompts which I find to be a bit much, but the end product is very good and easy to use for a lot of less GNU\/Linux experienced hams. But the core of what makes the digital hotspot operate is the work of <a aria-label=\"Jonathan Naylor, G4KLX (opens in a new tab)\" href=\"https:\/\/github.com\/g4klx\" target=\"_blank\" rel=\"noreferrer noopener\" class=\"ek-link\">Jonathan Naylor, G4KLX<\/a> and other contributors with honorable mention of <a aria-label=\"Andy Uribe, CA6JAU (opens in a new tab)\" href=\"https:\/\/github.com\/juribeparada\" target=\"_blank\" rel=\"noreferrer noopener\" class=\"ek-link\">Andy Uribe, CA6JAU<\/a> for his MMDVM_HS firmware.<\/p>\n\n\n\n<p>The tools to download the source code and compile it are already installed on the Pi-Star image, so you just need to go to Jonathan Naylor&#8217;s Github page: <\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/g4klx\/MMDVMHost\">https:\/\/github.com\/g4klx\/MMDVMHost<\/a><\/p>\n\n\n\n<p>You&#8217;ll notice the green Code button, click on that and in the box that pops up you can click the copy button to the right of the address.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"814\" src=\"https:\/\/jasonsblog.ddns.net\/wp-content\/uploads\/2022\/11\/Screenshot_20220810_091314-1024x814.png\" alt=\"\" class=\"wp-image-1970\" srcset=\"https:\/\/jasonsblog.ddns.net\/wp-content\/uploads\/2022\/11\/Screenshot_20220810_091314-1024x814.png 1024w, https:\/\/jasonsblog.ddns.net\/wp-content\/uploads\/2022\/11\/Screenshot_20220810_091314-300x239.png 300w, https:\/\/jasonsblog.ddns.net\/wp-content\/uploads\/2022\/11\/Screenshot_20220810_091314-768x611.png 768w, https:\/\/jasonsblog.ddns.net\/wp-content\/uploads\/2022\/11\/Screenshot_20220810_091314.png 1416w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>SSH into your Pi-Star machine. A lot of people promote Putty, but if you&#8217;re on Windows 10 or later you can actually just do this from the Windows Powershell prompt. Right click on the start menu and select Windows Powershell. An even better option is to download the free Windows Terminal app from the app store (really good option if you want to play with Windows Subsystem for Linux &#8211; Linux virtualization):<\/p>\n\n\n\n<p><a href=\"https:\/\/apps.microsoft.com\/store\/detail\/windows-terminal\/9N0DX20HK701?hl=en-us&amp;gl=US\">https:\/\/apps.microsoft.com\/store\/detail\/windows-terminal\/9N0DX20HK701?hl=en-us&amp;gl=US<\/a><\/p>\n\n\n\n<p>From the windows prompt just type the following:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ssh ip<\/code><\/pre>\n\n\n\n<p>If you&#8217;re on Linux, you&#8217;re probably already acquainted with the terminal and being able to SSH into machines. Bonus tip: check out Mosh which keeps the SSH connection up even after losing internet, changing IP, after sleeping computer&#8230;<\/p>\n\n\n\n<p>Next we&#8217;ll need to make the file system read\/write, it&#8217;s defaulted to read only in normal operation. Then we&#8217;ll use the git command to clone the repository of MMDVMHost, change into the directory, and then issue the compile with screen support:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>rpi-rw\ngit clone https:\/\/github.com\/g4klx\/MMDVMHost.git\ncd MMDVMHost\/\nmake -f Makefile.Pi.OLED<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"940\" height=\"478\" src=\"https:\/\/jasonsblog.ddns.net\/wp-content\/uploads\/2022\/11\/Screenshot_20220810_092847.png\" alt=\"\" class=\"wp-image-1971\" srcset=\"https:\/\/jasonsblog.ddns.net\/wp-content\/uploads\/2022\/11\/Screenshot_20220810_092847.png 940w, https:\/\/jasonsblog.ddns.net\/wp-content\/uploads\/2022\/11\/Screenshot_20220810_092847-300x153.png 300w, https:\/\/jasonsblog.ddns.net\/wp-content\/uploads\/2022\/11\/Screenshot_20220810_092847-768x391.png 768w\" sizes=\"auto, (max-width: 940px) 100vw, 940px\" \/><\/figure>\n\n\n\n<p>Andy has a cronjob that will check hourly and make the file system read only, so if you get an error on compile just redo the rpi-rw command and start over. It&#8217;s more of a pain to go disable the cron job than just restarting, and if you restart you&#8217;ll have the full hour to compile and move the file (rarely happens to me). When finished compiling you should have the following in your terminal:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"918\" src=\"https:\/\/jasonsblog.ddns.net\/wp-content\/uploads\/2022\/11\/Screenshot_20220810_093839-1024x918.png\" alt=\"\" class=\"wp-image-1972\" srcset=\"https:\/\/jasonsblog.ddns.net\/wp-content\/uploads\/2022\/11\/Screenshot_20220810_093839-1024x918.png 1024w, https:\/\/jasonsblog.ddns.net\/wp-content\/uploads\/2022\/11\/Screenshot_20220810_093839-300x269.png 300w, https:\/\/jasonsblog.ddns.net\/wp-content\/uploads\/2022\/11\/Screenshot_20220810_093839-768x688.png 768w, https:\/\/jasonsblog.ddns.net\/wp-content\/uploads\/2022\/11\/Screenshot_20220810_093839.png 1164w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>And we&#8217;ll compare the versions of what Andy is using to the brand new version we just compiled. The first is Andy&#8217;s and the second is the one we just compiled.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"886\" height=\"364\" src=\"https:\/\/jasonsblog.ddns.net\/wp-content\/uploads\/2022\/11\/Screenshot_20220810_094010.png\" alt=\"\" class=\"wp-image-1973\" srcset=\"https:\/\/jasonsblog.ddns.net\/wp-content\/uploads\/2022\/11\/Screenshot_20220810_094010.png 886w, https:\/\/jasonsblog.ddns.net\/wp-content\/uploads\/2022\/11\/Screenshot_20220810_094010-300x123.png 300w, https:\/\/jasonsblog.ddns.net\/wp-content\/uploads\/2022\/11\/Screenshot_20220810_094010-768x316.png 768w\" sizes=\"auto, (max-width: 886px) 100vw, 886px\" \/><\/figure>\n\n\n\n<p>To copy our new version we just need to move it to the binary location after making a backup of the old version.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo cp \/usr\/local\/bin\/MMDVMHost \/usr\/local\/bin\/MMDVMHost.old\nsudo systemctl stop mmdvmhost.service\nsudo cp MMDVMHost \/usr\/local\/bin\/MMDVMHost\nsudo systemctl restart mmdvmhost.service\nrpi-ro<\/code><\/pre>\n\n\n\n<p>If using DMRGateway, I had to restart both.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl restart mmdvmhost dmrgateway<\/code><\/pre>\n\n\n\n<p>And we can see it&#8217;s all working as expected, DMRGateway log file at top pane of GNU\/Screen, and MMDVMHost log file at bottom.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"908\" src=\"https:\/\/jasonsblog.ddns.net\/wp-content\/uploads\/2022\/11\/Screenshot_20220810_094922-1024x908.png\" alt=\"\" class=\"wp-image-1974\" srcset=\"https:\/\/jasonsblog.ddns.net\/wp-content\/uploads\/2022\/11\/Screenshot_20220810_094922-1024x908.png 1024w, https:\/\/jasonsblog.ddns.net\/wp-content\/uploads\/2022\/11\/Screenshot_20220810_094922-300x266.png 300w, https:\/\/jasonsblog.ddns.net\/wp-content\/uploads\/2022\/11\/Screenshot_20220810_094922-768x681.png 768w, https:\/\/jasonsblog.ddns.net\/wp-content\/uploads\/2022\/11\/Screenshot_20220810_094922.png 1128w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>And to verify we&#8217;re on the new version, from the prompt check the version.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"907\" height=\"420\" src=\"https:\/\/jasonsblog.ddns.net\/wp-content\/uploads\/2022\/11\/Screenshot_20220810_095111.png\" alt=\"\" class=\"wp-image-1975\" srcset=\"https:\/\/jasonsblog.ddns.net\/wp-content\/uploads\/2022\/11\/Screenshot_20220810_095111.png 907w, https:\/\/jasonsblog.ddns.net\/wp-content\/uploads\/2022\/11\/Screenshot_20220810_095111-300x139.png 300w, https:\/\/jasonsblog.ddns.net\/wp-content\/uploads\/2022\/11\/Screenshot_20220810_095111-768x356.png 768w\" sizes=\"auto, (max-width: 907px) 100vw, 907px\" \/><\/figure>\n\n\n\n<p>As a bonus if you leave the MMDVMHost directory, change into it and you can issue the following command to pull down any changes.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>git pull<\/code><\/pre>\n\n\n\n<p>Clean out your previous compiled files.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>make clean<\/code><\/pre>\n\n\n\n<p>And then you can compile the new code as above. And if for some reason you want to compile a specific version, just below the green code button is a commit link that will show you all the different versions with related numbers. Copy the hash of the version you want.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"814\" src=\"https:\/\/jasonsblog.ddns.net\/wp-content\/uploads\/2022\/11\/Screenshot_20220810_100348-1024x814.png\" alt=\"\" class=\"wp-image-1976\" srcset=\"https:\/\/jasonsblog.ddns.net\/wp-content\/uploads\/2022\/11\/Screenshot_20220810_100348-1024x814.png 1024w, https:\/\/jasonsblog.ddns.net\/wp-content\/uploads\/2022\/11\/Screenshot_20220810_100348-300x239.png 300w, https:\/\/jasonsblog.ddns.net\/wp-content\/uploads\/2022\/11\/Screenshot_20220810_100348-768x611.png 768w, https:\/\/jasonsblog.ddns.net\/wp-content\/uploads\/2022\/11\/Screenshot_20220810_100348.png 1416w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>We&#8217;ll pick an old commit to show how to switch to it, and you can also just use the first seven digits of the hash as well. You&#8217;ll see that I switched to the older version, and then showed you how to switch back to the master branch.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"657\" src=\"https:\/\/jasonsblog.ddns.net\/wp-content\/uploads\/2022\/11\/Screenshot_20220810_100717-1024x657.png\" alt=\"\" class=\"wp-image-1977\" srcset=\"https:\/\/jasonsblog.ddns.net\/wp-content\/uploads\/2022\/11\/Screenshot_20220810_100717-1024x657.png 1024w, https:\/\/jasonsblog.ddns.net\/wp-content\/uploads\/2022\/11\/Screenshot_20220810_100717-300x193.png 300w, https:\/\/jasonsblog.ddns.net\/wp-content\/uploads\/2022\/11\/Screenshot_20220810_100717-768x493.png 768w, https:\/\/jasonsblog.ddns.net\/wp-content\/uploads\/2022\/11\/Screenshot_20220810_100717.png 1041w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>And you can do this with all the different parts of what makes your hotspot work. And you can always copy the old version back if you need to. So enjoy git and being able to compile the latest version of the code to use on your hotspot.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Andy Taylor, MW0MWZ, who maintains Pi-Star uses old versions of MMDVMHost and DMRGateway probably for stability, but I&#8217;ve taken to using the latest versions with all the bug fixes on my Pi-Star hotspots. Really what Andy maintains with Pi-Star for the community is the web dashboard interface as well as scripts for updating with the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-1107","post","type-post","status-publish","format-standard","hentry","category-ham"],"blocksy_meta":{"styles_descriptor":{"styles":{"desktop":"","tablet":"","mobile":""},"google_fonts":[],"version":6}},"featured_image_src":null,"author_info":{"display_name":"Jason","author_link":"https:\/\/jasonsblog.ddns.net\/index.php\/author\/jturning\/"},"_links":{"self":[{"href":"https:\/\/jasonsblog.ddns.net\/index.php\/wp-json\/wp\/v2\/posts\/1107","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jasonsblog.ddns.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jasonsblog.ddns.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jasonsblog.ddns.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jasonsblog.ddns.net\/index.php\/wp-json\/wp\/v2\/comments?post=1107"}],"version-history":[{"count":10,"href":"https:\/\/jasonsblog.ddns.net\/index.php\/wp-json\/wp\/v2\/posts\/1107\/revisions"}],"predecessor-version":[{"id":1980,"href":"https:\/\/jasonsblog.ddns.net\/index.php\/wp-json\/wp\/v2\/posts\/1107\/revisions\/1980"}],"wp:attachment":[{"href":"https:\/\/jasonsblog.ddns.net\/index.php\/wp-json\/wp\/v2\/media?parent=1107"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jasonsblog.ddns.net\/index.php\/wp-json\/wp\/v2\/categories?post=1107"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jasonsblog.ddns.net\/index.php\/wp-json\/wp\/v2\/tags?post=1107"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}