May 27, 2008

N810 - First steps for Java developers

This is mainly a post for my future reference.

To install many of the developer related software (like SSH and Java for instance), you need to activate the Red pill mode in the Application manager.

Red pill mode
Enable red pill mode in application manager;
1. Settings -> Application Manager
2. From the menu; Tools -> Application catalogue...
3. New -> Enter 'matrix' without ' in the Web address
4. Click Cancel
5. Select Red

As described here

SSH + root
Install OpenSSH (which includes both server and client) from Application mananger. When doing this, you are asked for a new root password. This should be a good password!

Java Virtual Machine
Install JamVM (which includes GNU Classpath) from Application manager. This will enable you to run Java programs by typing 'jamvm' instead of 'java' at the command line.

Enable su and sudo from user
1. Open x-term on device and type 'ifconfig' to get current IP address.
2. Start Putty or similar on desktop computer to SSH to the device's IP address.
3. Login as root using the password you entered earlier.
4. Enter 'passwd user' and enter new password for the user 'user'
5. Enter 'echo "user ALL = PASSWD: /bin/su" >> /etc/sudoers' to allow 'user' to use su
6. Optionally disable remote login for root by entering 'passwd -l root'
7. Now you may SSH to your device using 'user' and the new password. And whenever you need root; just type 'sudo su -'

Modified from here

OSGi
I tried Knopflerfish OSGi first, but it didn't work for some reason; however Felix from apache.org works very well:

1. On your device; open browser and got to felix.apache.org
2. Download latest versjon to some folder.
3. Enter 'gunzip -d felix-1.0.4.tar.gz | tar -xf' to unpack
4. Change directory to felix-1.0.4
5. Start Felix with 'jamvm -jar bin/felix.jar'

This is a start at least!
Post a Comment