Posted by Tim
Filed under: Blog
Setup git tracking branch for existing branch
Something that I did many web searches is how to setup up tracking of a remote git branch for an existing local branch. That regularly happens for example if I start with a local topic branch, and then push it to the central repository. Now, git does neither automatically setup that this (new) remote branch should be tracked for the local branch nor did I find a convenient command or argument to do so. So here is what is required, assuming that the remote repository is named origin, the local branch is topicbr, and the remote branch is timn/topicbr, and you are in the local git repository:
git config branch.topicbr.remote origin
git config branch.topicbr.merge refs/heads/timn/topicbr
.
It's that easy and now I have a place to look it up next time I need it...
Posted by Tim
Filed under: Blog
Aldebaran Workshop 2010
I'm currently attending the Aldebaran RoboCup Workshop. It has its interesting points but obviously there is a lot of old stuff for new teams. You can follow me on twitter for fresh info on the new version of the Nao.
Currently there is a talk about the Nao motion module. Besides that I'm setting up the OpenEmbedded tool chain, again.
Posted by Tim
Filed under: Blog
Conquering the N900
Last week just at the end of the last decade (happy new year everybody btw) I got a Nokia N900 with the Linux-based Maemo 5 operating system. I have had an N810 for more than a year and was very pleased with the device, especially because I can write "normal" programs, i.e. programs running on Linux with the APIs I already knew from desktop apps. For example Fawkes is running just
fine on the device!
My first impressions after using the N900 are positive. It is still beta around the edges but it gives you full control over your device, including root access which just feels right. Here are some notes which might be useful and which I might need again.
Content Transfer from old Symbian (N76 -> N900)
My last cell phone was a Nokia N76. It has agglomerated quite some data like contacts and calendaring info over the last couple of years. So how to transfer? On the last Windows installation we have in the household (a partition on a laptop we usually boot once a year for reporting taxes), from the
last transition there was still a Nokia PC Suite installation. I figured I should upgrade it to work with the N900. Nokia nowadays recommends the Ovi Suite so I thought I'd give it a try. It failed already with the N76. After successfully connecting it would say that some operation was still running no matter what I tried to do. The N900 was not even recognized. So back to the PC Suite. It copied the content from the N76 just fine with the Content Copier (which I used last time for transferring from the 6230 to the N76). But for the N900 this is not supported. The only thing it can do is synchronization - and to synchronize the calendar you need either Microsoft Outlook or Lotus
Notes. That sucks! So the only thing I could transfer were the contacts using this method.
Later the day I remembered that there was some synchronization feature directly in the phone. I looked it up in the N76 and with this I was able to copy my calendaring data to the N900! This might work with other models also having the Switch application. Here is how if you want to do this as well. First open the application in the menu Tools -> Utilities -> Switch (on German phones: Programme -> Dienstprogr. -> Austausch). Then select Options -> Synchronize and follow the instructions on the screen. Turn on Bluetooth on your N900 and make it visible and allow pairing with your old phone.
You should be able to initiate this from the N900 in the Settings -> Transfer & sync. app. I haven't tried it this way around though.
Extras repositories
Additional software can easily be installed from the Maemo Extras repository, which is enabled by default. It already contains many interesting applications, but especially at the moment there is quite some software still waiting in the Extras-testing and Extras-devel repos.
Although officially discouraged, I have enabled the devel repo (I hope I kinda know what I'm doing, we'll see). It contains quite some packages that haven't made it through the full testing, yet. Among these are the Bluetooth Dial-Up Networking profile to dial-in with the phone from my laptop, a nice flashlight app, the Personal Data Plan (show amount of transferred data) and Personal IP Address (show current IP) widget and the packages for (developer) PC connectivity.
Cisco VPN GUI
Our university provides a Cisco VPN. To use this I have installed vpnc and vpngui from the Extras-devel repository (packages). After a small patch (bug #4184) it works like a charm and I can use the VPN.
Changing the host name
Since I'm using mDNS-SD via Avahi a lot to communicate with the robots I wanted to change the host name to something more personal. The host name announced via Bluetooth can be changed easily, but I didn't find a way to change the real host name. So I used the root access to set a new host name in /etc/hostname. Note that you also need to modify /etc/hosts to add the new host name as name for the localhost address. Otherwise the N900 gets too slow to do anything with it. Then a reboot and the new name is active.
Creating a connection from a laptop
For Bluetooth DUN support you need to install the "Bluetooth Dial-Up Networking" package (requires Extras-devel repository at the moment, reboot after installation to finish installation). Afterwards creating a connection from a laptop via the N900 works as with any other phone. On Linux (Fedora 11 in particular here) you can use the Bluetooth Manager (package name is blueman) to setup the device as DUN Adapter (right click and choose "Setup"). Afterwards you can create a broadband connection via the NetworkManager (right-click, edit connections, create mobile broadband connection). If you are as lucky as me your provider data is already available for selection. Afterwards click on the NetworkManager icon and the connection name to establish the connection. Next time in the Bluetooth Manager you just need to right-click on the N900 and select "Connect to: Dial-Up Networking" and then the connection in the NetworkManager. The only thing that I'm missing is that the N900 will not indicate the laptop connection in the status bar, which I find irritating.
And now after some days off back to real work...
Posted by Tim
Filed under: Blog
Maemo 5 SDK on Fedora 11 x86_64
The new Nokia N900 has been presented with much fanfare featuring Maemo 5. I'm the happy owner of a N810 and it was the original reason to write the LaserGUI for Fawkes. I'm really looking forward for the device. I planned to get a new mobile anyway and wasn't sure whether to go for the N97 or an Android phone. Now I'm eagerly waiting to get a N900 into my hands.
The last time I developed for Maemo I had setup a 32bit virtual machine with Fedora to run the development environment. But this is clumsy at best. It consumes a lot of extra resources (especially RAM) and the virtual environment cannot do my native full resolution. This time I wanted to try the SDK for the new Maemo version and installed it natively on my x86_64 Fedora installation, which works just fine. Here are some notes that might be helpful if you want to do the same. The notes are for the Maemo 5 SDK, Beta 2.
You need the basic 32bit libraries to install the environment. I didn't run into anything that was missing, so I guess a basic 32bit environment is sufficient.
There is a very good installation manual for the SDK. First download the scratchbox and sdk installer scripts referenced in the manual. To install on x86_64, you need to make two changes. First you need to add the kernel parameter vdso32=0
by adding it to the lines beginning with "kernel" in /etc/grub.conf. For this to take effect you need to reboot (before you start the installation). Secondly you need to enable the "force" mode without enabling .deb installation. This is only possible by adding the script. For this add "__force=yes" around line 311 (where the s parameter is handled). The section should afterwards look like this:
s)
__type=tgz
__force=yes
__scratchbox=$OPTARG
;;
Now you are ready to install scratchbox. For this execute the scratchbox install script as root like this
sh maemo-scratchbox-install_5.0beta2.sh -s /opt/maemo-sdk-5b2/scratchbox -u tim
and follow the instructions on the screen. This will install the SDK to /opt/maemo-sdk-5b2/scratchbox and add the user tim to the allowed users. This must be your user name on the Fedora system.
Then execute the SDK installer not as root, but as normal user and follow the instructions. There was nothing special I had to do, just do
sh maemo-sdk-install_5.0beta2.sh -s /opt/maemo-sdk-5b2/scratchbox
Now Maemo is installed and after one slight installation and/or fix you are ready to go. The current version of Xephyr in Fedora is broken. It was only in version 1.6.3 where patches have been applied that fix segfaults when pressing keys. This version is available in the updates-testing repository. I did not experience any problems, your mileage may vary. To update the package do yum --enablerepo=updates-testing update xorg-x11-server-Xephyr
replace update with install. I have actually updated all xorg-x11-server* packages. I'm not sure if this is necessary. Works fine for me so far.
You might want to read Thomas Thurman's tutorial series about developing for the N900.
You can install the Maemo 4 SDK similarly. In the scratchbox install script uncomment the "exit 1" line by prefixing it with a hash (#) to eliminate the i386 check. You need the same vdso32 parameter and the updated Xephyr. I recommend choosing different directories for the two SDKs, as they use different versions of scratchbox.