[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bluetooth-dev] Axis stack portability (2)
Bernard Perrin wrote:
> Hi Matthias,
> > It is an endian problem. Beside other things, the stack source uses bit
> > fields in many situations which are interpreted differently on x86 (LE)
> > and PPC (BE).
> > There is patch for an older stack version available that fixes the
> > endian problems (ARM patch) mostly. I think that it is only a question
> > of a few days until this patch is applied to the cvs.
> > Please read some older articles about this problem (e.g. in the archiv).
> Thanks for the suggestions.
> I used the patch and now the situation is a bit better: only the first 2
> are swapped. This is the case in the 4 following situation:
> 1. Start
> 0c 03 00 (correct is 03 0c 00)
> 2. inqscan
> 0c 1a 01 03 (correct is 1a 0c 01 03)
> 3. readbd
> 10 09 00 (correct is 09 10 00)
> 4. con 11:22:33:44:55:66 0
> 04 05 0d 66 55 44 33 22 11 18 cc 00 00 00 00 00
> (correct is 05 04 0d 66 55 44 33 22 11 18 cc 00 00 00 00 00)
> Any idea on how to cleanly correct this last problem is welcome.
I think (without looking too closely) that the problem is the OCF/OGF fields
of the HCI command. The patch version you used might not have the fixes for
hci.c in it (there was one out there that missed this file). Probably the
quickest way to fix this problem in your version is to switch the ocf and ogf
fields of the hci command struct. A recent email from Peter shows an example
of how to do this if you need one.
To unsubscribe from this list: send the line "unsubscribe bluetooth-dev" in
the body of a message to firstname.lastname@example.org