Sunday, January 10, 2016

Flash a Galaxy Note 3 with CyanogenMod

  1. Root your device, first try the kingoapp app, here https://www.kingoapp.com/root-tutorials/how-to-root-galaxy-note3.htm. You'll need a Windows desktop. If this does not work go to xda-developers.com, find your device and look under rooting. Alternatively use towel root app.

  2. Find your N9005 devices codename, not the model number. You're likely to be good using Unified (htlte). It worked with a n9005ZHUENH4.
  3. Install a recovery, get the rashr app from google play, select your devices codename and choose which recovery you want, I recommend TWRP
  4. Download CM, go to https://download.cyanogenmod.org/. Select your codename, then click the build you want, for 5.0 Lollipop, its cm 12 , and for KitKat cm 11. https://download.cyanogenmod.org/?device=hlte&type=snapshot
  5. Download essential Google apps here http://forum.xda-developers.com/android/software/reborn-gapps-t3074533 and decide which package you want (full, mini, micro, nano).
  6. Store CM and gapps zips somewhere you can remember in sdcard.
  7. Reboot to recovery (hold home + volume up buttons). Backup, select backup and follow the instructions to confirm.
  8. Wipe, select wipe and follow the instructions to confirm.
  9. Flash CM, select install, select zip from sdcard, find the cm zip and follow the instructions to confirm.
  10. Flash gapps, select install, select zip from sdcard, find the gapps zip and follow the instructions to confirm.
  11. Reboot.
  12. Voila!

Thursday, December 10, 2015

GCC on Tru64

Follow the instructions from Babak Salamat, here:

http://www.babaks.com/misc/compilegcc.html

Alternatively, before starting to download and install gcc, you need GMP and MPFR if you want to enable Fortran language.
If you don't need Fortran, you can skip the installation of GMP and MPFR.
To download and install GMP follow these steps:
  1. Download GMP from http://nthinking.net/vrak/gmp-4.2.1.tar.gz
  2. copy the file to /tmp and uncompress it there. Let's assume that the extracted files are in /tmp/gmp-4.2.1
  3. cd /tmp/gmp-4.2.1
  4. ./configure --prefix=$HOME/progs/gmp
  5. make
  6. make check
    Check the messages and make sure that no test failed.
  7. make install
Now you can download and install MPFR.
To do so follow these steps:
  1. Download MPFR from http://nthinking.net/vrak/mpfr-3.1.3.tar.gz
  2. copy the file to /tmp and uncompress it there. Let's assume that the extracted files are in /tmp/mpfr-3.1.3
  3. Check the website for any available patches and apply them if there is any
  4. Note: Use /usr/local/bin/patch to apply any existing patch.
  5. cd /tmp/mpfr-3-1.3
  6. LD_LIBRARY_PATH=$HOME/progs/gmp/lib:$LD_LIBRARY_PATH ./configure --prefix=$HOME/progs/mpfr --with-gmp=$HOME/progs/gmp
  7. gmake
  8. gmake check
  9. gmake install
You need libiconv in order to build gcc correctly. I tried a few different options like using --disable-nls to avoid installing libiconv, but none of them worked. Therefore, I decided to install libiconv too. To install libiconv follow these steps:
  1. Download libiconv from http://nthinking.net/vrak/libiconv-1.14.tar.gz
  2. copy the file to /tmp and uncompress it there. Let's assume that the extracted files are in /tmp/libiconv
  3. cd /tmp/libiconv
  4. ./configure --prefix=$HOME/progs/libiconv
  5. make
  6. make install
