{"id":1827,"date":"2023-10-05T19:19:03","date_gmt":"2023-10-05T23:19:03","guid":{"rendered":"https:\/\/dc540.org\/xxx\/?p=1827"},"modified":"2023-10-05T19:22:26","modified_gmt":"2023-10-05T23:22:26","slug":"lanner-1u-network-appliance-lcd-panels","status":"publish","type":"post","link":"https:\/\/dc540.org\/xxx\/2023\/10\/lanner-1u-network-appliance-lcd-panels\/","title":{"rendered":"Lanner 1U network appliance LCD panels"},"content":{"rendered":"\n<p>I&#8217;ve found these Lanner 1U network appliances incredibly useful. Nice small factor, lots of network ports to do fun things with. They make fantastic Linux routing appliances. They&#8217;re kind of old-school, though, they have these LCD panel modules with four buttons. <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"928\" height=\"256\" src=\"https:\/\/dc540.org\/xxx\/wp-content\/uploads\/2023\/10\/image.png\" alt=\"\" class=\"wp-image-1828\" srcset=\"https:\/\/dc540.org\/xxx\/wp-content\/uploads\/2023\/10\/image.png 928w, https:\/\/dc540.org\/xxx\/wp-content\/uploads\/2023\/10\/image-350x97.png 350w, https:\/\/dc540.org\/xxx\/wp-content\/uploads\/2023\/10\/image-300x83.png 300w, https:\/\/dc540.org\/xxx\/wp-content\/uploads\/2023\/10\/image-768x212.png 768w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/figure>\n\n\n\n<p>I&#8217;ve been using them off-label for so long I can&#8217;t even remember what the panels were originally for.<\/p>\n\n\n\n<p>See, the first thing I do is connect serial, boot to USB and install something modern on it. Rocky, Ubuntu, whatever.<\/p>\n\n\n\n<p>Last week I went to explore the LCD panels, and see if I could make use of them. Maybe as a periodic status display or something. For the first time in years, I consulted the actual manual for these devices. It turns out, they&#8217;re connected to the motherboard internally via an internal parallel port. <\/p>\n\n\n\n<p>The manual suggests using the drivers found at https:\/\/github.com\/majodu\/plcm_drv_v013 but they are so old they&#8217;re meant for Linux kernel 3 and below. So the first thing I did was clone the repository. After looking at it for a few minutes I realized I didn&#8217;t need everything it was delivering, I just needed the kernel module itself, which is compiled via the &#8220;boot&#8221; argument. Looking at the Makefile it was pretty clear what the logic was in &#8220;boot:&#8221;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>boot:\nifeq ($(KVER3),3)\n\t$(MAKE) -C $(KDIR) M=$(PWD) modules\nendif\nifeq ($(KVER),2.6)\n\t$(MAKE) -C $(KDIR) M=$(PWD) modules\nendif\nifeq ($(KVER),2.4)\n\t$(CC) $(MODCFLAGS) -c plcm_drv.c\nendif<\/code><\/pre>\n\n\n\n<p>So the first thing I did, since my installed platform used kernel 5, was change the KVERS3 line to ifeq ($(KVER3),5) so that it would run the make on my kernel.<\/p>\n\n\n\n<p>I was able to compile the kernel module. It barked at something else it was trying to install, but since all I really needed was the test executable and the kernel module for now, I ignored that.<\/p>\n\n\n\n<p>Then I ran into an issue loading the newly-created kernel module. It didn&#8217;t like the major number associated with the driver, 248. Looking at \/proc\/devices I could see that 248 was in use by ptp, so I edited the Makefile and plcm_drv.c to use 239 instead, since that was available. I recompiled, and was able to load that kernel module just fine. After that, the plcm_test executable successfully ran and displayed stuff on the LCD panel and accepted button presses.<\/p>\n\n\n\n<p>Good enough for now, at least I know I can write something in C to display something and receive button presses. Now to think through a good use case for this silly hoop I just jumped through&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve found these Lanner 1U network appliances incredibly useful. Nice small factor, lots of network ports to do fun things with. They make fantastic Linux routing appliances. They&#8217;re kind of &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/dc540.org\/xxx\/2023\/10\/lanner-1u-network-appliance-lcd-panels\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Lanner 1U network appliance LCD panels&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[5,87],"tags":[],"class_list":["post-1827","post","type-post","status-publish","format-standard","hentry","category-hardware","category-homelab"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_likes_enabled":true,"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/dc540.org\/xxx\/wp-json\/wp\/v2\/posts\/1827","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dc540.org\/xxx\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dc540.org\/xxx\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dc540.org\/xxx\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dc540.org\/xxx\/wp-json\/wp\/v2\/comments?post=1827"}],"version-history":[{"count":2,"href":"https:\/\/dc540.org\/xxx\/wp-json\/wp\/v2\/posts\/1827\/revisions"}],"predecessor-version":[{"id":1831,"href":"https:\/\/dc540.org\/xxx\/wp-json\/wp\/v2\/posts\/1827\/revisions\/1831"}],"wp:attachment":[{"href":"https:\/\/dc540.org\/xxx\/wp-json\/wp\/v2\/media?parent=1827"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dc540.org\/xxx\/wp-json\/wp\/v2\/categories?post=1827"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dc540.org\/xxx\/wp-json\/wp\/v2\/tags?post=1827"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}