OESF | ELSI | pdaXrom | OpenZaurus | Zaurus Themes | Community Links | Ibiblio

IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Bluetooth PPP: Invalid argument(22)
knuth
post Mar 15 2004, 01:04 AM
Post #1





Group: Members
Posts: 8
Joined: 10-March 04
Member No.: 2,242



I connect to a PC using the pand daemon using the service GN as suggested elsewhere in the forum. The PC states that the zaurus is now using the connection, but immediately afterwards the connection is closed.
the pand command is as follows:
pand --role PANU --service GN --connect 00:0D:88:BE:A6:FF --nodetach

It returns: Connect to ... failed: Invalid argument (22)

If I use --service NAP it returns invalid permission (13) error. I have a widcomm stack on the PC (windows 2000).

Any hints? Any logfiles to look at?
Go to the top of the page
 
+Quote Post
pakman
post Mar 15 2004, 09:27 AM
Post #2





Group: Members
Posts: 41
Joined: 8-March 04
From: UK
Member No.: 2,204



knuth - this sounds pretty similar to my configuration, and it works for me. However, check that you are using the latest version of the widcomm drivers. I am using 1.4.2.8 on Win2k (SP2), with a TDK systems USB bluetooth dongle . Before I upgraded I was using version 1.3.2 of the driver, and it didn't work for me either.

There may also be dependencies on the chipsets of of the BT cards that you are using. Perhaps if you post more details about your BT hardware, one of the knowledgeable readers on this forum may be able to make other suggestions.

P.
Go to the top of the page
 
+Quote Post
knuth
post Mar 16 2004, 12:09 AM
Post #3





Group: Members
Posts: 8
Joined: 10-March 04
Member No.: 2,242



I reinstalled all the software on the PC (widcomm 1.4.1 build 6) and the bluez (2.3-2.4d und csr_serial01) and rebooted anything and now nothing works?
I have a dlink 650BT CF card and a dlink 120BT USB dongle.
I can see the zaurus on my pc and can pair the two. But when I try to discover services on the zaurus, there are none.
Now calling pand, gives a "failed to open control socket "

hcid is running.

Do I have to install additional bluez packages (I found a bluez-sdp, etc.)?
Go to the top of the page
 
+Quote Post
tumnus
post Mar 16 2004, 12:35 AM
Post #4





Group: Members
Posts: 1,176
Joined: 3-October 03
From: UK
Member No.: 547



You should only install the bluez and bluez-csr-serial packages as stated here:
http://www.zaurususergroup.com/modules.php...ename=Bluetooth
You may well need the bluez-susp-resume package as explained in that howto also.

For a note about your CF card, please see this page:
http://www.zaurususergroup.com/modules.php...oothCardSupport
Go to the top of the page
 
+Quote Post
pakman
post Mar 16 2004, 10:28 AM
Post #5





Group: Members
Posts: 41
Joined: 8-March 04
From: UK
Member No.: 2,204



knuth - I have had another look through my scripts, and I realised that I forgot about something. pand needs the bnep module to be loaded, and this does not always happen automatically for some reason - do 'lsmod' from the console to check whether it is or not. If it does not appear on the list, do:

CODE
modprobe bnep


as root to load it, and then try pand again. You can also control which bnep interface is used with the -i argument to pand. For reference, here are the scripts that I use to connect to my PC:

CODE
#!/bin/bash



/home/QtPalmtop/bin/bton



# Set this to the Bluetooth address to connect to

baddr=XX:XX:XX:XX:XX:XX

# Set this to the IP number of the zaurus, or the name you have attached

# to the number in /etc/hosts, if applicable.

thishost=111.222.333.444

if=bnep0



# Check that we are not already connected

lsmod | grep -q ^bnep && pand -l | grep -q "$if  *$baddr" && exit



/usr/bin/sudo modprobe bnep

sleep 2



# -d form of --service does not always work

# Is it valid to specify bnep0 here?

# pand always seems to return 0, even if it fails

/usr/bin/sudo pand -i $if -r PANU --service GN -c $baddr -n

pand -l | grep -q "$if  *$baddr" &&

  /usr/bin/sudo ifconfig $if $thishost


where /home/QtPalmtop/bin/bton just ensures that Bluetooth is on:

CODE
#!/bin/bash

if [ ! -e /var/lock/subsys/bluetooth ]; then

  cardctl ident |

     grep -q 'product info: "Socket", "CF+ Personal Network Card Rev 2.5"'

        || exit

  cardctl status | grep -q suspended && cardctl resume

  /usr/bin/sudo /etc/rc.d/init.d/bluetooth start 2>&1 >/var/log/bt.txt

fi


Edit this for your own card's cardctl info.

The corresponding scripts to disconnect and turn bluetooth off are:

CODE
#!/bin/bash

/usr/bin/sudo pand -k XX:XX:XX:XX:XX:XX


and

CODE
#!/bin/bash

if [ -e /var/lock/subsys/bluetooth ]; then

  /usr/bin/sudo pand -K

  /usr/bin/sudo killall pand

  /usr/bin/sudo modprobe -r bnep

  /usr/bin/sudo /etc/rc.d/init.d/bluetooth stop 2>&1 >/var/log/bt.txt

fi


I also use the bluez suspend/resume scripts that are referred to in tumnus' howto.

I think that covers everything that I did to get this working.

Good luck,
P.
Go to the top of the page
 
+Quote Post
knuth
post Mar 17 2004, 02:48 AM
Post #6





Group: Members
Posts: 8
Joined: 10-March 04
Member No.: 2,242



hello pakman,
the modprobe did it. my bluetooth network is now working. thanks a lot!

biggrin.gif
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 27th November 2014 - 01:56 PM