Archive for the ‘Networking’ Category

Debug android-maven-plugin apps in Eclipse with DDMS

November 9, 2011 Leave a comment

Lately, I’ve been developing Android applications with Maven support and, while it’s rather easy to mount a mature development environment with Eclipse, the usage of android-maven-plugin has brought some integration issues when debugging.

Usually, I do most of my Maven and debugging stuff in a terminal console. But others will prefer to use Eclipse! And I can understand why, since its DDMS perspective is so powerful and easy to use.  Here’s how you can do it:

  1. mvn clean package
  2. Deploy the target/xxx.apk to the device
  3. Open DDMS perspective in Eclipse
  4. Select the process you want to debug/trace
  5. There you go!

From profiling to thread debugging or simply adb logcat, you’ll have it all!

Don’t forget to configure permissions for your user to access the device. Ever hard those “?????” when issuing adb devices stating you have no permissions? Here’s how you can fix it (in Ubuntu-based distros at least):

  1. Run lsusb
  2. Check the line for your device, such as Bus 001 Device 008: ID 0bb4:0cab High Tech Computer Corp.
  3. Edit a new udev rule by executing sudo nano /etc/udev/rules.d/51-android.rules as seen bellow the bullet list
  4. Save file and issue sudo service udev restart
SUBSYSTEM==”usb”, SYSFS{idVendor}==”0bb4″, MODE=”0666
Reconnect your device and you’re done!

Debugging running APK in Eclipse DDMS

Installing Ubuntu 9.04 into Alix2d3

August 29, 2009 7 comments

Hi fellow geeks!

For sometime now, I’ve been looking forward to acquire an embedded system that would become my home router and testbed for some networking stuff I’m working on. The requisites are the following:

  • Noiseless, cause I want to sleep with it right next to me
  • Very small
  • x86 architecture, cause I want it as a testbed for my networking applications and don’t want to fiddle with architecture vs compiler/libraries issues
  • Two or more Ethernet devices
  • USB and mini-PCI are pluses
  • Cheap!!

Thanks to my friend João Barraca, I went for a PC Engines Alix ALIX2D3. And must I say, it’s great!! And only 104Euro + 26Euro (customs taxes).  I’m not showing the unboxing process, but here’s a picture of the board.

ALIX2D3 board

ALIX2D3 board

I did some things wrong though, on the rush of getting a new toy (don’t you geeks know this feeling?!). First PC Engines is based in Switzerland, and therefor non-EU, and therefor customs taxes and a long wait for the delivery. Then I ordered the board and a black case only, so at arrival, I missed a DC, a Compact Flash card and a null-modem serial cable. I went to one of those big electronics market and bought the following:

  • Vivanco universal DC 7v-24v (I recommend setting it for 18v, depending on the number of devices you’ll be using, such as USB and mini-PCI stuff). Oh and be careful with the polarity of the board which you can find by looking down the FB18, and using the correct connector size, 2.1mm.
  • Sandisk CF Ultra II 4GB;
  • Null-modem serial cable (female-to-female);
  • Serial-to-USB adapter.

As I said, I also ordered a black case and I had an issue while assembling the board into it. The serial port hex nuts wouldn’t fit the case! Well, just remove them, insert the board, and attach them again. In the end, this is the result:

Board in the case

Board in the case

Front of "the machine"

Front of "the machine"

Size compared to the E71

Size compared to the E71

I recommend you install everything you need and test it before you put the board into the case, so you can avoid repeating the screw/unscrew process.

Now, let’s head for the installation.

  1. First, grab the alternate installer for the latest Ubuntu i386 (9.04 iso). Burn it.
  2. Plug your CF card into a USB card-reader and punch it in your PC/laptop.
  3. Boot from the CD and press F4. Select text-only system installation.
  4. Install Ubuntu into your CF. I recommend setting only one partition and not using swap as you don’t want to “burn” lifetime from your CF.
  5. Don’t install grub into the MBR of the first disk, but on the MBR of the CF.
  6. Reboot.
  7. Boot into your CF Ubuntu system and log-in.
  8. Install an ssh server. sudo apt-get install openssh-server
  9. Edit your /etc/network/interfaces and configure your network devices as you see fit.
  10. As you’re using your PC/laptop for the installation process, udev has persisted the currently existing network devices. You must remove all entries before putting the CF into the ALIX2D3 board, so that all Ethernet devices there are correctly named (eth0, eth1, eth2). Just issue echo “” > /etc/udev/rules.d/70-persistent-net.rules
  11. In order to protect the CF once more, edit your /etc/fstab and change relatime to noatime in the root line (/). Also, add the following lines:

none /tmp tmpfs nr_inodes=200k,mode=01777 0 0
none /var/tmp tmpfs nr_inodes=200k,mode=01777 0 0

Power off. Now, put the CF into the board and have fun through ssh. Enjoy :-)

Categories: Linux, Mobile, Networking, OSS, Tek, Work

Long time no see..

May 7, 2009 4 comments

Hi fellow geeks,

Been 2 months since my last post, I know. I have been quite busy at work! And I guess it’s time I talk a little bit of what I’m doing since November.

Well, for a start I left Nokia Siemens Networks for PDM&FC (I know the website is old, and not trying to excuse the inexcusable, let’s say that people there are actually busy working on real stuff). Anyway, leaving a corporate for an SME was a refreshing decision! I didn’t feel productive anymore, and that was something I couldn’t stand. People were great, though :-)

Arriving at the new company was nothing as I had in mind. In the initial couple days, it was hard to find someone who could spare some time pointing me what to do and where to start. Soon, I realized everyone was so very busy working on their projects. Nonetheless, I was kindly received by my new coworkers, and I was eager to start showing what I’m able to do.

I started with some minor tasks like writing some Python + Gstreamer code for video-transcoding stuff; then some PHP spaghetti; ending with architectural design discussions for a scalable web service-oriented platform. But the true thing I was recruited for was yet to come, the EU-funded project (FP7) HURRICANE.

HURRICANE aims at delivering a framework to enable and execute seamless handover between heterogeneous radio access networks like 802.11, 802.16 aka WiMAX, DVB-H and 3GPP (UMTS). Let me throw some major concepts so you can better understand what I’m doing..

  • Handover – process of transferring an ongoing call or data session from one channel connected to the core network to another (see Handoff);
  • IEEE 802.21 – aka Media-Independent Handover (MIH) Service, this emerging standard is the base for this project, comprehending the facilitation of handover analysis procedures. The resulting decision process and execution is out-of-scope of the standard.

And this is what HURRICANE proposes: to provide an implementation of the .21 standard, some handover-decision/execution modules on top of it, and also the lower-layer access to the identified RATs (Radio Access Technologies).

802.21 - Media-Independent Handover

My main function on this project is to implement the proposed framework. Starting on the .21 generic service, the MIH Function (MIHF) and going through several stages of the link-layer (I hope to skip the real part on this), we’ll end by having, I hope, a real seamless handover between 802.11 and 802.16 – there are some more scenarios defined, but due to hardware access limitations, I don’t believe they’ll be fully deployed – powered by HURRICANE. Also, I’m the responsible to study (done!) and implement a PMIPv6 module to IP-mobility on top of this architecture.

A lot of work has been done, but there’s much more to do! I’m thrilled to see what we’ll achieve by the end of this year. In the meanwhile, I’ll be posting about casual stuff I shall be working on :-)

Cheers to you all, and cya soon!

Yours truly

Categories: Life, Mobile, Networking, Tek, Work

My MIPv6 testbed

February 26, 2009 4 comments

Oh yeah, just got “my” MIPv6 testbed up and running. It’s a work task actually, but some material is mine like the Asus EeePC and the Nokia N810. Well, just wanted to share with the world how wonderful it is :-p

Super-cool MIPv6 testbed

Super-cool MIPv6 testbed

Enjoy you geeks!

Categories: IPv6, Linux, Mobile, Networking, OSS, Tek, Work

Defining multiple IPv6 addresses in one single NIC in Linux

February 26, 2009 1 comment

While on my MIPv6 quest, I needed to define two IP addresses to a single ethernet card. Well, I thought the usual aliases thing would suffice, but I guess I was wrong since that didn’t work, complaining something like:

