Brick-to-Brick networking (and how to set up a SSH server and root access)
There are lots of applications for the Nokia 770. You can of course transfer the packages from your computer to the MMC card in your gadget mounting the device as a USB hard disk.
But, what if you want to set up a wireless network between your laptop (Brick1) and your gadget (Brick2)? Well, you have two different options: WLAN and Bluetooth.
As your laptop is as heavy as a brick (and so is your gadget, although a smaller brick), this is brick to brick networking.
In this post we will explain how to set up an ad-hoc WLAN network, and in a next post we will explain how to set up a Bluetooth network (although Bluetooth’s bandwith is less than WLAN’s).
As a previous requisite, you need to enable root access in your device. Switch off it, plug in the USB cable, obtain the flasher utility, and execute on your computer (as root):
./flasher --enable-rd-mode
Then turn on your gadget, wait a moment, and when flasher is finished, unplug the cable. Your gadget will reboot as usual (maybe showing some messages telling you that your device is in R&D mode).
Maybe you could need to give execution permissions to the utility (as root)
chmod a+x flasher
Next you should install the SSH server package and the X terminal package.
Set up your laptop wireless card for ad-hoc networks, and choose a ESSID and channel for the connection
root@brick1:~ # iwconfig eth1 mode ad-hoc essid 'bricktobrick' channel 7
Next choose a IP for your laptop, for example
root@brick1:~ # ifconfig eth1 10.0.0.1 netmask 255.0.0.0
Execute now the connection manager in your gadget, choose the “bricktobrick” network, and configure the IP adress for your gadget (for example, 10.0.0.2; choose Ok when prompted, to save the settings and then edit them to change the IP). Reconnect when you have changed the settings, to take the new IP (otherwise, the manager will assign a default address as there is not a DHCP server in the laptop). Do not forget also to put the same netmask in the two bricks (255.0.0.0 in this case).
Now you can try to make a ping from your laptop to your gadget (or viceversa)
root@brick1:~ # ping 10.0.0.2
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=2.59 ms
64 bytes from 10.0.0.2: icmp_seq=2 ttl=64 time=2.56 ms
Ok, now the two bricks are connected. You can set up now the SSH server on the gadget, and pass files using scp from the computer to the gadget.
Open a terminal and gain root in your gadget
Nokia770$ sudo /usr/sbin/gainroot
Root shell enabled
Nokia770#
go to /var/lib/install/etc/init.d, and start the SSH server
Nokia770# cd /var/lib/install/etc/init.d
Nokia770# ./dropbear-server start
Starting Dropbear SSH server: dropbear.
Now you can acces from your computer to your gadget using SSH
root@brick1:~ # ssh root@10.0.0.2
The authenticity of host '10.0.0.2 (10.0.0.2)' can't be established.
RSA key fingerprint is 0d:75:2d:27:a7:0a:4f:e4:9d:3d:b1:87:9d:aa:1b:43.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '10.0.0.2' (RSA) to the list of known hosts.
root@10.0.0.2's password:
BusyBox v1.00 (Debian 2:20041102-11) Built-in shell (ash)
Enter 'help' for a list of built-in commands.
Nokia770-43:~#
If asked about the authenticity of the host, just answer yes. The password is rootme.
You can also copy a file from the computer to any place in the gadget, for example in the MMC card
user@brick1:~ $ scp document.txt root@10.0.0.2:/media/mmc1
root@10.0.0.2's password:
document.txt 100% 11KB 11.2KB/s 00:00
Or for example to the documents directory in the root filesystem
user@brick1:~ $ scp document.txt root@10.0.0.2:/home/user/MyDocs/.documents/
root@10.0.0.2's password:
document.txt 100% 11KB 11.2KB/s 00:00
You can now upload files from your laptop to your gadget, without carrying up USB cables in your bag
.
Even, setting up properly iptables in your laptop, you can use your laptop wireless card as an access point if you only have an Ethernet connection in your laptop. But that will be showed in a next post
.
7 comments November 17th, 2005



