Hacking RaspberryPi for POS (Point Of Sale) computer – Part 1 ::: I bought this machine in hope that I'd be able to turn it into a reliable, low-maintenance, low-power, and cheap POS computer.Â
Turned out that there are a lot of things & problems I need to overcome to achieve this. I'll document my steps here, and in another article in the future.
PROBLEM : HDMI to VGA Converter : Part 1Â
Cheapest LCD monitor, around US$ 65, still use VGA interface, so I bought a HDMI to VGA converter.
It kept on showing up nothing.
At first I thought there wasn't enough power, because I was using 1,2 mAh adaptor and the converter has a chip in it that needs to be sufficiently powered.Â
Turned out it was not due to lack of power. You just need to do the following in order :
(1) Attach the converter into RaspberryPi's HDMI port
(2) Turn on LCD monitor
(3) Turn on RaspberryPi
(4) Attach the VGA cable into the converter
Now the LCD monitor will always show the RaspberryPi's output just fine 🙂
PROBLEM : HDMI to VGA Converter : Part 2Â
I was not satisfied with the solution above, because that means we'll have to plug and unplug the cables pretty often. This is not ideal.
So I looked again…and turned out you can workaround this by forcing certain settings when the RaspberryPi boots up.
These are what we need to do :
(1) Open /boot/config.txt : nano /boot/config.txt
(2) Make sure to put the following lines in it :
# Set my LCD monitor's to 1366×768
hdmi_mode=81
#Force HDMI
hdmi_force_hotplug=1
# Force HDMI for use with LCD monitor
hdmi_group=2
# Strengthen HDMI's signal
config_hdmi_boost=4
# disable black border
disable_overscan=1
(3) Done ! Reboot the Pi 🙂
Now the HDMI-VGA converter ALWAYS work ! :DÂ
No need to plug – unplug anymore, yay.
PROBLEM : RaspberryPi restarts everytime I plug USB Wifi
To keep costs down, I set up the Pi to be connected via wireless / wifi network.
However, everytime I plug a USB wifi, the Pi restart itself… and most of the time, fail to boot up again.
Turned out the USB wifi uses so much power, it pretty much drain everything – leaving the Pi with almost no power… gulp, not good :)Â
SOLUTION : Use a powered USB hub.Â
PROBLEM : Need to set up RaspberryPi as Print server
Each POS computer will have a printer attached to it. That means we need to set up each Pi as a Print server. Here's how :
================
# upgrade raspbian
sudo apt-get update; sudo apt-get upgrade
# install required software
sudo apt-get install cups python-cups avahi-daemonÂ
# give user "pi" access to cups / print server
sudo usermod -aG lpadmin pi
# edit CUPS's config file
# details follows
sudo nano /etc/cups/cupsd.conf
================
Make sure to change the cupsd.conf as follows :
(1) Find : Listen localhost:631
Change into :
#Listen localhost:631
Listen 0.0.0.0:631
(2) Find : <Location />
Change into :
ServerAlias *
<Location />
 Allow @Local
(3) Find :Â
<Location /admin>
 Order allow, deny
</Location>
Change into :
<Location /admin>
 Order allow, deny
 Allow @Local
</Location>
(4) Save, quit the text editor, then type : sudo /etc/init.d/cups restart
(5) Finished ! Now you can access CUPS via http://yourraspberryIPaddress:631 🙂
PROBLEM : RaspberryPi can not use USB printer
Yes, this is a major letdown. You can check this for yourself, there's no usblp module in the Raspbian distro.
The only solution is to recompile the kernel to enable this module, which is what I'm doing at the moment.
I'll post the details later in another article.