SIOCSIFFLAGS: Cannot assign requested address

So I remembered that, at least in Linux, you can have multiple IPv6 addresses in one single NIC just by issuing the command:

ip -6 addr add 2001:db8:a::1/64 dev eth0

This worked out! But now I wanted to add it to my /etc/network/interfaces so that the changes would be permanent. After some googling I found out that all I had to do was to add the previous command like follows:

auto eth0
iface eth0 inet6 static
address 2001:db8:f:1::1/64
netmask 64
up ip -6 addr add 2001:db8:a::1/64 dev eth0

Then just reboot or execute:

sudo ifconfig eth0 down
sudo /etc/init.d/networking restart

And there you go! Multiple IPv6 in one single NIC the easy way :-)

Categories: Linux, Mobile, Networking, OSS, Tek, Work

Custom kernel for Asus Eee PC

February 18, 2009 7 comments

Recently a relative of mine bought an Asus Eee PC 4G (I believe it’s aka 701) with Windows XP. It’s a sweet device for any geek to have around, btw :-)

Oh well, some cola over the keyboard made it unusable.. at least for the previous owner. That’s right, “previous”! Why? Well, there it was, this beautiful black toy, thrown to a dark and cold corner as if dead and I couldn’t resist to ask for a look. We agreed that if I got it to work, it would be mine. And so it was.. Now I only need to test if the built-in keyboard is really dead or if it’s a controller problem. Anyway, I’m using my Apple USB keyboard for home fun.

Asus EEE PC 701

Asus EEE PC 701

After the hardware issues I got to the software part aka replacing the bundled Windows XP with Linux. As I was in a hurry I looked for the default Linux distro that comes with these babies, Xandros Linux, just to find out that it’s not freely available. Oh well, it actually sucks anyway compared to the distro I’m using right now, eeeubuntu. As a strong Ubuntu user and supporter for some years now, I am biased here of course, but it truly suits my needs without any hacks. First of all you have to select and download one of three versions: standard – a full blown desktop; nbr – Netbook Remix says it all; base – for disk space paranoids. I went for the nbr flavour and I’m quite happy with it!

The .iso file can be then processed into a CD that you’ll read using an external CD/DVD drive or simply by going the Ubuntu way, building and using a bootable USB stick. And so, after something like fifteen minutes I had my shiny new operating system up and running :-)

After some adding/removing software, I wanted to start hacking this little bitch to get MIPv6 working on it, meaning I had to recompile the kernel which in this distro is obviously compiled with some external modules. I once tried it in a Xandros installation, and it was quite trivial, but now I wanted to package my changes into a .deb file I could replicate for others, like eventually yourself. I found out that there are already very good instructions to do so, and not wanting to add more noise to the web, I’ll just document the steps I took.

First, you’ll need some packages. I believe the following command package “list” is incomplete as I’ve used this machine before for compiling other stuff like OpenWRT. Still, you should be able to easily identify the missing parts :-)

sudo apt-get install build-essential debhelper fakeroot git-core

Update (thanks to _trine @ freenode):From now on, I assume your user has got write-permission for /opt.
Get the tailored kernel source from git repository (in my case I’m using Intrepid Ibex).

cd /opt
git clone git://

Now, manage a .config file which in this case is a bundle of default config and config.eeepc:

cd ubuntu-intrepid
cat debian/config/i386/config debian/config/i386/config.eeepc > .config

Define your kernel options as you see fit:

make menuconfig

Prepare things and package up:

cp .config debian/config/i386/config.eeepc
debian/rules updateconfigs
make mrproper
fakeroot debian/rules binary-eeepc binary-headers
cd ..

Now copy the packages into your machine and install them. Reboot and be happy :-)

Update: I’ve received hundreds of thousands of billions screenshot requests from all over the World, the ISS and even someone who I believe is from Mars. Well, you didn’t have to wait much, now did you?

megatron running eeeubuntu

megatron running eeeubuntu

Categories: Linux, Mobile, Networking, OSS, Tek, Work

No MSN with Adium, Pidgin or other libpurple-based IM client? Here’s why..

January 12, 2009 5 comments

UPDATE: For those using Pidgin, you can install msn-pecan. It works and it brings some new functionality. Just install it and change your account protocol from MSN to WLM.

I’ll be quoting the Adium blog which apparently is now down (all domain is unreachable actually).

Starting at about 20:00 PST tonight (January 11), Microsoft’s servers have stopped accepting logins from clients that use version 15 of the protocol, including Adium 1.3.2. The Debug Window in debug and beta versions of Adium reveals that their server is failing to find a certificate that it needs when Libpurple attempts to retrieve your MSN Address Book.

In case you’re wondering, this also affects Pidgin, which means it’s definitely not an Adium problem.

There are two ways to connect:

We’re not sure whether this is a temporary server problem or a permanent change that will break P15-using Libpurple-based clients (including Adium 1.3.2) until a future Libpurple release. If it turns out to be the latter, we’ll almost certainly include that Libpurple update in our next 1.3.3 beta.

Categories: Linux, Mac OS X, Networking, OSS, Tek


December 12, 2008 1 comment

I’ve been looking into 802.21 aka MIH and I’d like to know if there’s any known effort for developing an open-source implementation of this protocol. Also I’d like to know about any possible interest in participating in such endeavour.

Categories: Mobile, Networking, OSS, Tek

Nokia E71 vs iPhone

October 22, 2008 60 comments

Disclaimer: I know this post will raise some discussion as I know there are many iPhone lovers, Nokia lovers and boy lovers out there. But please, do not take me wrong on this. This post is 100% my personal opinion and as such does not need your personal approvement.
Update: If you think I’m a dork, it’s OK, I can live with that, but I won’t permit such behavior as trolling! So, any hate comments will be promptly deleted.

First of all, this post was meant to be a Nokia E71 mobile phone review, but my previous post raised some comments on my rather biased claims about the E71 “kicking the ass off iPhone” (I actually said iPhuck, and that’s probably what triggered all this situation). So, I’m not just doing a review but also comparising the two devices.

Note: Even that I’ve tried an iPhone for some time now, I do not own one. So beware that my arguments may not be accurate. I expect you, iPhone owners to help me keeping this straight. Let’s start..


E71 on top of iPhone

E71 on top of iPhone

The E71 is slightly lighter and slimmer than the iPhone, [114 x 57 x 10 mm] vs [115.5 x 62.1 x 12.3 mm]. It provides a QWERTY keyboard while the iPhone relays on the touchscreen both for navigation and text-input (more on this later). On what concerns visual interface iPhone presents you with a 3.5″ wide screen while E71 has a smaller 2.36″, whose quality differences are deepened by 480×320 vs 320×240 pixel resolution respectively. Also no one doubts iPhone UI is extremely appealing, one of Apple’s breakthroughs against Symbian “standardization” on mobile user interfaces, even that some people have complained about freezes and slower usability with recent software updates.

They say that an Operating System marks the difference. Well the stripped MacOS inside the iPhone does the trick for the fashion whores, but I much prefer an OS with true multi-tasking that enables me to listen to music while writing an e-mail and having a chat in my favourite IM client. “Oh my god, my iPhone has a client” – Yes it does, now try listening to and getting it into background so you can do something else. Sorry no can do.. Yes, yes, you can even argue that background applications eat battery and you are right if you tend to leave those applications running unmanaged, which would tag you as dumb. But hey, this dumb here has a Nokia. I can buy a couple spare batteries and carry them around. You, iPhone owner can also.. oh wait, no you can’t! I totally forgot you have an irreplaceable battery.

On the multimedia side, iPhone is a clear winner.. if you want to upgrade your old iPod. Everyone knows that iPhone has all the iPod abilities plus native integration with some media-sharing services and iTunes store. But hey, E71 has a better camera (3.2MP vs iPhone’s 2.0MP), native podcasting support, Ovi and other media-sharing services too. Now, E71 has MMS, video-recording and video-call support (it has a tiny camera in the front specifically for that use) while the iPhone does not support any of these. Some of you may say that you don’t use MMS and that it’s lamme when you use it to receive football goals footage or nude chicks licking each other, but let me ask you: you took a picture of you and your girlfriend. How are you going to send it to her?! And that brings me to the next point…