Now you are ready to build and install gcc:
  1. Download gcc from https://ftp.gnu.org/gnu/gcc/gcc-4.2.1/
  2. Uncompress the file under a directory in /tmp. Let's assume that the extracted files are in /tmp/gcc-4.2.1/
  3. Note: You should use gtar to untar the file, otherwise you will get some errors similar to this:
    tar: ././@LongLink : Unknown filetype
    You can get gtar from the Open Source Software Collection or here:
    http://nthinking.net/vrak/gtar-1.13-4.alpha.rpm

  4. Create another directory in /tmp. Let's call this directory gcc-build
  5. Note: If you are using HP TestDrive systems, it is important to use /tmp, because you don't have enough disk quota in your home directory to compile gcc.
  6. cd /tmp/gcc-build
  7. CC="gcc -Wa,-oldas" /tmp/gcc-4.2.1/configure --prefix=$HOME/gcc --enable-languages=c,c++,fortran --with-gmp=$HOME/progs/gmp --with-mpfr=$HOME/progs/mpfr --with-libiconv-prefix=$HOME/progs/libiconv
  8. If you don't need C++, omit it from --enable-languages. C++ takes a relatively large amount of disk space.
    If you don't need Fortran, use this command instead:
    CC="gcc -Wa,-oldas" /tmp/gcc-4.2.1/configure --prefix=$HOME/gcc --enable-languages=c,c++ --with-libiconv-prefix=$HOME/progs/libiconv
  9. LD_LIBRARY_PATH=$HOME/progs/gmp/lib:$LD_LIBRARY_PATH gmake bootstrap-lean
  10. Note: You should use GNU make (gmake) version 3.80 or higher to build gcc.
    You can get it from the Open Source Software Collection or here:
    http://nthinking.net/vrak/gmake-3.79.1-4.alpha.rpm
    This step takes a long time, usually a few hours!
    If you don't want to install Fortran simply use:
    gmake bootstrap-lean
  11. gmake install
  12. If tar complains that it failed to preserve ownership of files, you'll need to change the ownership of /tmp/gcc-build.
    Go to your home directory and run ls -l. In my case the problem was from group name. The group name of all the files in my home directory was nis while the group name of /tmp/gcc-build and all the files under the directory was system.
    So, I ran chown -hR MyUsername:nis /tmp/gcc-build then I removed $HOME/gcc and ran gmake install again.
