2013-06-17 06:27:31

by Adrian Chadd

[permalink] [raw]
Subject: ath3k hackery; doing it in userland

Hi,

As part of general freebsd wireless hackery I've found a need to port
ath3k to freebsd.

Whilst doing it, I asked - why isn't this in userland? All it's doing
is pushing firmware in. It doesn't have to be in the kernel!

So, without further ado:

https://github.com/erikarn/ath3k

I'm using the libusb 1.0 API so it should be portable between OSes.

There's some interesting issues that have crept up - specifically, the
AR3012 resets after loading in the syscfg and thus doesn't take the
"set normal mode" and "change VID".

So, why's this in the kernel?



Adrian


2013-06-17 06:35:48

by Julian Calaby

[permalink] [raw]
Subject: Re: ath3k hackery; doing it in userland

Hi Adrian,

On 17 June 2013 16:27, Adrian Chadd <[email protected]> wrote:
> Hi,
>
> As part of general freebsd wireless hackery I've found a need to port
> ath3k to freebsd.
>
> Whilst doing it, I asked - why isn't this in userland? All it's doing
> is pushing firmware in. It doesn't have to be in the kernel!
>
> So, without further ado:
>
> https://github.com/erikarn/ath3k
>
> I'm using the libusb 1.0 API so it should be portable between OSes.
>
> There's some interesting issues that have crept up - specifically, the
> AR3012 resets after loading in the syscfg and thus doesn't take the
> "set normal mode" and "change VID".
>
> So, why's this in the kernel?

A further question: why isn't this in usb-modeswitch or some similar
"make my dumb USB device work" system?

Thanks,

--
Julian Calaby

Email: [email protected]
Profile: http://www.google.com/profiles/julian.calaby/
.Plan: http://sites.google.com/site/juliancalaby/

2013-06-17 19:05:29

by Adrian Chadd

[permalink] [raw]
Subject: Re: ath3k hackery; doing it in userland

On 16 June 2013 23:35, Julian Calaby <[email protected]> wrote:

> A further question: why isn't this in usb-modeswitch or some similar
> "make my dumb USB device work" system?

Well, there's a couple of hoops needed to jump through in order to
make this thing work. It's not a "set this value to make it work",
it's "upload this firmware blob to make this thing work."

I don't have any clue what the right order is to poke these BT devices
(and even when i was working at QCA, finding documentation on the
bluetooth devices was difficult!) and how they should behave. This
whole "it detaches right after I load the sysconfig file" thing is
quite annoying.



adrian

2013-06-17 23:24:42

by Julian Calaby

[permalink] [raw]
Subject: Re: ath3k hackery; doing it in userland

Hi Adrian,

On 18 June 2013 05:05, Adrian Chadd <[email protected]> wrote:
> On 16 June 2013 23:35, Julian Calaby <[email protected]> wrote:
>
>> A further question: why isn't this in usb-modeswitch or some similar
>> "make my dumb USB device work" system?
>
> Well, there's a couple of hoops needed to jump through in order to
> make this thing work. It's not a "set this value to make it work",
> it's "upload this firmware blob to make this thing work."

Hence "some similar ...." - it's a dumb USB device - i.e. it boots up
as a device that's just smart enough to accept a firmware blob then,
as I recall from reading about their .... peculiarities, detaches and
reattaches with a different VID / PID when that firmware is loaded.

> I don't have any clue what the right order is to poke these BT devices
> (and even when i was working at QCA, finding documentation on the
> bluetooth devices was difficult!) and how they should behave. This
> whole "it detaches right after I load the sysconfig file" thing is
> quite annoying.

I believe the detaching is expected =(

Thanks,

--
Julian Calaby

Email: [email protected]
Profile: http://www.google.com/profiles/julian.calaby/
.Plan: http://sites.google.com/site/juliancalaby/