Thursday, October 23, 2014

Beautify Linux Screen session


Screen is a useful too to maintain remote SSH sessions while working with embedded devices. If you want to have nice and informative screen sessions, you can add the following to the ~/.screenrc file.

autodetach on
startup_message off
hardstatus alwayslastline
shelltitle 'bash'

hardstatus string '%{gk}[%{wk}%?%-Lw%?%{=b kR}(%{W}%n*%f %t%?(%u)%?%{=b kR})%{= w}%?%+Lw%?%? %{g}][%{d}%l%{g}][ %{= w}%Y/%m/%d %0C:%s%a%{g} ]%{W}'

Tuesday, October 21, 2014

Updating MacPort to Yosemite

I was trying to install a package from MacPort and realized my port installation is broken. To install a new version, I have to recompile it from source.

I follow the SVN path.
https://guide.macports.org/#installing.macports.subversion

The compile is fine, no problem at all. Assume you have everything installed for compilation.

At the end, you might want to upgrade all outdated packages. then You will have a problem like this.

$ sudo port upgrade outdated
--->  Computing dependencies for cmake
--->  Configuring cmake
Error: Failed to configure cmake: configure failure: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_cmake/cmake/main.log for details.
Error: Follow http://guide.macports.org/#project.tickets to report a bug.

CSs-MacBook-Pro:base ph$ more /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_cmake/cmake/main.log

To solve the problem, you will need to update your xCode SDK. Just go to apple developer site and update it. After that, you are rock.

You will have another problem with gcc46.


$ sudo port upgrade outdated
Password:
--->  Computing dependencies for gcc46
--->  Building gcc46
Error: Failed to build gcc46: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc46/gcc46/main.log for details.

Error: Follow http://guide.macports.org/#project.tickets to report a bug.

I went pass this problem with installing gcc49 and remove gcc46.

sudo port install gcc49
sudo port uninstall gcc46

Wednesday, February 8, 2012

Sunday, November 20, 2011

Running mesh with OLSR with Openwrt (backfire)

1. checkout the svn source codes from official SVN repo.

2.update software packages and install them
 ./scripts/feeds update
 ./scripts/feeds install -a -p luci
 ./scripts/feeds install -a -p olsrd

3. compile the Openwrt system with Luci image

4. under Network/Interface, add new interface

5. configure the new created interface

6. configure wifi under Network/Wifi

7. ssh into the node, and edit /etc/config/olsrd, must set 'interface' to 'wl0' as we configure the wifi interface in previous step.
 config  'Interface'
              list 'interface' 'wl0'     
                                                                                                         
8. then start the olsrd, by /etc/init.d/olsrd start

Tuesday, October 25, 2011

things need to change to enable multiple hop routing

#!/bin/ash

# needed for static multihop routing
echo 1 > /proc/sys/net/ipv4/ip_forward
echo 0 > /proc/sys/net/ipv4/conf/all/send_redirects
echo 0 > /proc/sys/net/ipv4/conf/all/accept_redirects
echo 0 > /proc/sys/net/ipv4/conf/ath0/send_redirects
echo 0 > /proc/sys/net/ipv4/conf/ath0/accept_redirects
echo 0 > /proc/sys/net/ipv4/conf/ath1/send_redirects
echo 0 > /proc/sys/net/ipv4/conf/ath1/accept_redirects
echo 0 > /proc/sys/net/ipv4/conf/ath2/send_redirects
echo 0 > /proc/sys/net/ipv4/conf/ath2/accept_redirects

embedded linux tools for android

Busybox
http://www.androidfanatic.com/community-forums.html?func=view&id=228&catid=9

Iperf
http://www.magicandroidapps.com/wiki//index.php?title=Using_iPerf_for_Android

Rooting Galaxy S2
http://samsunggalaxys2review.org/root-your-samsung-galaxy-s2-heres-how/

enable multi-hop routing
http://thindot.blogspot.com/2011/10/things-need-to-change-to-enable.html

Thursday, September 29, 2011

Discontinuation of libhid library in Ubuntu 10.10 causes problems

root@router39:~/mesh-svn-repo/LabBrick-Control# ./LabBrickControl
./LabBrickControl: error while loading shared libraries: libhid.so.0: cannot open shared object file: No such file or directory

all you need to do is to copy /usr/local/lib/libhid.so.0 to the node that needs it.

RISC-v emulator

Changes are based on https://risc-v-getting-started-guide.readthedocs.io/en/latest/linux-qemu.html For Ubuntu/Debian, in addition to sud...