2004-03-17 19:28:50

by Kutschenreuter Matthias

[permalink] [raw]
Subject: [Bluez-devel] pan on zaurus

Hi,

I installed "bluez-zaurus_2.3b_arm.ipk" on zaurus and
can perfetly pan between zaurus and non-arm laptops: pand -s, pand -c <MAC>.

Now I wrote a software, that does the same as in the
source file <pand.c> (connect / accept, bnep_create_connectio ...).
this software works perfectly among non-arm devices, but
the zaurus can only be a slave with it (the "pand -s" part).

if the zaurus tries to create the connection (would
be equivalent to pand -c MAC), it fails on l2cap before
bnep commands are involved.

sk=socket(AF_BLUETOOTH, SOCK_SEQPACKET, BTPROTO_L2CAP)
getsockopt(sk, ...)
...
connect(sk, (struct sockaddr *) &l2a, sizeof(l2a))
<---- this connect fails

gives back: "No route to host."

using hcidump, I see that no "CreateConnection" is sent.
I found out that sizeof(l2a) equals 12, although it should only
be 10. this is due to padding: on zaurus struct-sizes are padded
to a multiple of 4 bytes, i.e. 12 instead of 10. But I think
this cant be the problem, as it also will pad when executing "pand -c"
(which works).


Now I cannot understand, why my software fails on Zaurus,
using the same commands as the official PAN, that doesnt fail.
Which are the sources of bluez-zaurus_2.3b_arm.ipk?
(I only found those of bluez-zaurus_2.3_arm.ipk)
Are they different to the one for non-arm devices?
Is there a trick, when cross compiling bluez for zaurus ?

Kind regards, Matthias


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel


2004-03-18 00:40:13

by Philip Blundell

[permalink] [raw]
Subject: Re: [Bluez-devel] pan on zaurus

On Wed, 2004-03-17 at 19:28, Kutschenreuter Matthias wrote:
> Now I cannot understand, why my software fails on Zaurus,
> using the same commands as the official PAN, that doesnt fail.

I suggest you run both programs under strace and look for difference in
the syscalls that they make. There should be nothing special about the
ARM other than the structure-packing issue that you mentioned.

p.



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel