Showing posts from 2015

Gradle thinks 2.10 is lower than current version

Ok, so it is a bug? Yes, well simply set the gradle plugin version located in build.gradle to greater or equals to 1.5.0. Ah! So you want to upgrade your gradle to current version 2.10 as this article being write. You could check out my gradle-upgrade-manually . Which is going to be very fun and interesting.

Gradle Update Manually

Yup, i am using Debian 8 x64. Installing gradle with `apt-get install` gives me gradle version 1.5. The project i have been doing requires version 2.2. Humm,  ok just download 2.10 from , copy and unzip into /opt/gradle-2.10 $ sudo chmod 777 /opt $ wget $ unzip I rename the /usr/bin/gradle to $ sudo mv /usr/bin/gradle /usr/bin/gradle-old Append my ~/.bashrc with export PATH=$PATH:/opt/android/platform/android-sdk-21/tools:/opt/android/platform/android-sdk-21/platform-tools: /opt/gradle-2.10/bin Modify my android project to distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists distributionUrl= file:///opt/gradle-2.10/ Modify build.gradle to use gradle plugin at least 1.5.0 since older than that will complain that 2.10 is lower than

Linux ExifTool PDF Metadata Editor

A simple but powerful ExifTool to edit pdf metada. You can check how simple to use it here . Since it is so simple so nothing else to cover here :D, Lol. As an example, If you have a pdf file called drawing.pdf and you want to update its metadata, Use the utility, exiftool, in this way: exiftool -Title="This is the Title" -Author="Happy Man" -Subject="PDF Metadata" drawing.pdf ^^

KiCAD Manual Routing

KiCAD is a wonderful tool to create schematic and pcb desain. After reading this awesome tutorial . I feel like an expert after crunching the tutorial for 120 minutes. The hard thing comes up right away. I was not able to manual route the track. After googling for sometimes than there is a word come out to the surface, manual routing . Just readily to be clicked once i googled this keyword ` Err(4) trace near pad issue in Kicad `. Well the answer to do manual routing is to disable the DRC ( Design rule checking ). KiCAD' PCBNew version information: Application: Pcbnew Version: (2013-june-11)-stable Build: wxWidgets 2.8.12 (no debug,Unicode,compiler with C++ ABI 1002,GCC 4.8.1,wx containers,compatible with 2.4,compatible with 2.6) Platform: Linux 3.14.8-100.fc19.x86_64 x86_64, 64 bit, Little endian, wxGTK Boost version: 1.53.0 Options: USE_PCBNEW_NANOMETRES=ON          KICAD_GOST=OFF          USE_WX_GRAPHICS_CONTEXT=OFF          USE_WX_OVERLAY=OFF          KI

GVim, Vim, Indexer How-to indexing

Just found out that my Vim indexer.vim  only starts to indexing or re-indexing if i start my gvim from command line under the my web application project directory. [sc] option:ctags_params=" --exclude='*.sql' --exclude='*.js' --exclude='*.css' --PHP-kinds=+cf --fields=+iaS --extra=+q --regex-PHP='/(abstract class |class ) ([^ ]*)/\\1/c/' --regex-PHP='/interface ([^ ]*)/\\1/c/' --regex-PHP='/(public |static |abstract |protected |private )+function ([^ ()]*)/\\2/f/' --regex-PHP='/define[(].([a-zA-Z0-9_]*)/\\1/f/' " /opt/lampp/htdocs/sc Indexer starts to running ctags at background process if i start gvim from /opt/lampp/htdocs/sc just like the [sc] rule. Why bother? Well i noticed from my past experience is that ctags or re-indexing will be started if i open one of my file under [sc] rule, which is /opt/lampp/htdocs/sc, and indexer would picked up and re-indexing. Indexer smart enough to check if a file is open f

LINUX: Liveusb How-to

Unetbootin  is the right tool to create any live-usb linux distribution. Trying liveusb-creator with no success to create xubuntu 14.04 on Fedora 19. Since liveusb-creator "tied" with the current running OS. Happy to share ^^

Op-Amp cheatsheet?

Just found this old post at facebook. Cool!? Opamp BasicsLike -> Microcontroller Projects & Updates Posted by Microcontroller Projects & Updates on  Thursday, July 4, 2013

Arduino RFID, RC522, VUSB HID as Keyboard

