Compile lcdproc hd44780 driver on Raspberry Pi running Debian Stretch

In order to get my 20×4 LCD display with cheap IIC/I2C/TWI/SPI Serial Interface Board running on Raspberry Pi I had to use patched hd44780.so file downloaded from NeighborGeek. You can check it out here

This worked fine on my RPi3 running Debian Jessie, but recently I have upgraded to Stretch and found out that his driver now is having issues. After running for longer period of time the screen would be full of garbage characters.

I thought I could repeat the steps, download source, patch the source, compile and use again hd44780.so file instead of the one provided by distribution.

First thing I did was to download latest source from GitHub:

wget https://github.com/lcdproc/lcdproc/archive/master.zip
unzip master.zip
cd lcdproc-master

Now I tried to apply the hd44780-i2c.c patch but it failed. Then I checked the hd44780-i2c.c file in the source I found out that patch is no longer needed just proper configuration in LCDd.conf.

In order to compile the latest driver from GitHub following steps are needed:

./autogen.sh
./configure --disable-libusb --disable-libusb-1-0 --enable-drivers=hd44780 --disable-libftdi
make

After you have compiled the driver, go to directory:

 cd /usr/lib/arm-linux-gnueabihf/lcdproc/

and backup existing file just in case something goes wrong:

cp hd44780.so hd44780.so.orig

Then copy the newly compiled driver in proper place:

cp /usr/local/src/lcdproc-master/server/drivers/hd44780.so .

Edit LCDd.conf and add the following after hd44780 part:

i2c_line_RS=0x01
i2c_line_RW=0x02
i2c_line_EN=0x04
i2c_line_BL=0x80
i2c_line_D4=0x10
i2c_line_D5=0x20
i2c_line_D6=0x40
i2c_line_D7=0x80
Backlight=yes
BacklightInvert=yes

You can download my newly compiled driver and LCDd.conf from this link  hd44780_debian_stretch.

I hope this has saved you some time and got your 20×4 LCD working with Debian Stretch.

Update

I have moved my LCD display to Pine64 SBC and since this is different architecture I needed to re-compile it using the same steps as above.

You can dowload aarch64 version hd44780.so aarch64.

Compile Realtek rtl8812AU/8821AU USB WiFi driver on Debian Jessie

Install the driver first from github:

sudo apt-get install git
git clone https://github.com/abperiasamy/rtl8812AU_8821AU_linux
cd rtl8812AU_8821AU_linux
sudo cp -R . /usr/src/rtl8812AU_8821AU_linux-1.0
sudo dkms add -m rtl8812AU_8821AU_linux -v 1.0
sudo dkms build -m rtl8812AU_8821AU_linux -v 1.0
sudo dkms install -m rtl8812AU_8821AU_linux -v 1.0

Continue reading “Compile Realtek rtl8812AU/8821AU USB WiFi driver on Debian Jessie”

Fix failed to fetch Google Chrome packages under Debian

Google decided to drop 32bit support for Chrome lately my Debian Jessie is giving me following errors when doing apt-get update

W: Failed to fetch http://dl.google.com/linux/chrome/deb/dists/stable/Release Unable to find expected entry 'main/binary-i386/Packages' in Release file (Wrong sources.list entry or malformed file)

To fix the issue you need to edit following file: /etc/apt/sources.list.d/google-chrome.list and change the line:

deb http://dl.google.com/linux/chrome/deb/ stable main

to

deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main

Save your file and do normal apt-get update.

It seems that the change in google-chrome.list gets overwritten somehow, so I recommend you to set read only permissions on the file with:

chmod 444 /etc/apt/sources.list.d/google-chrome.list

Remember just next time if you need to modify this file to add write permissions back.