Wednesday, September 16, 2015

[Linux] Force Remove/Uninstall Broken / Unstable / Half Installed Package

Recently I've install a package from download which was not match to my pc, Raspberry. It says that it was half installed and need to reinstall. But everytime I try to reinstall it was exit with error, Can't fix it.

So here we go, if you got such stuck situation:

Saturday, September 12, 2015

[LINUX] Numlock Auto ON Without Install Or Scripting

To make numlock pad always ON on booting, no need to install such numlockx or writing script bash must execute on startup.

Actually it was built-in on keyboard setting which numlock off as default. weird huh ?

So to turn it on, we just need to edit keyboard configuration file. Here we go :

Monday, September 7, 2015

Python Mysql Connector Manual Configuration And Connection

Mysql Connector class assignment based on documentation always establish connection on class initialization or constructor, even if it looks like a configuration init.
On documentation here stated that
The MySQLConnection constructor initializes the attributes and when at least one argument is passed, it tries to connect to the MySQL server.
Sometimes we don't want auto-connect on class constructor stage, and make another function to establish connection with Exception handling.

Sunday, September 6, 2015

Backup Micro SD Card As An Image File On Ubuntu

Back up Micro SD Card is an important procedure, as we don't know life cycle of them. We can make backup into a File with whatever name you wish. Below is my steps:

  • Insert Micro SD Card into its adaptor and plug to PC
  • Issue Command df -h from Terminal to know its name [see figure below].

Monday, August 24, 2015

Linux: USB Tether and Local Network, Solved Ethernet Case

Let me show first about my ethernet connection configuration in a fine-working LAN below as of from Connection Information menu on connection manager:

Wired connection1
InterfaceEthernet (eth0)
IP Adress192.168.1.9

Few days ago, my internet router line cable had cut off on an accident by some stupid site project people which dig along side road in which internet cable where buried.

In short solution I pick my android phone for temporarily solution and plug it via USB Tether connection with IP table as below:

Wired connection2
InterfaceEthernet (usb0)
IP Address192.168.42.196
Default Route192.168.42.129

The problem was we had two connections with different ip address structure, and we can't make both work in the same time. If we want internet connection on USB, we must disconnect eth0 (Local Area Network) and vice versa. This situation was not what we need.

Finally I after some digging I find solution to work with both connection together, just follow these steps:

  • Disconnect eth0 (Wired connection1), and let usb0 (wired connection2) connected as is.
  • Set eth0 Gateway and DNS to blank.
  • Save setting and connect. And try ..
Hope this will help somebody who face same problem as I. As for your note, this configuration just work for PC which connected to usb0 not for entire Local Network.


Monday, August 10, 2015

Raspberry Pi 2 B using VGA Display

Starting from point that Raspberry Pi could and it should connect to any media with or without converter just like a PC did.
While it has only 2 display connector, HDMI and RCA 3.5 4 pin (Raspberry Pi 2 B). Meanwhile VGA monitor display has a cheap price due to mass production, first thing I think that I have to find a way my Raspi can connect to VGA display.
After couple days, finally I find something I can do with Raspi and VGA.

  1. Buy a HDMI to VGA connector, the cheap one.
  2. Configure config.txt in boot partition using nano[ubuntu] or whatever text editor on your OS with sudo : sudo nano /media/yourusername/boot/config.txt
  • uncomment (remove hash tag)
  • uncomment (remove hash tag)
Above configuration should work for VGA for minimum resolution to 640x480, for higher you can try edit below
  • uncomment (remove hash tag) and edit value to 2
  • uncomment (remove hash tag) and edit value to 16
#hdmi_mode= 4
 I found that configuration just work for my Raspi 2 B with VGA monitor display.

Thursday, August 6, 2015

Huawei E3131 As Modem Only

I just found solution for Modem Huawei E3131 which had registered with 3 ports as Modem, CD, and Wifi.

It's was annoying, cause I just need a Modem no more, even don't need data connection or GPS, just Dial and SMS.

After long strugling with such situation in 2 days, finally I discovered a command that satisfy my first need. JUST MODEM.

That's it, with double quote. After get reply OK, you just need to detach and attach it again. Good Luck.

Recently I need a card reader, so I use this modem to accomplish my need by sending a command AT^SETPORT="A1,A2;1,2,3,A2" and able to use it.

Now I need another command, to disable data connection.. wish me luck.