I wanted to play with neasuring mobile network latency, and the Nokia N900 being a phone based on Debian is a great tool for this. As getting this to work as (a) not as simple as “plug it in” as is often the case on a Linux box and (b) a seemingly strange thing to want to do, I thought I’d write it up here.
First up: I needed to SSH from a Mac OSX Lion. It seems that older version of OSX allowed USB interfaces a lot more easily. In System Preferences, Netowrk I cannot create a USB interface (there isn’t an option) and I don’t want to install yet more new utilities as I have enough already thank you very much.
Second up: I am SSHing into a Nokia N900 as I happen to have one. There are a lot of articles about sshing into an iPhone and other devices, but the OS capabilities of the N900 is what I want to use.
Third up: I am sshing over teh USB cable: not over wifi. I will be playing with the interfaces - 3G and wireless - and I want my full keyboard. SSHing in over wifi is straight-forward and if you’re reading this page I’m going to assume you’ve already done that ;-) If not, check out scratching.psybermonkey.net’s how-to - please read the part about changing the default user password as you will that later.
the bad news
OSX: I couldn’t get the Mac to give me a USB interface over which to SSH. I probably wasted 2 hours trying to get OSX Lion to give me a USB networking interface and I couldn’t manage it.
Virtual Box: I couldn’t get the N900 to connect at all to a CentOS 5.6 instance in Virtual Box (yes, I know it’s an old CentOS, but it wasn’t a CentOS issue) due to this error:
Failed to attach the USB device Nokia N900 (PC-Suite Mode) [0211] to the virtual machine CentOS56.
USB device ‘Nokia N900 (PC-Suite Mode)’ with UUID {856379de-9fd3-4682-a9d8-7ec4665cd26b} is in use by someone else.
| Result Code: |
NS_ERROR_FAILURE (0x80004005) |
| Component: |
HostUSBDevice |
| Interface: |
IHostUSBDevice {173b4b44-d268-4334-a00d-b6521c9a740a} |
| Callee: |
IConsole {1968b7d3-e3bf-4ceb-99e0-cb7c913317bb} |
However, for other reasons, I also have VMware Fusion and that was able to connect.
the good news
- Fire-up the N900
- Fire-up (any) unix - in my case a CentOS 5.7 within VMWare Fusion (Ubunto 12.04LTS works exactly the same too)
- Read http://wiki.maemo.org/N900_USB_networking
- Connect the N900 to the Mac USB port (it doesn’t seem to matter which) and connect as “PC Suite Mode”
- VMWare Fusion | Virtual Machine | USB | Connect Nokia N900 (PC Suite mode)
- Over on the guest CentOS you’ll see something like the following -which doesn’t matter as I am not trying to use the N900 as a modem for the laptop :-):
drivers/usb/class/cdc-acm.c: This device cannot do calls on its own. It is no modem.
- On the N900, you need to do the following:
sudo gainroot
ifup usb0
- On the guest unix server, become root
- ifconfig usb0 192.168.2.14
- ssh user@192.168.2.15
And if you’ve followed the instructions and first changed the default user password on the N900 as shown in the scratching.psybermonkey.net article, you’re in :-)