[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bluetooth-dev] rfcomm: pn_pkt definition
I'm trying to debug rf_conn on my slightly modified version of the stack. (based
on 01/08 stack usermode). everything goes fine till the first PN packet.
On the receiving end wrong byte is picked as checksum and on the initiator end,
program crashes after returning from send_pn_msg.
When debugging, noticed that send_pn_msg is causing the crash and the packet is
not allocated(sent) properly. here are my questions and I wonder if someone can
clarify it for me:
1. Why frame_size in pkt_msg structure is defined as: 'u32 framesize:16' and not
just 'u16 framesize'? This is going to take 4 bytes and affect the packet size
down the road. rigth?
(I checked the spec and frame size is only 16 bit.)
2. In send_pn_msg there is the following comment:
/* FIXME: Can't use structures here, sizeof doesn't work... */
rfcomm_frame_size = 14; //sizeof(pn_msg);
If I use sizeof(pn_msg) it's more than 14, so is the actual packet and things
don't line up on the receiving end. meaning fcs is offseted.
To unsubscribe from this list: send the line "unsubscribe bluetooth-dev" in
the body of a message to email@example.com