Installing ipkg and Python on ASUS RT-N56U Router (Busybox)

Categories: Linux; Tagged with: ; @ May 15th, 2016 15:59
  1. enable ssh
  2. mount your usb drive – make sure it’s not vfat, you may need to format your disk:
    # mkfs.ext4 /dev/sda1
  3. update ipkg.sh:
    # mkdir -p /media/AiDisk_a1/opt
    # mount -o bind /media/AiDisk_a1/opt/ /opt/
    # mkdir -p /opt/tmp/ipkg
    # ipkg.sh update
  4. install ipkg:
    # ipkg.sh install ipkg-opt
  5. install python:
    ipkg install python27

Useful links:

ASUS RT-N56U or hardware NAT acceleration

Error Message:

Unpacking ipkg-opt...tar: can't create symlink from ./opt/bin/ipkg-opt to ipkg: Operation not permitted
tar: can't create symlink from ./opt/lib/libipkg.so to libipkg.so.0.0.0: Operation not permitted
tar: can't create symlink from ./opt/lib/libipkg.so.0 to libipkg.so.0.0.0: Operation not permitted
Done.
Configuring ipkg-opt...Done.

Make sure that your usb drive is not ‘vfat’

Enabling SSH on ASUS RT-N56U Router

Categories: Development NotesLinux; Tagged with: ; @ May 15th, 2016 15:36

the default firmware doesn’t provide the SSH feature, however, with the help of padavan‘s rt-n56u project, you may enable it:

This project aims to improve the rt-n56u and other supported devices on the software part, allowing power user to take full control over their hardware. This project was created in hope to be useful, but comes without warranty or support. Installing it will probably void your warranty. Contributors of this project are not responsible for what happens next.

How do I get set up?

What I did:

  1. download RT-N56U_3.4.3.9-099_base.trx
  2. login to the router setting dashboard, and upgrade the firmware by selecting the downloaded file.
  3. after couple minutes,  my router reset, I connect to the router via cable, and setup wifi. (you may try ‘1234567890’ to connect to your wifi network if you cannot connect to it directly)
  4. login to the router setting dashboard, you’ll find a new UI! navigate to: Advanced Settings > Administration > Services to setup your ssh server.  more details: https://bitbucket.org/padavan/rt-n56u/wiki/EN/CommonTips

Python: multiprocessing forking.py assertionError

Categories: Development NotesPython; Tagged with: ; @ March 22nd, 2016 23:32

Issue:  There’s an AssertionError when I try to test  mutliprocessing features using lettuce 0.2.22 / nosetests and python 2.7.10 error details:

multiprocessing\forking.py AssertionError: main
File "", line 1, in 
File "C:\Python27\Lib\multiprocessing\forking.py", line 380, in main
  prepare(preparation_data)
  File "C:\Python27\Lib\multiprocessing\forking.py", line 488, in prepare
    assert main_name not in sys.modules, main_name
AssertionError: __main__

upgrade to python 2.7.11 becuase this is a fixed bug: https://bugs.python.org/issue10128; or
use a wrapper (.py file name should be not in sys.modules, main_name):

# run_at.py:
__requires__ = 'lettuce==0.2.20'
import sys
from pkg_resources import load_entry_point

if __name__ == '__main__':
    sys.exit(
        load_entry_point('lettuce==0.2.20', 'console_scripts', 'lettuce')()
    )

Command Line Tool to Backup Local Files to Dropbox

Categories: Python; Tagged with: ; @ February 21st, 2016 16:32

main features

  • upload local file to dropbox
  • verify remote file after upload job completed
  • clear local / remote backup files to save space

how to use it

http://guoliang-dev.github.io/rabbit-backup/

how it works

rabbit-backup uses dropbox api to upload local file to dropbox.com; // that’s why we need a dropbox access token.

Youtube Command Line Tool: download all videos by user / playlist 批量下载Youtube视频

Categories: Python; Tagged with: ; @ February 21st, 2016 13:50

Features:

  •  download all videos by user id 下载指定用户的所有视频
  • download all videos by playlist id 下载指定播放列表的所有视频
  • skip the previously downloaded files 跳过已下载视频

Usage:

  1. pip install rabbityoutube
  2. set google api key
  3. ready to use:
    rabbit-youtube.py -u ChromeDevelopers /tmp/test/

for more details:  http://guoliang-dev.github.io/rabbit-youtube/

Older Posts



// Proudly powered by Apache, PHP, MySQL, WordPress, Bootstrap, etc,.