[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [bluetooth-dev] porting to arm



Thanks for your reply.
hmm, nothing seems to help. I did the changes as done in the patch but
things only got worse! 
Now when the ARM receives events from the bt-device there is always one
byte missing, almost always Num_HCI_Command_Packets. For example the
command complete when doing reset returns 0x04 0x0e 0x04 0x03 0x0c 0x00 the
correct sequence is 0x04 0x0e 0x04 0x01 0x03 0x0c 0x00.  There is no
overrun error on the UART so I don't just miss that byte. When I run the
stack without __attribute__ and hci_put_opcode() I at least have an error
free connection to the bt-device.
I tried to change the SET_L2CAP_HDR macro also but that made no difference.
I use a board with P9A and an ARM7 with eCos and arm-elf-gcc as cross
compiler.
Is there anything else I can do instead of the __attribute__ things?
My problem is that the l2cap_connect_rsp is scrambled, see below.
Anyone got any hints?
/Andreas

> -----Original Message-----
> From: park@xxxxxxx.com">mailto:park@xxxxxxx.com]
> Sent: den 23 november 2000 13:58
> To: Karlsson Andreas
> Cc: bluetooth-dev@xxxxxxx.com
> Subject: Re: [bluetooth-dev] porting to arm
> 
> 
> Check the definition of SET_L2CAP_HDR in l2cap.c
> The definition of SET_L2CAP_HDR should be as follows:
> 
> #define SET_L2CAP_HDR(frame, len, cid) {\
>         (*(u8 *)(frame)) = (u8)(((len) & 0xff)); \
>         (*(u8 *)(frame + 1)) = (u8)(((len) & 0xff00) >> 8); \
>         (*(u8 *)(frame + 2)) = (u8)(((cid) & 0xff)); \
>         (*(u8 *)(frame + 3)) = (u8)(((cid) & 0xff00) >> 8); \
> }
> 
> -- Park
> 
> 
> ----- Original Message -----
> From: <Andreas.Karlsson@xxxxxxx.com>
> To: <gmcnutt@xxxxxxx.fr>
> Cc: <bluetooth-dev@xxxxxxx.com>
> Sent: Thursday, November 23, 2000 4:48 PM
> Subject: RE: [bluetooth-dev] porting to arm
> 
> 
> > Hello,
> >
> > I think I have the same problem when sending 
> l2cap_connect_rsp and req,
> for
> > example at the server side:
> >
> > Current state of (64:65) is W4_L2CA_CONNECT_RSP
> >
> >     L2CAP l2ca_connect_ind : remote cid : 65 psm 0x3
> >
> >           RFCOMM get_new_rfcomm_con: rfcomm_con -> tty0
> >
> >     L2CAP l2ca_connect_rsp
> >
> >     L2CAP l2cap_connect_rsp : rcid:65 lcid:64 result:0 status:0
> >
> > set_acl_hdr (data=0x3391f "", len=16, pb=2 '\002', bc=0 
> '\000', hci_hdl=1)
> >
> > send_acl_packet: (21)
> >
> >    0x02 0x01 0x20 0x10 0x00 0x00 0x03 0x01 0x08 0x00 0x40 
> 0x00 0x41 0x00
> > 0x00 0x00
> >
> >    0x00 0x00 0x00 0x00 0x00
> >
> >
> >
> > This l2cap_connect_rsp is messed up after the hci header. 
> How have you
> guys
> > that have seen this problem solved it?
> >
> > I'm using arm-elf-gcc as a cross compiler.
> >
> > /Andreas
> >
> >
> >
> > > > Hello, I have difficulties to port the rfcomm part of the
> >
> > > sources to arm.
> >
> > > >
> >
> > > > In fact, I think we are in trouble as soon as we use
> >
> > > bitfields (which are
> >
> > > > often used in RFCOMM) e.g in a structure :
> >
> > >
> >
> > > Damn straight.
> >
> > > The good new is, the problem is solved.
> >
> > > The bad new is, I can't mail the patch. I try, but it 
> never shows up.
> >
> > > I'll try again.
> >
> > > I won't send the patch with this mail, I'll send another one
> >
> > > after this.
> >
> > > Otherwise you might not get this message.
> >
> > >
> >
> > > --Gordon
> >
> > >
> >
> > > -
> >
> > > To unsubscribe from this list: send the line "unsubscribe
> >
> > > bluetooth-dev" in
> >
> > > the body of a message to majordomo@xxxxxxx.com
> >
> > >
> > -
> > To unsubscribe from this list: send the line "unsubscribe 
> bluetooth-dev"
> in
> > the body of a message to majordomo@xxxxxxx.com
> >
> 
> -
> To unsubscribe from this list: send the line "unsubscribe 
> bluetooth-dev" in
> the body of a message to majordomo@xxxxxxx.com
> 
-
To unsubscribe from this list: send the line "unsubscribe bluetooth-dev" in
the body of a message to majordomo@xxxxxxx.com