Talking about connectivity, E71 beats the shit out of an iPhone. Bluetooth in the iPhone is so limited that even a guy with a couple yogurt cups and a string would have more functionality. You cannot pair any kind of Bluetooth devices at your will. You will not be able to send files to other phones, and not even use your 3G connection through Bluetooth to access internet on your computer. Well I can do this and much more with my E71. I can even install JoikuSpot which converts my 3G phone into a wireless gateway.

Also E71, as most of the S60 mobile phones now natively support VoIP (SIP). I’ve got mine registered with Ekiga in one minute. Oh yes, and I use it, more and more as Symbian allows you to use VoIP over GSM when available!

Just on a side-note, I installed Fring, an IM/VoIP/file-sharing service. Very cool also supports MSN, Google Talk, ICQ, Yahoo, a lot of SIP registrars (like VoIPBuster and Gizmo), GMail notification, Twitter (only chat) and Orkut for the social-networking fanatics!! For the iPhone I’d recommend the same tool as it’s available through the Apple Store.

Of course we couldn’t go on without talking about web browsing and e-mail support. iPhone has a bigger browsing area, faster and smoother scrolling and great Flash support(1). Symbian’s web-browser is OK but I truly recommend installing Opera Mini. No arguments here, iPhone definitely wins. But what about e-mail support?

Well I must admit that to me Nokia win’s by far by just having a physical keyboard instead of the touch-sensitive virtual one.Many people have complained about the iPhone’s virtual-keyboard and I quote a Wired reviewAfter three days of iPhoning, typos were relatively common. After three hours with the E71, they’re pretty much nonexistent“. Also E71 brings a very realistic text-to-speech engine with Portuguese (as spoken in Portugal, not Brazil or other Portuguese speaking countries) support that you can download for free almost seamlessly while configuring this option. I love having some unknown girl called Isabel reading my e-mails or SMS with that sexy voice! My girlfriend keeps asking me who the hell am I talking to.. works like a charm :-D

Still on the keyboard issue, have you tried using the iPhone keyboard on the move? I tried while on the train and god, please help! Things just get worse when you’re inside a car, or even drunk.. yep, happens to me all the time!!

Now, what I didn’t expect and discovered soon is that iPhone doesn’t support copy n’ paste! Allow me. WHAT THE FUCK?! Must. Resist. Saying. ROTFLOL. This is one of the most basic features for using the web, e-mail, office-tools all together. And yes, E71 includes QuickOffice. Does the iPhone have something similar?!

This review could continue and enter the gaming or the SDK worlds, but personally I don’t give a fuck about the first one and I hate the second, since the Apple SDK is just a bunch of more shackles to developers. I’m not saying that Symbian’s SDK is perfect, no, not at all. But come on, when Apple released their first SDK they asked us to sign an NDA which specified that developers couldn’t exchange info between them regarding everything that concerned iPhone applications development. They don’t even support Java. Well fuck you and your SDK. Oh and Symbian will become open-source soon..


Both are mobile phones. Both are beautiful pocket friends to have around. But in the end, for me, my Nokia E71 wins and that’s why I’ve bought it! Apple tries to block their users to do things the way they want it. Nokia let’s me choose whatever application I want to install without having to jailbreak my cellphone. I can even interact (copy files, synchronize) with my Linux desktop and my Macbook seamlessly without having to use the Nokia PC Suite which happens to run only in Microsoft Windows.

Nokia E71 - my precious..

Nokia E71 - my precious..

Oh and just for your information, in Portugal the iPhone is only available through mobile operators with some stupid contracts. The E71 is network-free for just 419 Euro (as we speak at Ensitel stores).

(1) – Celso Pinto pointed me out that IPhone doesn’t support Flash. I must admit, I didn’t try YouTube. Thanks dude!

Categories: Mac OS X, Mobile, Networking, Rants, Tek

Nokia Internet Tablet c/ 3G

September 23, 2008 Leave a comment

Yep!!! Weeeeeeeeeee…. Vem mesmo aí!! Novo CPU mais potente e WiMAX!! Agora só falta prostituir-me para o pagar quando sair :-D

Categories: Linux, Mobile, Networking, OSS, Tek

Get every new post delivered to your Inbox.