Wrapped my project into nice grey project box. Nice project i have to combine Arduino, RFID (RC522), VUsb together as HID Keyboard. Just tap an RFID card and my little chips send it to computer as keyboard input. Warning this project not working on Windows XP. And runs perfect on Linux OS, WinVista, Win7 and Win8.1 **Updates You will need to create a dir named *UsbDevice* in the arduino libraries, this example taken from my Linux Debian8 64, yours may vary. adesanto@debian8:/opt/AVR/arduino-1.6.9/libraries$ ls -ltha total 6.1M drwxr-xr-x 26 adesanto adesanto 4.0K Feb 12 00:49 . drwxr-xr-x 12 adesanto adesanto 4.0K Feb 12 00:49 .. drwxr-xr-x  3 adesanto adesanto 4.0K Feb 12 00:12 UsbDevice And clone the code into the newly created dir. Then the 2 codes below are good to be compiled. For the source codes, you can find them here: Flash this code to 1st chip, that wi

Usbasploader that Supports Watchdog Reset, Atmega328p Stuck after Watchdog reset [SOLVED]

Yeah, happy to announced that i have made a little update to to support the watchdog timer reset. Previously the chip just stuck hung after watchdog is RESET the system. So happy ^.^

Usbasploader Hardware Does Not Recognized nor Detected, [SOLVED]

Weird thing happens today, i had written a post how i get my usbasploader board up and running. And did add some troubleshooting. On my new board the Zener diode 3.3V of D- line is the caused. I accidently removed got it wrong placed, the arrow pointing to Ground, and my computer had it detected as Usbasp. But the problem only apply to my new Atmega8A-16PU and Atmega328P-PU. Works perfect with or without Zener on D- line to my older production year of Atmega8A-16PU and Atmega8 too. And also i got so many times failling to have it jump to bootload though the jumper bit is active low. I just reset the chip rapidly and after 2-3 times of reset it is always detected. Drop me a message if your board is still not be able be detected. Anyway my usbasploader boards none of them working on Windows XP, lets forget that OS anyway. :D UPDATE: Actually replacing the zener 3v6 with Fairchild 55C 3V6 500mW does fix the problem and the device is more stable as it shown in the sch

jQuery load() Not Work or Firing

