Adding Bluetooth to FreeNAS is causing the kernel to panic

Status
Not open for further replies.

preethamv

Cadet
Joined
Aug 29, 2012
Messages
5
I am attempting to add Bluetooth support to the FreeNAS kernel but this does not seem to work as expected.

Hardware:
Belkin Bluetooth Adapter (I have tested this against a FreeBSD system and have been able to load the bluetooth stack for it and use it just fine.)

Steps followed:
1. Modified FREENAS.amd64 to include the options for ng_ubt to be part of the kernel
2. Modified os-base to comment out the Without BLUETOOTH line
3. Built the code and installed on separate machine
4. Ran kldload ng_ubt - This returns with a can't load ng_ubt saying the File already exists which I take to mean that it is already loaded into the kernel
5. Plugged the Bluetooth dongle into the box

This results in a Fatal trap 12: page fault while in kernel mode.
It provides me with the following information:
cpuid = 0; apic id = 00
fault virtual address = 0x28
fault code = supervisor read data, page not present
instruction pointer = 0x20:0xffffffff807040b7
stack pointer = 0x28:0xffffff80000d9900
frame pointer = 0x28:0xffffff80000d9960
code segment = base 0x0, limit 0xfffff, type 0x1b
= DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags = interrupt enabled, resume, IOPL = 0
current process = 15 (usbus1)
[thread pid 15 tid 100038]
Stopped at ng_make_node_common+0x1c7 movq 0x28(%rdi),%rsi

The device has gotten registered as a bluetooth device because just before the fault a ubt device has gotten registered as seen below:
ubt0: <Broadcom Corp BLUETOOTHUSB +EDR ADAPTER Class 1 v2.1 UHE, class 224/1. rev 2.00/2.91, addr 5> on usbus1

I am not sure if I am making a mistake in compiling the kernel or if I am missing any dependencies that are required.
Any help would be appreciated! I was not sure if I should file this as a bug because this is a custom kernel and I don't know if it relates directly to FreeNAS development.

Thank you!

Edit: I have tried this against two versions, 8.2 stable and well as the trunk. The error included above is from the trunk because it seemed to provide more info and seems to have gdb enabled by default.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Just curious.. why would you want Bluetooth support? A BT keyboard perhaps?
 

preethamv

Cadet
Joined
Aug 29, 2012
Messages
5
While a BT keyboard would be nice, I am actually trying to build something that would work as a separate communication channel from the network. Something independent that would not rely on me being on the same network as the box.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Interesting. I'm not sure what value bluetooth would have since it's a very slow and very weak signal. But I'm definitely interested in seeing how far you get with this...
 

preethamv

Cadet
Joined
Aug 29, 2012
Messages
5
I have not had much luck so far. Since the dongle works on freebsd, I would imagine that I am doing something wrong with the build as my understanding of nanobsd is that it is the same kernel as the one used by freebsd. I have added the options from the NOTES file, but but have hit a brick wall after the panic because I have no knowledge of how the kernel works. I will keep trying it with newer builds and hope that someone can point me in the right direction!
 

Zwck

Patron
Joined
Oct 27, 2016
Messages
371
necroing this tread, is there a way to activate bluetooth on FreeNAS?
 
Last edited by a moderator:

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
No, Bluetooth drivers are not included.
 
Status
Not open for further replies.
Top