At this point, you must have a working gcc installed in $HOME/gcc. You can set your paths to use the new version of the compiler set.

 Libraries have been installed in:
   /usr/users/gilemon/gcc/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - use the `-Wl,-rpath -Wl,LIBDIR' linker flag

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.



Now it is time to remove the folders and files that you have created in /tmp.
In our example: /tmp/gcc-4.2.1, /tmp/gcc-build, /tmp/libiconv, /tmp/mpfr-3.1.3, /tmp/gmp-4.2.1

 If you want the compiled result for Tru64 5.1a, download it here:

http://nthinking.net/vrak/gcc.4.2.1.osf5.1a.tar

BTW, who is still working on Tru64?



 

Wednesday, November 05, 2014

CURL Reboot D-Link Router (DWR-921)

#!/bin/sh
/usr/bin/curl 'http://192.168.1.1/log/in?un=admin&pw=password&rd=%2Fuir%2Fstatus.htm&rd2=%2Fuir%2Fwanst.htm&Nrd=1' -H 'Host: 192.168.1.10' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:33.0) Gecko/20100101 Firefox/33.0' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' -H 'Accept-Language: en-US,en;q=0.5' -H 'Accept-Encoding: gzip, deflate' -H 'Referer: http://192.168.1.1/wanst.htm' -H 'Cookie: ID=AMIT0000' -H 'Connection: keep-alive'
/bin/sleep 1
/usr/bin/curl 'http://192.168.1.1/uir/rebo.htm?Nrd=0&ZT=1415119626974' -H 'Host: 192.168.1.10' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:33.0) Gecko/20100101 Firefox/33.0' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' -H 'Accept-Language: en-US,en;q=0.5' -H 'Accept-Encoding: gzip, deflate' -H 'Referer: http://192.168.1.1/uir/status.htm?Nrc=0&Nrd=1' -H 'Cookie: ID=AMIT0000' -H 'Connection: keep-alive'

Wednesday, May 28, 2014

Controlling Mitsubishi A/C with iTach IP2IR

Ingredients:
 - iTach IP2IR with IR blaster
 - Android 4 (rooted)

Mitsubishi Msz-fd50va & Msz-fd35va indoor units IR command codes:
 ON = sendir,1:3,1,38109,1,1,131,65,17,49,17,49,16,17,16,17,17,16,16,49,16,17,16,17,16,50,17,49,16,17,16,49,16,17,16,17,16,50,16,49,16,17,16,49,17,49,17,16,17,16,17,49,17,16,16,17,16,50,16,17,16,17,16,17,17,16,16,17,17,16,16,17,16,17,16,17,16,17,17,16,17,16,16,17,17,17,16,17,17,16,17,16,16,17,17,16,16,17,16,50,16,17,17,16,17,16,16,17,17,16,16,50,17,16,17,16,17,16,16,17,16,50,16,50,16,17,16,17,16,17,17,16,17,16,17,16,17,16,16,17,16,17,16,17,16,50,16,50,16,17,16,17,16,17,17,16,16,17,16,17,16,17,17,49,17,49,16,17,16,17,16,49,17,49,16,50,17,16,16,17,17,16,16,50,16,17,16,17,17,16,17,16,17,16,17,16,16,17,17,16,17,16,16,17,17,16,16,17,17,16,17,16,16,17,16,17,17,16,16,17,16,17,16,17,16,17,16,17,17,16,16,17,16,17,16,17,17,16,16,17,16,50,16,17,17,16,16,17,16,17,16,17,17,16,17,16,17,16,17,17,16,17,17,16,17,16,16,17,17,16,16,17,17,16,17,16,16,17,16,17,17,16,16,50,16,50,17,49,16,17,17,49,16,50,16,17,17,653,134,66,16,50,16,50,17,16,16,17,16,17,17,49,17,16,16,17,16,50,16,49,17,16,16,50,17,16,16,17,16,49,16,50,16,17,17,49,17,49,16,17,16,17,17,49,16,17,17,16,17,49,16,17,16,17,16,17,16,17,17,16,17,16,16,17,16,17,16,17,17,16,16,17,16,17,16,17,17,16,17,16,16,17,16,17,16,17,17,16,16,17,17,49,16,17,16,17,16,17,16,17,16,17,16,50,16,17,17,16,16,17,16,17,17,49,16,50,17,16,16,17,16,17,17,16,17,16,16,17,16,17,17,16,16,17,16,17,17,49,16,50,17,16,16,17,16,17,16,17,16,17,16,17,16,17,16,50,17,49,16,17,16,17,16,50,16,50,16,49,16,17,16,17,16,17,16,50,17,16,16,17,17,16,17,16,16,17,17,16,16,17,16,17,16,17,17,16,17,16,16,17,16,17,17,16,16,17
OFF = sendir,1:3,1,38109,1,1,131,65,16,50,16,50,17,16,16,17,16,17,17,49,17,16,16,17,17,49,17,49,17,16,16,50,16,17,17,16,16,50,17,49,16,17,16,50,16,50,17,16,17,16,16,50,17,16,16,17,16,50,16,17,16,17,17,16,17,16,17,16,16,17,16,17,16,17,16,17,16,17,17,16,17,16,16,17,17,16,16,17,16,17,17,16,17,16,16,17,17,16,17,16,17,16,17,16,16,17,16,17,16,17,16,50,16,17,16,17,17,16,17,16,16,50,17,49,17,16,17,16,16,17,17,16,17,16,16,17,17,16,17,16,16,17,17,16,16,50,16,50,16,17,17,16,17,16,17,16,17,16,16,17,16,17,16,50,17,49,17,16,17,16,16,50,17,49,16,50,17,16,16,17,16,17,17,49,16,17,16,17,17,16,17,16,17,16,16,17,16,17,17,16,16,17,16,17,17,16,17,16,16,17,17,16,17,16,16,17,16,17,17,16,16,17,16,17,16,17,17,16,17,16,17,16,17,16,16,17,16,17,17,16,16,50,16,17,17,16,16,17,16,17,17,16,17,16,16,17,16,17,17,16,16,17,17,16,16,17,17,16,16,17,17,16,17,16,16,17,17,16,17,16,17,16,17,49,16,50,17,49,17,16,17,16,17,49,17,16,17,649,135,65,17,49,16,50,17,16,16,17,17,16,16,50,17,16,16,17,17,49,16,50,17,16,16,50,16,17,17,16,16,50,17,49,17,16,17,49,16,50,16,17,17,16,17,49,16,17,16,17,16,50,17,16,17,16,16,17,17,16,16,17,16,17,16,17,17,16,16,17,17,16,17,16,17,16,17,16,16,17,16,17,16,17,17,16,16,17,16,17,16,17,16,17,16,17,16,17,17,16,17,16,17,16,17,49,17,16,16,17,17,16,17,16,16,50,16,50,17,16,16,17,16,17,16,17,17,16,17,16,16,17,17,16,17,16,16,17,16,50,16,50,16,17,16,17,16,17,16,17,17,16,16,17,16,17,16,50,16,50,16,17,17,16,17,49,17,49,17,49,17,16,16,17,16,17,17,49,16,17,17,16,17,16,17,16,17,16,17,16,16,17,17,16,16,17,17,16,16,17,16,17,17,16,16,17,17,16

Note: code have been retrieved using Telnet and get_IRL command not with the iLearn software, it can't record such a long code, see more details here -> https://globalcache.zendesk.com/entries/27803933-iLearn-and-Daikin-air-conditioner

Then I created a script in Perl to send my command over Telnet.

 http://nthinking.net/delivery/itach_commandor

Perl is handy because it is installed in a lot of Linux distribs (readynas) by default. So you can then run some cron jobs that call this script in order to schedule the power on and off of the A/C units.

Well... Perl is not present by default on Android... but can be done using the followings.
 - SL4A with Perl for Android

You need to change he first line of the perl script to:

#!/data/data/com.googlecode.perlforandroid/files/perl/perl -w

Others handy Android software:
- SManager -> to create terminal widgets that calls the Perl script







Friday, November 08, 2013

PhProjekt broken left side menu

If you have a broken/empty menu with the projects tree on the left side and you're using Firefox>24 or Chrome>29, like this:

http://utyp.net/thumbs/p/phprojekt-bug.png

 that's because Dojo 1.6 has a bug that is fixed on this release here:

http://downloads.dojotoolkit.org/release-1.6.2/

Just copy the files over in phprojekt/htdocs/ and that will fix it.

But then you'll notice that it takes forever to load all the .js files, so you'll need to create a custom build, see here:

http://dojotoolkit.org/reference-guide/1.7/quickstart/custom-builds.html

I used this:

dependencies ={

  layers:  [
      {
      name: "mydojo.js",
      dependencies: [
          "dojo.fx",
          "dijit.dijit-all",
          "dijit.Button",
          "dojox.wire.Wire",
          "dojox.wire.XmlWire",
        "dojo.dnd.Avatar",
        "dojo.dnd.common",
        "dojo.dnd.Container",
        "dojo.dnd.Manager",
        "dojo.dnd.move",
        "dojo.dnd.Mover",
        "dojo.dnd.Moveable",
        "dojo.dnd.Selector",
        "dojo.dnd.Source",
        "dojox/data/QueryReadStore",
        "dojox/form/Rating",
        "dojox/form/CheckedMultiSelect",
        "dojox/grid/_EditManager",
        "dojox/grid/util",
        "dojox/grid/_Events",
        "dojox/grid/_FocusManager",
        "dojox/grid/_Grid",
        "dijit/dijit",
        "dojox/html/metrics",
        "dojox/grid/_Scroller",
        "dojox/grid/_Layout",
        "dojox/grid/cells",
        "dojox/grid/cells/_base",
        "dojox/grid/_RowSelector",
        "dojox/grid/_View",
        "dojox/grid/_Builder",
        "dojox/grid/_ViewManager",
        "dojox/grid/_RowManager",
        "dojox/grid/Selection",
        "dojox/grid/cells/dijit",
        "dojox/grid/DataSelection",
        "dojox/grid/DataGrid",
        "dojox/grid/nls/DataGrid_en",
        "dojox/string/Builder",
        "dojox/string/sprintf",
        "dojox/string/tokenize",
        "dojox/dtl",
        "dojox/dtl/_Templated",
        "dojox/dtl/filter/htmlstrings",
        "dojox/dtl/filter/strings",
        "dojox/fx/_base",
        "dojox/fx/_core",
        "dojox/fx/scroll",
        "dojox/form/RangeSlider",
        "dijit/form/VerticalSlider",
        "dojox/fx",
        "dojox/layout/ExpandoPane",
        "dojox/layout/ScrollPane",
        "dojox/widget/Toaster",
        "dojox/layout/ResizeHandle"
      ]
      }
  ],

  prefixes: [
      [ "dijit", "../dijit" ],
      [ "dojox", "../dojox" ]
  ]

};

Friday, August 09, 2013

Yes, Ethernet Cable Pin Out IS Important

... maybe it sounds straightforward but the Cable Pin Out needs to be respected if you want to acheive 1Gbps speed with Cat 5E or Cat6 cables. If you don't respect it you'll be stuck to 100Mbps.

It seems like the position of each cable within the twists makes a big differences? Especially the blue cable which is put on the 5th position.

Anyway, more information about the Pin Out here:

http://www.ertyu.org/steven_nikkel/ethernetcables.html

or here is the diagram:





Saturday, May 26, 2012

Cisco Default IP (10.10.10.1)

I've just received a Cisco router 1921.
Opened the box and check for a manual or a CD that would explain what to do configure it, but nothing. As the online documentation from Cisco must be somewhere I've not been looking yet, I had no idea what to do with this box.
I figured it out by connecting my computer to the console port. Using ZTerm for OS X with the following settings:


Bits per sec    :  9600 
Data bits       :     8 
Parity          :  none 
Stop bits       :     1 
Flow control    :  none  


Default user/pass is cisco/cisco
Then pay attention to the procedure to change the password on the welcome message.

So after listing the configuration looks like the default IP for port 0/0 is not 10.0.0.1 anymore as some website suggest, but 10.10.10.1

So you can directly telnet it to this address, or even use the web admin (if you have Java...).

This page is powered by Blogger. Isn't yours?