mikehughesc
Posts: 5
Joined: Sat Jun 30, 2012 4:40 pm

Connect Pi to Playbook over USB

Sat Jun 30, 2012 5:09 pm

I'm trying to connect my Pi to my Blackberry Playbook using USB for (a) file transfer, and (b) SSH/VNC.

Using Debian squeeze, have done rpi-update.

I've already connected the Playbook successfully over Wifi - that was easy. But it would be good to be able to connect using USB (a) for speed, and (b) when I'm away from my home wifi.

The Playbook (OS2) connects as a USB network, rather than as a mass storage device - so it should be possible to do all the above. I've followed various posts on Linux forums which give instructions for "normal" Linux boxes, but I can't get it to work on the Pi.

ifconfig usb0 shows:

usb0 Link encap:Ethernet HWaddr 16:74:11:c9:a7:16
inet6 addr: fe80::1474:11ff:fec9:a716/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:59 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:8624 (8.4 KiB) TX bytes:1163 (1.1 KiB)

Note that there is no IPv4 address.

I installed dhcpcd (only because the instructions on one of the Linux forums used it - and it was quicker to install it than to find our whether there's an equivalent in RPi Debian)! Running dhcpcd usb0 gives:

err, usb0: cannot request a link local address

The Playbook reports that it has an IP address on the USB port (169.254.xxx.xxx - varies each time you connect), but trying to mount using

mount -t cifs -0 username=xxx,password=xxx //169.254.xxx.xxx/media /mnt/playbook

gives

mount error(115): Operation now in progress

I can't find any useful information on either of these error messages, so I figured it was time to turn to the experts.

I've been programming for Windows for 20-odd years but I'm new to Linux, so please go easy on the deep techy stuff!

Thanks in advance for any help.

mikehughesc
Posts: 5
Joined: Sat Jun 30, 2012 4:40 pm

Re: Connect Pi to Playbook over USB

Mon Jul 02, 2012 11:44 am

PS I connected the Playbook to a Debioan Squeeze 6.0.5 desktop, and immediately the ifconfig usbo0 shows an IPv4 address, and I can mount the share, use SSH etc without any problem. This has to be something specific to the Raspberry Pi (or its version of Debian).

Why would it not give me an IPv4 address? Anyone?

mikehughesc
Posts: 5
Joined: Sat Jun 30, 2012 4:40 pm

Re: Connect Pi to Playbook over USB

Mon Jul 02, 2012 9:52 pm

OK, in case anyone else has this problem I fixed it by installing network-manager-gnome. That's all - just installing it seems to have made the Pi recognise when the Playbook is connected and give it an IP address. My Linux knowledge is nowhere near up to understanding why this worked, but it did!

GrayGirling
Posts: 4
Joined: Thu Dec 08, 2011 2:24 pm

Re: Connect Pi to Playbook over USB

Mon Jul 30, 2012 8:50 am

> mount error(115): Operation now in progress

I have caught the same problem - although in a completely different context to a Playbook, so I thought I'd better report my (lack of) progress on this issue here.

> I've been programming for Windows for 20-odd years but I'm new to
> Linux,
> so please go easy on the deep techy stuff!

Actually I believe this is an issue we need a Windows techy person for!

Here is one blind alley (but a good one to know about). What do you get if you type 'ping gropspoggler' or something equally unlikely? I get:

64 bytes from advancedsearch.virginmedia.com (81.200.64.50): icmp_req=1 ttl=57 time=24.8 ms

which, I take it is my ISP wanting to make some advertising revenue from my mistyped URLs. You may well get the same result for 'ping raspberrypi'. This is a problem for all our samba implementations because they all include this line in the default configuration file provided by Debian in /etc/samba/smb.conf

; name resolve order = lmhosts host wins bcast

It's just a comment - but I believe it matches the default in the software. It means that samba (our SMB implementation that deals with the microsoft network stack) will use the normal 'host' internet lookup of names (/etc/hosts, DNS etc) before broadcasting to neighboring computers to see if they recognize the name themselves. A normal home network usually relies on this broadcast mechanism, but, in my case it will never be used thanks to Virgin.

To fix the problem we need to have 'bcast' before 'host' on an uncommented version of this line. e.g.

name resolve order = lmhosts bcast wins host

(Then restart samba using 'sudo service samba restart' or just reboot to be safe.)

I have done this and, whereas it means that I can now use machine names in my network in the file manager (e.g. smb://playbook/) after installing the gvfs-backends package, I still get the same error on mounting. I will make a separate post about that.

GrayGirling
Posts: 4
Joined: Thu Dec 08, 2011 2:24 pm

Re: Connect Pi to Playbook over USB

Mon Jul 30, 2012 9:31 am

mount -t cifs -0 username=xxx,password=xxx //169.254.xxx.xxx/media /mnt/playbook

gives

mount error(115): Operation now in progress
I'm afraid your problem here was simply your IP address. 169.254.xxx.xxx addresses are used to signify that your attempt to obtain an IP address has failed. You probably fixed the problem with the additional installation you made.

Nonetheless, I get exactly the same error report when I use a name, instead of an IP address. In my case using an IP address (such as a more valid192.168.xxx.xxx) always works fine, but using a name (//saturn/install) does not. (Despite the fix described in my previous post.)

I have not been able to track down the exact cause for this but googling about it looks as if it is something to do with

[1] which machine is the SMB master for the domain you are in (you can discover what this is using e.g.

smbclient -U pi -L raspberrypi

[2] whether that machine's lookup of the name you are interested in ('saturn' in my case) is the same as your own machine's (raspberrypi) lookup (of 'saturn').

[3] it is said to happen when a DNS lookup ('host saturn') and a NMB lookup ('nmblookup staturn' [from package samba-common-bin in wheezy]) of the same name differ. An area I'm already suspicious about (since they do).

I am also concerned that my raspberry pi seems to have an empty MAC address when looked up over NMB (SMB's name lookup service) from other machines in my home network:

Code: Select all

% nmblookup -A 192.168.104.95
Looking up status of 192.168.104.95
        RASPBERRYPI     <00> -         B <ACTIVE>
        RASPBERRYPI     <03> -         B <ACTIVE>
        RASPBERRYPI     <20> -         B <ACTIVE>
        GIRLING         <1e> - <GROUP> B <ACTIVE>
        GIRLING         <00> - <GROUP> B <ACTIVE>

        MAC Address = 00-00-00-00-00-00
although this may have nothing to do with it!

Any help would be greatly appreciated.

Return to “Beginners”