Skip to main content

Install PCI Parallel card murah meriah di Linux.

Baru-baru ini, parallel port onboard di salah satu komputer klienku rusak. Lalu dibelikan Parallel card PCI made in China yang murah meriah. Card ini tidak ada merknya cuma ada tulisannya PCI60806A dan cuma terdiri dari 1 IC :)

Tapi setelah dipasang ternyata parallel card ini tidak dikenali di ubuntu, sehingga kemarin terpaksa komputernya di bawa ke rumahku untuk opname. Anehnya, output dari perintah lspci -v mengatakan bahwa card ini adalah serial port:

03:00.0 Serial controller: Device 4651:7073 (rev 10) (prog-if 02 [16550])
Subsystem: Device 4651:7073
Flags: medium devsel, IRQ 20
I/O ports at df00 [size=8]
I/O ports at de00 [size=8]
Kernel driver in use: serial

Dari hasil googling ternyata ini memang kasus umum pada pci parallel card murah meriah, card-card ini sebenarnya mempunyai 2 fungsi interface, serial interface dan parallel interface. I/O port pertama (df00) adalah port untuk Serial Port sedangkan port kedua (de00) adalah untuk Parallel port.

Sekarang kita coba gunakan driver parallel port linux (partport_pc) untuk mengakses port 0xde00 di atas.
  1. Unload terlebih dahulu driver lp dan parport_pc
    # rmmod lp
    # rmmod parport_pc
  2. Reload parport_pc dengan io address de00
    # cd /lib/modules/`uname -r`/kernel/drivers/parport
    # insmod parport_pc.ko io=0xde00
  3. Reload driver lp
    # cd /lib/modules/`uname -r`/kernel/drivers/char
    # insmod lp.ko
  4. Check dengan dmesg
    # dmesg | grep parport
    dan ini outputnya:
    [ 10.650355] parport0: PC-style at 0xde00, irq -227213512 [PCSPP,TRISTATE]
    [ 10.650362] parport0: irq -227213512 in use, resorting to polled operation
    [ 10.736222] lp0: using parport0 (polling).

Masalahnya, setting ini tidak permanen, artinya jika direboot akan kembali ke kondisi semula. Untuk itu kita bisa membuat initialization script yang bisa diletakkan di /etc/init.d/

Tetapi solusi yang lebih baik adalah dengan membuat konfigurasi di directory /etc/modprobe.d, buat sebuah file dengan sembarang nama tapi extensionnya .conf di directory tersebut. Isi file tsb. adalah:

options parport_pc io=0xde00

Maka setiap kali komputer booting, driver parallel port akan diload dengan option di atas.


Comments

Popular posts from this blog

Install Sketchup 2017 64 bits on Linux Ubuntu 16.04 64 bits

Install Sketchup 2017 64 bits on Linux Ubuntu 16.04 64 bits: 1.Enable 32 bit architecture: $sudo dpkg --add-architecture i386  2. Set wine PPA $sudo add-apt-repository ppa:wine/wine-builds Update repository $sudo apt-get update 3. Install wine newest staging branch version $sudo apt-get install --install-recommends winehq-staging 4. Ensure we get a 64bits wine, edit file ~/.profile and locate for text: export WINEARCH= If the value is win64 you are good, if the value is win32 change it to win64. Save the file. Ensure the environment variable also set to win64 by typing command: $export WINEARCH=win64 5. Download winetricks: $wget https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks    Don't forget to set the attribute so it is executable $chmod +x winetricks 6. Run winetricks $./winetricks Inside winetricks: Choose Select the default wineprefix, click OK Choose Install a Windows DLL or component, click OK Choos

Program timbangan elektronik, sebuah program Windows yang dijalankan di Linux.

Kemarin, mumpung hari libur aku setup program timbangan digital baru di kantor. Program yang lama merupakan program DOS yang aku tulis dengan menggunakan Clipper, program ini berjalan dengan baik di linux dengan bantuan dosemu. Program baru merupakan program Windows. Salah satu improvement dalam program ini adalah support untuk beberapa jenis indikator. Program diinstall di linux dengan wine versi 1.1.20. Beberapa catatan dalam instalasi program ini di wine: Pencetakan slip bukti timbangan dan laporan-2 menggunakan printer Dot Matrix. Apabila pencetakan dilakukan lewat printer driver, pencetakan dengan printer dot matrix akan menjadi sangat lambat plus hasil buruk plus boros pita... :) Oleh karena itu, program ini melakukan pencetakan langsung melalui printer port lpt1. Di windows, hal ini tidak menjadi suatu permasalahan, di linux dengan wine, maka lpt1 akan dimap ke /dev/lp0. Masalahnya, owner dari device ini adalah root dan group lp. Secara default user-user di Ubuntu (..nggak tahu

NOTEPAD++ SOURCECOOKIFIER SETTING FOR CLIPPER LANGUAGE

Notepad++ is a very excellent programmer editor for Windows. It has plugin system which enhances it's functionality. Sourcecookifier is a plugin I like very much, it is a simple plugin which shows the outline of your source code. The screenshot below shows a pascal (delphi) source code. We can easily see the structure of the source code, and we can go to a particular method/function just by one click. Sourcecookifier recognizes several programming languages, but it does not support Clipper language. Fortunately, it is very easy to add Clipper configure. Follow this step: Click setting icon (the yellow gear icon) on the sourcecookiefier window. Click Language Settings On the setting form, type Clipper on the language box and click add. Set the file extension setting, add .prg to the extenson box On Tag Type choose any letter you like. Here I add “f” for “function” (any letter will be fine) On Appearance box, you can write the de