{"id":431,"date":"2024-02-26T22:17:35","date_gmt":"2024-02-26T21:17:35","guid":{"rendered":"https:\/\/www.emperial.dk\/?p=431"},"modified":"2024-02-26T22:17:35","modified_gmt":"2024-02-26T21:17:35","slug":"surenoo-lcd2usb-lcd-display-in-lcd4linux","status":"publish","type":"post","link":"https:\/\/www.emperial.dk\/?p=431","title":{"rendered":"Surenoo LCD2USB LCD display in lcd4Linux"},"content":{"rendered":"<p>Some time ago i bough a 20&#215;4 LCD display with an LCD2USB controller mounted from AliExpress (<a href=\"https:\/\/www.aliexpress.com\/item\/4000219655381.html\" target=\"_blank\" rel=\"noopener\">https:\/\/www.aliexpress.com\/item\/4000219655381.html<\/a>).<\/p>\n<p>My idea was to use this for an <a href=\"https:\/\/www.openmediavault.org\/\" target=\"_blank\" rel=\"noopener\">Openmediavault<\/a> Server when i need to go to a LAN party, to prevent the need for a Monitor connected to the server i could use the display to show the IP and possible other usefull information, that could be handy.<\/p>\n<p>Seems there is little information around the internet, about how to get one of these, displays working compared to back in the days.<\/p>\n<p>Every note that i can locate says that when powering on the display from the USB port it should come up and say lcd2usb version x.xx but in my case the display is blank and looks to be more or less dead, in the beginning i was sure that i had bought a bad display, until i remembered that if the controller somehow was setup to keep the display in a low contrast and brightness in off mode, that would result in a display looking to be dead, so tweeking the contrast and brightness paramaters made the display come to life.<\/p>\n<p><strong>My lcd4linux.conf file:<\/strong><\/p>\n<p><strong>Note:<\/strong> contrast and brightness are are still a work in progress, but it works.<\/p>\n<pre>Display LCD2USB {\r\nDriver 'LCD2USB' #Model: LCD2USB\r\nSize '20x4' #LCD dimension: 1602\r\n# Port '\/dev\/usbdev3.2' #Port: \/dev\/usbdev3.2\r\nContrast 80\r\nBrightness 40\r\nicons 0\r\n}\r\n\r\nWidget IPaddress {\r\nclass 'Text' #Type: Text\r\nexpression netinfo::ipaddr('ens33') #eth0's ip\r\nprefix 'IP:' #display \"IP:\"\r\nwidth 16 #display width: 16\r\nalign 'C' #display: central\r\nupdate 1000\r\n}\r\n\r\nWidget Time {\r\nclass 'Text'\r\nexpression strftime('%a %H:%M:%S',time())\r\nwidth 16\r\nalign 'C'\r\nupdate 1000\r\n}\r\n\r\nLayout Default {\r\nRow1 {\r\nCol1 'IPaddress' #Display Widget IPaddress in the first row and first column\r\n}\r\nRow2 {\r\nCol1 'Time' #Display Widget Time in the second row and first column\r\n}\r\n\r\n}\r\n\r\nDisplay 'LCD2USB'\r\nLayout 'Default'<\/pre>\n<p>to test you can use the following command<\/p>\n<pre>root@Debian-test:\/etc# lcd4linux -vv -F<\/pre>\n<p>the output should look something like this:<\/p>\n<pre>root@Debian-test:\/etc# lcd4linux -vv -F\r\nLCD4Linux 0.11.0-SVN-1193 starting\r\nDump of \/etc\/lcd4linux.conf:\r\nDisplay 'LCD2USB'\r\nDisplay:LCD2USB.Brightness 40\r\nDisplay:LCD2USB.Contrast 80\r\nDisplay:LCD2USB.Driver 'LCD2USB'\r\nDisplay:LCD2USB.icons 0\r\nDisplay:LCD2USB.Size '20x4'\r\nLayout 'Default'\r\nLayout:Default.Row1.Col1 'IPaddress'\r\nLayout:Default.Row2.Col1 'Time'\r\nWidget:IPaddress.align 'C'\r\nWidget:IPaddress.class 'Text'\r\nWidget:IPaddress.expression netinfo::ipaddr('ens33')\r\nWidget:IPaddress.prefix 'IP:'\r\nWidget:IPaddress.update 1000\r\nWidget:IPaddress.width 16\r\nWidget:Time.align 'C'\r\nWidget:Time.class 'Text'\r\nWidget:Time.expression strftime('%a %H:%M:%S',time())\r\nWidget:Time.update 1000\r\nWidget:Time.width 16\r\n\r\n[DBus] Error connecting to the dbus session bus: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11\r\n\r\nplugin_mpd.c: [MPD] v0.83, check lcd4linux configuration file...\r\n[MPD] WARNING: Plugin is not enabled! (set 'enabled 1' to enable this plugin)\r\n[raspi] WARNING: Plugin is not enabled! (set 'enabled 1' to enable this plugin)\r\nlcd4linux.c: initializing driver LCD2USB\r\nLCD2USB: $Rev: 1130 $\r\nLCD2USB: scanning USB for LCD2USB interface ...\r\nLCD2USB: found LCD2USB interface on bus 001 device 008\r\nLCD2USB: echo test successful\r\nLCD2USB: firmware version 2.02\r\nLCD2USB: installed controllers: CTRL0\r\ninitializing layout 'Default'\r\nlayout.c: Layout:Default: migrating 'row1.col1' to 'Layer:1.row1.col1'\r\nlayout.c: Layout:Default: migrating 'row2.col1' to 'Layer:1.row2.col1'\r\nCreating new timer group (1000 ms)\r\nwidget 'IPaddress': Class 'text', Parent '&lt;root&gt;', Layer 1, Row 0, Col 0 (to 0,16)\r\nwidget 'Time': Class 'text', Parent '&lt;root&gt;', Layer 1, Row 1, Col 0 (to 1,16)\r\nlcd4linux.c: starting main loop\r\nTimer #0 skipped 31 interval(s) or 3100 ms.<\/pre>\n<p>and tada!, the displays show information.<a href=\"https:\/\/www.emperial.dk\/wp-content\/uploads\/2024\/02\/IMG20240226211010-scaled.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-435\" src=\"https:\/\/www.emperial.dk\/wp-content\/uploads\/2024\/02\/IMG20240226211010-scaled.jpg\" alt=\"\" width=\"2560\" height=\"1696\" srcset=\"https:\/\/www.emperial.dk\/wp-content\/uploads\/2024\/02\/IMG20240226211010-scaled.jpg 2560w, https:\/\/www.emperial.dk\/wp-content\/uploads\/2024\/02\/IMG20240226211010-300x199.jpg 300w, https:\/\/www.emperial.dk\/wp-content\/uploads\/2024\/02\/IMG20240226211010-1024x679.jpg 1024w, https:\/\/www.emperial.dk\/wp-content\/uploads\/2024\/02\/IMG20240226211010-768x509.jpg 768w, https:\/\/www.emperial.dk\/wp-content\/uploads\/2024\/02\/IMG20240226211010-1536x1018.jpg 1536w, https:\/\/www.emperial.dk\/wp-content\/uploads\/2024\/02\/IMG20240226211010-2048x1357.jpg 2048w, https:\/\/www.emperial.dk\/wp-content\/uploads\/2024\/02\/IMG20240226211010-453x300.jpg 453w\" sizes=\"auto, (max-width: 2560px) 100vw, 2560px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Some time ago i bough a 20&#215;4 LCD display with an LCD2USB controller mounted from AliExpress (https:\/\/www.aliexpress.com\/item\/4000219655381.html). My idea was to use this for an Openmediavault Server when i need to go to a LAN party, to prevent the need &hellip; <a href=\"https:\/\/www.emperial.dk\/?p=431\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14,2,24,4],"tags":[46,70,71,12,72],"class_list":["post-431","post","type-post","status-publish","format-standard","hentry","category-computers","category-debian","category-debian-linux","category-linux","tag-debian","tag-lcd2usb","tag-lcd4linux","tag-linux-2","tag-surenoo"],"_links":{"self":[{"href":"https:\/\/www.emperial.dk\/index.php?rest_route=\/wp\/v2\/posts\/431","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.emperial.dk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.emperial.dk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.emperial.dk\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.emperial.dk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=431"}],"version-history":[{"count":6,"href":"https:\/\/www.emperial.dk\/index.php?rest_route=\/wp\/v2\/posts\/431\/revisions"}],"predecessor-version":[{"id":439,"href":"https:\/\/www.emperial.dk\/index.php?rest_route=\/wp\/v2\/posts\/431\/revisions\/439"}],"wp:attachment":[{"href":"https:\/\/www.emperial.dk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=431"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.emperial.dk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=431"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.emperial.dk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=431"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}