RSS feed
  • Unbrick WRT350N

    Wow, so last night I tried to flash an unsupported ddwrt image on my WRT350N & I bricked it :( . I would have been golden, except for some reason boot-wait wasn’t working. I spent about 30 minutes looking what new router I should purchase, when I thought, ah there are no good routers out that will accept DD-WRT; I’ll just unbrick my current router…

    Well to start I had to figure out how to open the darn thing. I ended up ripping off the top & bottom plastic where some nice torx security screws greeted me… Well a few came out with some nice twists of my torx driver. Yet a couple actually had the center pin proper height. Easy way to get around this, is to find a small phillips screwdriver. I was able to easily unscrew them with a phillips.
    Security Torx

    After removing the screws I was now able to access the board; most importantly the serial header:

    091

    From Left to Right (Yellow = 3.3V; White = Tx; Red = Rx; Black = GND)

    I used my handy dandy CA-42 Serial to USB adapter:

    CA-42

    It also has colored wires, and I should have matched them up, but I kinda just plugged some alligator clips in & plugged them into the right wires for the CA-42. The CA-42 layout is like this (Black = GND ; White = Rx ; Green = Tx ; Red = +V)

    CA-42 > Router

    After connecting everything up, you should be able to see “output” & be able to hit Ctrl-C to be dropped into CFE>

    
    nvram set boot_wait=on
    
    nvram commit
    
    reboot
    

    Now prepare to copy the image over. I had three windows open. A window with the serial output, a window pinging 192.168.1.1, and a window to execute my push command. I would also recommend that you set (IP Address = 192.168.1.10 ; Subnet = 255.255.255.0; Gateway = 192.168.1.1) Once you receive a ping after rebooting run the following command:

    
    echo -e "\nmode binary\nrexmt 1\ntimeout 60\ntrace\nput dd-wrt.v24_mini_generic.bin\n" | tftp 192.168.1.1
    

    where ‘dd-wrt.v24_mini_generic.bin’ is the image you would like to flash (it took me about 6 different images until this one worked [ this is the web flash image on the wrt350n page])
    After running the following you should get something that looks like this:

    If everything went as planned, then you should end up with a working router :) Yay!

    Success

    Success_Final

    There are plenty of resources on the internets. I found this wonderful link: http://dg.cascade.dyndns.org/wrt350n.html which perfectly outlines EVERYTHING I needed to do. It was very helpful in this process.

  • OpenVZ with Archlinux (back in business)

    Linux smsitraining 2.6.26.8-OVZ26-gogol.1 #1 SMP Thu Jan 28 15:49:59 PST 2010 x86_64 Intel(R) Xeon(R) CPU E5520 @ 2.27GHz GenuineIntel GNU/Linux

    Success! I’ve been working all day on a working OpenVZ kernel on my dev machine. 2.6.18, 2.6.24, 2.6.18rhel5; all borked out on the machine (either mid compile, or crapped out at boot) Anywho I setup a PKGBUILD for 2.6.26 Gogol & made a few modifications, and BAM everything is golden.

    I’ve updated git & uploaded the package to AUR: http://aur.archlinux.org/packages.php?ID=34116

    BTW, I just found out that an online friend of mine (Wonder) that is heavily involved in ArchLinux has created an Arch template for OpenVZ. Previous to this wonderful contribution OpenVZ has been without an Arch Linux template (that is updated), and it’s been a real drag. You can find the template on the standard templates page:

    http://wiki.openvz.org/Download/template/precreated

  • Err, Cliard

    I got some hefty notes from Kimmo (creator of arduino_make.sh) and decided it would be best to take down the cliard repo until I have a little more original code/don’t have cliard as one big hack to Kimmo’s script. I feel bad “as if slandering his name.” Sorry if I got anyone’s hopes up, but I shouldn’t have released crappy modified code since it has the possibility of making the originator look bad. I look forward to a good release of cliard in the future.

  • Cliard | Command Line Arduino FTW

    Well, Cliard 0.1.0017 is… working :) It’s almost a direct descendant of Kimmo Kulovesi’s arduino_make.sh. I stripped out a lot of flac (placed it into ‘docs’ for now), changed a few things, and gave arduino libraries a much deserved home in ~/.cliard/arduino. The program itself is comprised of ~/.cliard/arduino/{examples,hardware,libraries} & ‘cliard’ executable & a perl serial interface (to restart arduino via software)…

    To install you have a couple options:

    1) PKGBUILD (If you’re on Arch Linux)

    2) http://github.com/fsk141/Cliard (If you’re on something else)

    • Just install avr-gcc, avrdude, wget, perl-devices-serial (http://search.cpan.org/~COOK/Device-SerialPort), & run ‘./install.sh’

    How to use:

    1) make a directory containing you .pde file (with the same name)

    Example: ~/LED/LED.pde

    
    #define LED 11
    
    void setup () {
     pinMode(LED,OUTPUT);
    }
    
    void loop () {
     digitalWrite(LED,HIGH); // turn led on
     delay(1000); // delay
     digitalWrite(LED,LOW); // turn led off
     delay(100); // delay
    }
    

    Inside the ~/LED directory execute ‘cliard’

    If everything goes well, then you should be able to plug in your arduino and type ‘cliard upload’, and enjoy your new .pde running on your arduino.

    There is a lot that needs to be worked on, but *all* of these things should get done in good time. I hope you enjoy cliard as much as I do. And happy hacking with your arduino. Oh and I’m thinking of making a dedicated page for cliard, but aren’t sure as of yet, so for now just check the gitlog for updates.

  • CLI Arduino | Recover from epic failure

    I finally got the command line arduino interface working, and just need to think of a way to package it up… It’s a program by Kimmo Kulovesi (http://www.cs.helsinki.fi/u/kkuloves/). The thing is that it works, but it seems like a big hack :) . It’s a giant shell script.

    If your interested in a pre-packaged release then take a look at the two files below. It should be a pretty straightforward drop in. I put both files in ~/.scripts & “alias ardmake=’~/.scripts/ardmake’ I also extracted Arduino 0017 into ~/ . I plan to refine the program (basically make my own program), and package everything up into a nifty little package. More to come soon.

    http://github.com/fsk141/scripts/blob/master/ardmake

    http://github.com/fsk141/scripts/blob/master/dtr

    ——

    I was editing my /etc/rc.sysinit recently and epically borked it. Good thing I made a backup :) Anyway it’s almost too easy to recover from epic non-boot failure.

    1) Boot grub & hit ‘e’ (to edit)

    • Add S (or the full word Single) to the end of your kernel line
    • Hit enter then ‘b’ (to boot your edited entry

    2) You will be dropped into single user mode (after you type your root password)

    • ‘mount -o remount,rw /’ (to mount / with read/write permissions)
    • fix what you broke, and reboot…
  • Allow Normal Users to Use Serial Port (USB Serial)

    OMG: http://www.sparkfun.com/commerce/news.php?id=305 << Can’t wait for Free Day, it’s going to be epic.
    Anywho, that’s gotten me excited, and I pulled out my Arduino, to continue reading ‘Getting Started With Arduino’ I’m working along, and went to start up the ‘Arduino 0017′, and my serial port didn’t work. Well I tried it via sudo, and it worked. So at first I added sudo to the ‘/usr/bin/arduino’ executable. Yet this was very hackish, so I went looking for the solution.

    
    gpasswd -a fsk141 uucp
    

    Where ‘fsk141′ == your username… This will add you to the uucp group, where you can enjoy serial access. Woot!

    Now I’m looking at how to ditch the Arduino IDE, and compile manually. It has something to do with a makefile, but I haven’t gotten it to work yet… Updates to follow one I get CLI upload to the Arduino

    Resources:

  • Flickr with Linux

    flickr

    Flickr is the best. All it takes is $24 a year, and you can back up all the images you want, and you get a nifty web interface too. The wonderful thing about flickr is that they provide an API so that a bunch of talented programmers can make interfaces that work well with flickr. Many people have taken advantage of the API, and have made some excellent programs. The problem being is that it’s difficult to find great programs. Ones that aren’t glitch prone, out-dated, or just plain useless. I’ve gone on a gigantus search for the creme-de-le-creme, and here are my results.

    Lets start out with the Flickr Web Uploader:

    Access the uploader here: http://www.flickr.com/photos/upload

    To upload photos it’s a simple 2 – 3 step process depending if you would like to add a description/tags to your uploaded photos.

    Step 1 (Select photos):

    My image capture program kinda crapped out, but you get the idea. Click the large black box, and multi-select the files you would like to upload.

    Flickr_Upload

    Step 2 (Verify files & upload):

    It’s pleasant that there is a verification page so you can add/remove files at your leisure.

    Flickr_Upload_2

    Step 3 Finished (Add more info by clicking “add a description”):

    Flickr_Upload_3

    Pros:

    • It’s very simple, and works as advertised.
    • Multi-Select is a bonus
    • Has nice looking effects

    Cons:

    • Bogs down web browser substantially when uploading
    • Couple minor visual glitches on my system

    Summary:

    The Flickr web uploader features a hassle free approach to uploading your photos, and requires no setup, or install of anything. I use the web uploader all the time, and just hate that it pretty much prevents me from browsing the web when I’m uploading files. The uploaded definitely cripples my web browsing experience, and that’s annoying…

    ——

    Lets move onto something more dedicated… Desktop-Flickr-Organizer (aka dfo)

    If you are an Arch Linux user, then go and grab my PKGBUILD in the AUR here: http://aur.archlinux.org/packages.php?ID=12069

    If not, then look into your local package repositories for dfo.

    After you install go ahead and click Flickr > Connect

    Flickr-Connect

    This will go and grab all your photos, and import them into dfo. Once everything is imported, your sets will show up. At this point it’s a snap to add new sets, upload photos, and download photos. It’s just a matter of clicking the right buttons. And there aren’t that many buttons, so it is difficult to screw up.

    I would upload some pictures, but the program is uber buggy, and all I can do right now is build my image database. Hopefully I can do other things when that’s done.

    Pros:

    • Clean UI
    • Speedily Grabs Pictures

    Cons:

    • Uber buggy
    • No longer Maintained (or at least it seems that way)

    Summary:

    DFO would be a great app if it wasn’t one of the buggier programs in my selection. The developer of flickrfs built & maintains dfo, and it seems like both projects had a wonderful start, and then they both dropped off the deep end. No longer to be updated, or work without epic bugs.

    ——

    Another wonderful program called flickrtouchr written by Colm MacCárthaigh is dedicated to downloading your flickr photos/sets/everything. His version was made to sync with an ipod touch. Yet I found a version that downloads the whole images, and was pretty close to what I needed out of the box. I found it here on Dan Benjamin’s site and modified a couple things so that it works better :)

    You can download my version via github here: http://github.com/fsk141/fsk141-flickrtouchr

    [fsk141@Scribbly ~/fsk141-flickrtouchr]$ ls
    README  bak  flickrtouchr.py
    [fsk141@Scribbly ~/fsk141-flickrtouchr]$ ./flickrtouchr.py bak
    ./flickrtouchr.py:27: DeprecationWarning: the md5 module is deprecated; use hashlib instead
    import md5
    Download Mode (1=Collection, 2=Set, 3=All): 3
    Flickr_Upload ... in set ... 2009-Flickr_Linux
    Flickr_Upload_2 ... in set ... 2009-Flickr_Linux
    Flickr_Upload_3 ... in set ... 2009-Flickr_Linux
    Flickr-Connect ... in set ... 2009-Flickr_Linux
    ...

    Pros:

    • Simple CLI
    • Fast
    • No frills awesomeness

    Cons:

    • Not perfect code, but pretty darn close (could use improvements)

    Summary:

    I love this program for downloading off flickr. It’s one of the simplest programs to use. Other than the couple of modification I made, it suits my needs very well for downloading.
    ——

    I’m still on the lookout for programs that aren’t as buggy as dfo, and do what I need. I’m planning on trying flickcurl, frupple, and frogr. I’ll write up any interesting features that I find when I find them.

    ——

    On a side note, I think http://www.seoishard.com/seo-tool/flickr+manager+2.8 << is a scam. I believe that it’s entering hidden links in my website when I add flickr images. I’m going to look for little bugs in the code. It epically blows, cause I know a lot of people prolly use this plugin because it “works.” Well not only does it work, but it’s scamming all over the internet. eh