Maybe it is just the cached or the element container. Just happened today that jQuery.load() seems not to work at all. After googling i came out with specifiying $.ajaxSetup({cache: false, async: false}); The async:false just addition since i prefer synchronous connection than asynchronous. Also redundant to add random number at the end of url query $('.container').load("http://myweb/app/" + Math.random(100000000)); Fire! and did not work :(( After double check that i found out the .container was missing or overwrite by accident to other name. Fix has been patched and Fire! Ohh Yeah! it works. while(true){ keepCoding("^^"); }

XAMPP 32 bit unable to run on Xubuntu 64 bit

Just happened to download xampp 1.8.0 and unable to start apache and other applications. Strangely xubuntu only shows that phpstatus failed at line 4 saying php is no such file or directory. No luck on googling but my past experienced tells that xampp 1.7 to 1.8 are 32bit. Ok, give it a try to install glibc.i686 and apparently libc6 is the equivalent on xubuntu. Firstly we have to add the 32bit arch by $ sudo dpkg --add-architecture i386 $ sudo apt-get install libc6 It will install all necessary libs. Re-run php $ /opt/lampp/bin/php -a It will show the prompt meaning it runs successful. while(true){ keepCoding("^^"); }

Compile PHP with unixODBC options

I have XAMPP 1.7 running, with php 5.2.8. Old yes but almost all of my running projects are built on top of it. Recently i got a project that requires to use MSSQL-SQLEXPRESS. I chose to use Codeigniter 2.1.2 as the framework to develop. One of teammate is using MS-Windows environment and he used sqldrv as the database driver with ease. While my part using GNU/linux Fedora19 64bit having problem. After while searching how to connect to SQLExpress than the easy answer itu to use FreeTDS and unixODBC. Modify php.ini of XAMPP 1.7 with no problem. After restart apache and run one of my test_odbc file shows an error "undefined reference odbc_connect()" More googling and ends up that i convincing my-self to compile the odbc library from scratch. So i yum install  unixODBC-devel.i686 and so freetds-devel.i686 then download php 5.2.8 source file from  Here . Done the extraction, now to build the extention. $ pwd /opt/php5-src/php-5.2.8-src/ext/odbc $ /opt/lampp/bin/ph

Compiling Antlr2

Compiling Antlr2 with no success. As of this article being written the latest version is 2.7.7. The source is downloaded and configured but when `make` processing this errors comes in. >> /usr/bin/make -C lib/cpp/src all                         >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> make[3]: Entering directory `/opt/antlr2/antlr-2.7.7/lib/cpp/src' *** compiling /opt/antlr2/antlr-2.7.7/lib/cpp/src/../../../lib/cpp/src/ANTLRUtil.cpp *** compiling /opt/antlr2/antlr-2.7.7/lib/cpp/src/../../../lib/cpp/src/ASTFactory.cpp *** compiling /opt/antlr2/antlr-2.7.7/lib/cpp/src/../../../lib/cpp/src/ASTNULLType.cpp *** compiling /opt/antlr2/antlr-2.7.7/lib/cpp/src/../../../lib/cpp/src/ASTRefCount.cpp *** compiling /opt/antlr2/antlr-2.7.7/lib/cpp/src/../../../lib/cpp/src/Bas

Compile C++ BOOST Example

Playing around with Boost 1.58 library, i need to experience the compile and run the examples. I go into libs/serialization/examples/ run b2 hummm seems to build everything. So give it a try to compile it "by-hands" $ pwd /opt/c++/boost_1_58_0/libs/serialization/example $ export LD_LIBRARY_PATH=/opt/c++/boost_1_58_0/stage/lib:$LD_LIBRARY_PATH $ c++ demo.cpp -o demo -L /opt/c++/boost_1_58_0/stage/lib -lboost_serialization-mt $ ./demo ** Throws some log meaning the application compiled and run successfully Hurray!

Remote Debugging and Installing to Android Emulator

Running an Android Emulator in my development laptop definitely slowing all the system. I switched to vim instead of painful Android Studio IDE. My Laptop still slow. So i came up with a solution that i could use my other laptop to run the android emulator. The emulator now runs, with 5554:MyAvd-1 at the title. Port forwarding in linux using ssh is really simple. I run $ ssh adesanto@ -L 5555: $ killall adb; adb devices The result is no device attached. Strange, i googled and end with I tried one of the answer from  Christopher Orr , ssh -NL 5556:localhost:5554 -L 5557:localhost:5555 myuser@remote-server killall adb; adb devices The result shows that there is a device at emulator-5556 but the status is offline. After scroll down the answers i see that  hheimbuerger , he forward mylaptop:5554 to target:5554 and  mylaptop:5555 to target:5555. Aha! now after mod

Fedora/Centos Logging the iptables to /var/log/iptables.log

Recently my VPS got hacked and had to learn iptables to drop all outgoing traffic. Everything seems to work, yeah google is your friend. But there was a problem. In my fedora the iptables dropped packets logging did not appears to /var/log/messages nor to /var/log/iptables.log.. strange. Okay i started to dig why the log was not showed out. I know i am using rsyslog, so i came out with this setting, 1. Create a file     # touch /etc/rsyslog.d/iptables.conf     # touch /var/log/iptables.log 2. Insert this into the config file      :msg, startswith, "iptables:" /var/log/iptables.log   & ~ Well this rules is not working, since the rsyslog format is to add timestamp     at every beginning line of log. So modified it slightly with "contains" keyword.     :msg, contains, "iptables:" /var/log/iptables.log   & ~ 3. restart the service     # service  rsyslog restart Now i can see all the log of dropped packets at /var/log/iptables.log

Getting Started with USBAspLoader from ground up and troubleshooting

The Beginning It has been a long absent since the last post of my electronic project and hacks. Time to get my dusty arduino out of the shelf. G*! I don't know what to do with this. All i could remember is that i tried to get USBAspLoader up and running on my Atmega8A-16PU. Ok, here is the deal. I write this article to aid anybody that in my situation or maybe to refresh how to get USBAspLoader running. SETUP All Bill of materials are well described in the schematic below. Noticed i don't put 100nF electrolytic capacitor between uC Vcc and GND. But i do add 10nF capacitor at my soldered board. Why? Well i forgot to add one on my breadboard, sorry. And here is the schematic. Don't get confused of the uC label, Atmega168, is has the same pin layout with Atmega8. With the schematic reading given me some clue the arrangement on the breadboard. Plug the USB cable and my Linux (Fedora 19) detected as kernel: [27618.902659] usb 3-3: new low-speed USB devic

Breadboard Self-Capacitance Problem

Just found out how self-capacitance or parasitic capacitance very annoying. Let me share the experienced i had with breadboard self-capacitance . I am driving a relay with a transistor, BC 337 (npn). With my usbasploader on Atmega8 as my On/Off controller. Here is the schematic. The problem starts to showing. I had arranged all parts as in the diagram above on a breadboard. When an On signal raised from microcontroller, Atmega8 with usbasploader, to the transistor and the relay starts to make a tick sound, telling me that it is at "On" state. When the "Off" signal triggered... nothing happens. The next "On" state nothing happens and so on. It is just turned "On" and hang. Humm.. after several trials 1. Adding a capacitor 10uF at the transistor B-E pins 2. Adding a pull down resistor at the transistor Base pin, 10K Ohm. The trials said above results the same condition whenever the transistor had been raised to "On