2005-08-12 08:39:25

by Al

[permalink] [raw]
Subject: [Bluez-devel] Porting BlueZ on embedded uClinux

Hi, there:

I'm trying to port BlueZ on embedded linux. The followings are
what I've done so far:

=3D=3D=3D=3D=3D=3D=3D=3D For Kernel part =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

The embedded linux cannot load modules so I need to make BlueZ as part =
of kernel itself.

1. Change Makefile in linux/drivers/bluetooth
=
=
-------------------------------------
O_TARGET :=3D bluetooth.o
=
=
list-multi :=3D hci_uart.o
=
=
obj-y +=3D hci_usb.o
obj-y +=3D hci_vhci.o
=
=
obj-y +=3D hci_uart.o
uart-y :=3D hci_ldisc.o
uart-y +=3D hci_h4.o
=
=
obj-y +=3D dtl1_cs.o
obj-y +=3D bt3c_cs.o
obj-y +=3D bluecard_cs.o
=
=
include $(TOPDIR)/Rules.make
=
=
hci_uart.o: $(uart-y)
$(LD) -r -o $@ $(uart-y)
--------------------------------------
2. Add line below in Makefile in linux/drivers
subdir-y +=3D bluetooth

3. Change Makefile in /linux/net/bluetooth
--------------------------------------------
O_TARGET :=3D bluetooth.o
=
=20
obj-y :=3D af_bluetooth.o hci_core.o hci_sock.o lib.o syms.o =
hci_conn.o hci_event.o l2cap.o sco.o
=
=
=20
include $(TOPDIR)/Rules.make
------------------------------------------

4. Add lines Makefile in linux/net
subdir-y +=3D bluetooth
obj-y +=3D bluetooth/bluetooth.o

=3D=3D=3D=3D=3D=3D=3D=3D=3D For User Space (Utility) =
part=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Use embedded compilier to make "hciconfig" and copy it to embedded =
romdisk.

A CSR USB dongle is used. When I boot up the device and execute
hciconfig.

It prints errors when trying to create bluetooth socket:

"Can't open HCI socket.: Address family not supported by protocol"

if ((ctl =3D socket(AF_BLUETOOTH, SOCK_RAW, BTPROTO_HCI)) < 0)=20
{=09
perror("Can't open HCI socket.");
exit(1);
}

It seems like BlueZ is not integrated into kernel, but the object files =
in linux/drivers/bluetooth and linux/net/bluetooth are created without =
errors.

Does anyone have previous experience to port BlueZ on embeded linux and =
not using as modules?
Any advice/comment is appriciated.

Thanks for the helps.

Al









-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel


2005-08-12 09:01:55

by Peter Wippich

[permalink] [raw]
Subject: Re: [Bluez-devel] Porting BlueZ on embedded uClinux


Hi AL,

first question : what kernel version you are using ??

Second: why you change the Makefile ??? Simply do a make menuconfig or
what ever you prefer and configure that Bluetooth is compiled build in and
not as a module.

Make sure you have basic networking support enabled for your kernel.

I can't see that you compiled in the bluetooth USB driver. So this is
required when you use a USB adapter. But you don't need the *_cs drivers.

Why do you think an embedded system can't support modules ????

Ciao,

Peter


On Fri, 12 Aug 2005, Al wrote:

> Hi, there:
>
> I'm trying to port BlueZ on embedded linux. The followings are
> what I've done so far:
>
> ======== For Kernel part =============
>
> The embedded linux cannot load modules so I need to make BlueZ as part of kernel itself.
>
> 1. Change Makefile in linux/drivers/bluetooth
> -------------------------------------
> O_TARGET := bluetooth.o
> list-multi := hci_uart.o
> obj-y += hci_usb.o
> obj-y += hci_vhci.o
> obj-y += hci_uart.o
> uart-y := hci_ldisc.o
> uart-y += hci_h4.o
> obj-y += dtl1_cs.o
> obj-y += bt3c_cs.o
> obj-y += bluecard_cs.o
> include $(TOPDIR)/Rules.make
> hci_uart.o: $(uart-y)
> $(LD) -r -o $@ $(uart-y)
> --------------------------------------
> 2. Add line below in Makefile in linux/drivers
> subdir-y += bluetooth
>
> 3. Change Makefile in /linux/net/bluetooth
> --------------------------------------------
> O_TARGET := bluetooth.o
>
> obj-y := af_bluetooth.o hci_core.o hci_sock.o lib.o syms.o hci_conn.o hci_event.o l2cap.o sco.o
>
> include $(TOPDIR)/Rules.make
> ------------------------------------------
>
> 4. Add lines Makefile in linux/net
> subdir-y += bluetooth
> obj-y += bluetooth/bluetooth.o
>
> ========= For User Space (Utility) part===========
> Use embedded compilier to make "hciconfig" and copy it to embedded romdisk.
>
> A CSR USB dongle is used. When I boot up the device and execute
> hciconfig.
>
> It prints errors when trying to create bluetooth socket:
>
> "Can't open HCI socket.: Address family not supported by protocol"
>
> if ((ctl = socket(AF_BLUETOOTH, SOCK_RAW, BTPROTO_HCI)) < 0)
> {
> perror("Can't open HCI socket.");
> exit(1);
> }
>
> It seems like BlueZ is not integrated into kernel, but the object files in linux/drivers/bluetooth and linux/net/bluetooth are created without errors.
>
> Does anyone have previous experience to port BlueZ on embeded linux and not using as modules?
> Any advice/comment is appriciated.
>
> Thanks for the helps.
>
> Al
>
>
>
>
>
>
>
>
>
> -------------------------------------------------------
> SF.Net email is Sponsored by the Better Software Conference & EXPO
> September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
> Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
> Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
> _______________________________________________
> Bluez-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/bluez-devel
>

| Peter Wippich Voice: +49 30 46776411 |
| G&W Instruments GmbH fax: +49 30 46776419 |
| Gustav-Meyer-Allee 25, Geb. 12 Email: [email protected] |
| D-13355 Berlin / Germany |




-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel