2006-02-13 21:19:40

by michael grosman

[permalink] [raw]
Subject: [Bluez-users] hciconfig doesn't come up

We would like to setup BT communication on embedded MIPS-processor Broadcom
card with Linux 2.4.20 (patched by patch no.18 of M.Holtman).
Kernel contained USB support, HID support and BlueTooth support (on all
layers).
On this card we're using USB-PCI host-controller of Philips (ISP1562ES1).
We are using Bluez-2.24 library and utils. We also use the library for
userspace-kernelspace USB translation (libusb-0.1.so.4.4.3).

We are using CSR based BT dongle with the following description:
>T: Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 5 Spd=12 MxCh= 0>
>D: Ver= 1.10 Cls=e0(unk. ) Sub=01 Prot=01 MxPS=64 #Cfgs= 1
>P: Vendor=0a12 ProdID=0001 Rev=11.20
(as we saw in the supported products list, it is supported.)

Following system start, we "insmoded" the following modules: usbcore,
usb-ohci, bluez, hci_usb, then creating devices /dev/vhci and /dev/rfcomm,
followed by loading also l2cap, rfcomm, input, uinput, evdev, hidp modules.
Then we start hcid, sdpd and hidd services.
So, we have:
># lsmod
>Module Size Used by
>hidp 10864 0 (unused)
>evdev 4112 0 (unused)
>uinput 3504 0 (unused)
>input 4944 0 [hidp evdev uinput]
>rfcomm 40080 0 (unused)
>l2cap 20752 2 [hidp rfcomm]
>hci_usb 11088 0
>bluez 41776 2 [hidp rfcomm l2cap hci_usb]
>usb-ohci 21696 0 (unused)
>usbcore 83824 1 [hci_usb usb-ohci]
># ps -aux
> PID Uid Stat Command
> 1 0 S init noinitrd
> 2 0 S [keventd]
> 3 0 S [ksoftirqd_CPU0]
> 4 0 S [kswapd]
> 5 0 S [bdflush]
> 6 0 S [kupdated]
> 7 0 S [mtdblockd]
> 15 0 S /usr/sbin/dnsmasq
> 24 0 S /usr/sbin/diag
> 25 0 S /bin/sh
> 35 0 S [khubd]
> 63 0 S [krfcommd]
> 77 0 S hcid: processing events
> 80 0 S sdpd
> 104 0 S hcid: processing events
> 108 0 S hcid: hci0 init
> 111 0 S /usr/sbin/hidd --server
> 124 0 R ps -aux

The problem is that hciconfig doesn't come up:
># hciconfig
>hci0: Type: USB
> BD Address: 00:00:00:00:00:00 ACL MTU: 0:0 SCO MTU: 0:0
> DOWN
> RX bytes:20 acl:0 sco:0 events:2 errors:0
> TX bytes:9 acl:0 sco:0 commands:3 errors:0

When we're trying to wake it up, it failed on timeout:
># hciconfig hci0 up
>Can't init device hci0: Connection timed out (145)
We received the same timeout reply for version, revision and commands
requests.
We received the following reply for features request (# hciconfig hci0
features)
hci0: Type: USB
BD Address: 00:00:00:00:00:00 ACL MTU: 192:8 SCO MTU: 64:8
Features: 0xff 0xff 0x0f 0x00 0x00 0x00 0x00 0x00
<3-slot packets> <5-slot packets> <encryption> <slot offset>
<timing accuracy> <role switch> <hold mode> <sniff mode>
<park state> <RSSI> <channel quality> <SCO link> <HV2
packets>
<HV3 packets> <u-law log> <A-law log> <CVSD> <paging scheme>
<power control> <transparent SCO>

When we're trying to do the same actions on PC with Linux 2.6.12 (using the
same USB-PCI card and BT dongle), the only difference that after "hciconfig
up" it returns the BD address and UP state. Following that all hcitool,
sdptool, l2ping etc. services worked ok and we could establish BT
communication.

One additional issue. We see in the product list that our dongle is in HCI
mode, so we don't have to use hid2hci utility, but for some strange reason
it doesn't work in any direction (on both Brodacom and PC).
We found that in the list, declared in the file hid2hci.c , this pair
"vendor-productID" is defined as HID... It's strange.

We see in sources that the socket to AF_BLUETOOTH with BT_PROTOHCI is opened
successfully and even some of ioctl's succeeded, but HCIDEVUP did not...
May someone hint us, what we did wrong.
Should we change something in the "default" hcid.conf (class device or
something else)?
Or should we make something additional configurations?
We don't find nothing extra in the manuals and HOWTOs...
How could we fix this HCI connection and move forward in establishing BT
communication on the described setup?

Thanks,
Michael


Attachments:
(No filename) (4.30 kB)
(No filename) (7.70 kB)
Download all attachments

2006-02-16 15:18:10

by Paulo Wollny

[permalink] [raw]
Subject: Re: [Bluez-users] SuSE 10.0 BlueZ and wvdial

Hi Marcel,

thx for answering.... could you let me know when is ready?

Kind regards,

Paulo

Marcel Holtmann wrote:
> Hi Paulo,
>
>
>> i did install SuSE 10.0, BlueZ and paired my gprs phone. Ok, it worked.
>> But when i try to use wvdial to connect to the internet using the GPRS
>> service, through rfcomm0 port, i get the following message:
>> --> WvDial: Internet dialer version 1.54.0
>> --> Cannot open /dev/rfcomm0: Cannot get information for serial port.
>> --> Cannot open /dev/rfcomm0: Input/output error
>> --> Cannot open /dev/rfcomm0: Cannot get information for serial port.
>> Does anyone knows what could be happening?
>>
>
> I've seen this before and this is specific to the wvdial package with
> SuSE. Actually to make them happy we need to implement some specific TTY
> ioctl() which I haven't really got around.
>
> Regards
>
> Marcel
>
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
> for problems? Stop! Download the new AJAX search engine that makes
> searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
> _______________________________________________
> Bluez-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/bluez-users
>
>
>



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2006-02-15 13:40:30

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] hciconfig doesn't come up

Hi Michael,

> > We would like to setup BT communication on embedded
> MIPS-processor
> > Broadcom card with Linux 2.4.20 (patched by patch no.18 of
> M.Holtman).
> > Kernel contained USB support, HID support and BlueTooth
> support (on
> > all layers).
> > On this card we're using USB-PCI host-controller of Philips
> > (ISP1562ES1).
> > We are using Bluez-2.24 library and utils. We also use the
> library for
> > userspace-kernelspace USB translation (libusb-0.1.so.4.4.3).
>
> the 2.4 kernel series are no longer supported and actually the
> USB part
> of these kernels might be buggy, too.
>
> This kernel "slightly" patched by Broadcom (for example, USB 2.0
> support downgraded from 2.4.26, etc.), so it is not "really" 2.4.20,
> but you're right, it's still might be buggy...

downgrade for what reason. This is stupid. Ask for their changes and
then extract the stuff that is needed to drive this board and then port
it to a 2.6 kernel. The Linux kernel is GPL and thus Broadcom can't keep
any secrets.

> > We are using CSR based BT dongle with the following
> description:
> > >T: Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 5
> Spd=12 MxCh= 0>
> > >D: Ver= 1.10 Cls=e0(unk. ) Sub=01 Prot=01 MxPS=64
> #Cfgs= 1
> > >P: Vendor=0a12 ProdID=0001 Rev= 11.20
> > (as we saw in the supported products list, it is supported.)
>
> It is fully supported. What build id is this? I know that the
> Rev equals
> the build id, but I always forget how to convert it.
>
> I gues that you are you refering to the build ID of the BT dongle
> firmware. Is there a way to "pull" it from the device?

Use "hciconfig hci0 version revision" if you have the device running.

Maybe using another dongle will solve this. There can be a bug in the
firmware or it is a cheap dongle. I still have dongles around that won't
work specific USB host controller chipsets and don't have any clue on
how to fix this.

> Make sure only one hcid is running at a time.
>
> We checked with single hcid and there is no difference in the
> behaviour.

I don't expected any difference actually, but having multiple hcid
running will get you into trouble later :)

> Why don't try to use a decent 2.6 kernel for embedded board?
> This will
> make all things a lot easier.
>
> Unfortunately, the embedded board supports only 2.4.20 kernel with all
> its problematic issues.

Sorry, but this is total nonsense. See my statement above. Start
contacting the MIPS maintainer and one of the USB guys. They will
happily help you fixing it. Of course you might have to donate one of
these boards, but that's worth it.

> Move to a 2.6 kernel, because I think this is a bug inside the
> USB
> subsystem. However if you don't need SCO support, you might
> wanna
> disable the ISOC transfers (SCO support) of the hci_usb
> driver.
>
> Hm... We indeed won't need any SCO support. HCO is not used although
> curently part of the kernel. How it might influence on our setup?

The ISOC transfers that are needed for SCO support consume USB bandwidth
and some USB host controllers might not be able to handle them right.
Especially if it is a 2.4 host driver.

Regards

Marcel




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2006-02-15 11:19:17

by michael grosman

[permalink] [raw]
Subject: Re: [Bluez-users] hciconfig doesn't come up

On 2/15/06, Marcel Holtmann <[email protected]> wrote:
>
> Hi Michael,


Hi Marcel,

> We would like to setup BT communication on embedded MIPS-processor
> > Broadcom card with Linux 2.4.20 (patched by patch no.18 of M.Holtman).
> > Kernel contained USB support, HID support and BlueTooth support (on
> > all layers).
> > On this card we're using USB-PCI host-controller of Philips
> > (ISP1562ES1).
> > We are using Bluez-2.24 library and utils. We also use the library for
> > userspace-kernelspace USB translation (libusb-0.1.so.4.4.3).
>
> the 2.4 kernel series are no longer supported and actually the USB part
> of these kernels might be buggy, too.


This kernel "slightly" patched by Broadcom (for example, USB 2.0 support
downgraded from 2.4.26, etc.), so it is not "really" 2.4.20, but you're
right, it's still might be buggy...

> We are using CSR based BT dongle with the following description:
> > >T: Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 5 Spd=12 MxCh= 0>
> > >D: Ver= 1.10 Cls=e0(unk. ) Sub=01 Prot=01 MxPS=64 #Cfgs= 1
> > >P: Vendor=0a12 ProdID=0001 Rev= 11.20
> > (as we saw in the supported products list, it is supported.)
>
> It is fully supported. What build id is this? I know that the Rev equals
> the build id, but I always forget how to convert it.


I gues that you are you refering to the build ID of the BT dongle firmware.
Is there a way to "pull" it from the device?


> ># ps -aux
> > > PID Uid Stat Command
> > > 1 0 S init noinitrd
> > > 2 0 S [keventd]
> > > 3 0 S [ksoftirqd_CPU0]
> > > 4 0 S [kswapd]
> > > 5 0 S [bdflush]
> > > 6 0 S [kupdated]
> > > 7 0 S [mtdblockd]
> > > 15 0 S /usr/sbin/dnsmasq
> > > 24 0 S /usr/sbin/diag
> > > 25 0 S /bin/sh
> > > 35 0 S [khubd]
> > > 63 0 S [krfcommd]
> > > 77 0 S hcid: processing events
> > > 80 0 S sdpd
> > > 104 0 S hcid: processing events
> > > 108 0 S hcid: hci0 init
> > > 111 0 S /usr/sbin/hidd --server
> > > 124 0 R ps -aux
>
> Make sure only one hcid is running at a time.


We checked with single hcid and there is no difference in the behaviour.

> The problem is that hciconfig doesn't come up:
> > ># hciconfig
> > >hci0: Type: USB
> > > BD Address: 00:00:00:00:00:00 ACL MTU: 0:0 SCO MTU: 0:0
> > > DOWN
> > > RX bytes:20 acl:0 sco:0 events:2 errors:0
> > > TX bytes:9 acl:0 sco:0 commands:3 errors:0
> >
> > When we're trying to wake it up, it failed on timeout:
> > ># hciconfig hci0 up
> > >Can't init device hci0: Connection timed out (145)
> > We received the same timeout reply for version, revision and commands
> > requests.
> > We received the following reply for features request (# hciconfig hci0
> > features)
> > hci0: Type: USB
> > BD Address: 00:00:00:00:00:00 ACL MTU: 192:8 SCO MTU: 64:8
> > Features: 0xff 0xff 0x0f 0x00 0x00 0x00 0x00 0x00
> > <3-slot packets> <5-slot packets> <encryption> <slot
> > offset>
> > <timing accuracy> <role switch> <hold mode> <sniff
> > mode>
> > <park state> <RSSI> <channel quality> <SCO link> <HV2
> > packets>
> > <HV3 packets> <u-law log> <A-law log> <CVSD> <paging
> > scheme>
> > <power control> <transparent SCO>
> >
> > When we're trying to do the same actions on PC with Linux 2.6.12
> > (using the same USB-PCI card and BT dongle), the only difference that
> > after "hciconfig up" it returns the BD address and UP state. Following
> > that all hcitool, sdptool, l2ping etc. services worked ok and we could
> > establish BT communication.
>
> Why don't try to use a decent 2.6 kernel for embedded board? This will
> make all things a lot easier.


Unfortunately, the embedded board supports only 2.4.20 kernel with all its
problematic issues.

> One additional issue. We see in the product list that our dongle is in
> > HCI mode, so we don't have to use hid2hci utility, but for some
> > strange reason it doesn't work in any direction (on both Brodacom and
> > PC).
> > We found that in the list, declared in the file hid2hci.c , this pair
> > "vendor-productID" is defined as HID... It's strange.
>
> You need to have a dongle that actually supports HID proxy. Otherwise
> this tool doesn't do anything.


We deduct from 2.6 that our dongle supports HCI. Tx,

> We see in sources that the socket to AF_BLUETOOTH with BT_PROTOHCI is
> > opened successfully and even some of ioctl's succeeded, but HCIDEVUP
> > did not...
> >
> > May someone hint us, what we did wrong.
> > Should we change something in the "default" hcid.conf (class device or
> > something else)?
> > Or should we make something additional configurations?
> > We don't find nothing extra in the manuals and HOWTOs...
> > How could we fix this HCI connection and move forward in establishing
> > BT communication on the described setup?
>
> Move to a 2.6 kernel, because I think this is a bug inside the USB
> subsystem. However if you don't need SCO support, you might wanna
> disable the ISOC transfers (SCO support) of the hci_usb driver.


Hm... We indeed won't need any SCO support. HCO is not used although
curently part of the kernel. How it might influence on our setup?


Regards
>
> Marcel


Thanks for your help, Michael.


-------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log
> files
> for problems? Stop! Download the new AJAX search engine that makes
> searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
> _______________________________________________
> Bluez-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/bluez-users
>


Attachments:
(No filename) (5.84 kB)
(No filename) (10.37 kB)
Download all attachments

2006-02-15 08:47:49

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] hciconfig doesn't come up

Hi Michael,

> We would like to setup BT communication on embedded MIPS-processor
> Broadcom card with Linux 2.4.20 (patched by patch no.18 of M.Holtman).
> Kernel contained USB support, HID support and BlueTooth support (on
> all layers).
> On this card we're using USB-PCI host-controller of Philips
> (ISP1562ES1).
> We are using Bluez-2.24 library and utils. We also use the library for
> userspace-kernelspace USB translation (libusb-0.1.so.4.4.3).

the 2.4 kernel series are no longer supported and actually the USB part
of these kernels might be buggy, too.

> We are using CSR based BT dongle with the following description:
> >T: Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 5 Spd=12 MxCh= 0>
> >D: Ver= 1.10 Cls=e0(unk. ) Sub=01 Prot=01 MxPS=64 #Cfgs= 1
> >P: Vendor=0a12 ProdID=0001 Rev= 11.20
> (as we saw in the supported products list, it is supported.)

It is fully supported. What build id is this? I know that the Rev equals
the build id, but I always forget how to convert it.

> ># ps -aux
> > PID Uid Stat Command
> > 1 0 S init noinitrd
> > 2 0 S [keventd]
> > 3 0 S [ksoftirqd_CPU0]
> > 4 0 S [kswapd]
> > 5 0 S [bdflush]
> > 6 0 S [kupdated]
> > 7 0 S [mtdblockd]
> > 15 0 S /usr/sbin/dnsmasq
> > 24 0 S /usr/sbin/diag
> > 25 0 S /bin/sh
> > 35 0 S [khubd]
> > 63 0 S [krfcommd]
> > 77 0 S hcid: processing events
> > 80 0 S sdpd
> > 104 0 S hcid: processing events
> > 108 0 S hcid: hci0 init
> > 111 0 S /usr/sbin/hidd --server
> > 124 0 R ps -aux

Make sure only one hcid is running at a time.

> The problem is that hciconfig doesn't come up:
> ># hciconfig
> >hci0: Type: USB
> > BD Address: 00:00:00:00:00:00 ACL MTU: 0:0 SCO MTU: 0:0
> > DOWN
> > RX bytes:20 acl:0 sco:0 events:2 errors:0
> > TX bytes:9 acl:0 sco:0 commands:3 errors:0
>
> When we're trying to wake it up, it failed on timeout:
> ># hciconfig hci0 up
> >Can't init device hci0: Connection timed out (145)
> We received the same timeout reply for version, revision and commands
> requests.
> We received the following reply for features request (# hciconfig hci0
> features)
> hci0: Type: USB
> BD Address: 00:00:00:00:00:00 ACL MTU: 192:8 SCO MTU: 64:8
> Features: 0xff 0xff 0x0f 0x00 0x00 0x00 0x00 0x00
> <3-slot packets> <5-slot packets> <encryption> <slot
> offset>
> <timing accuracy> <role switch> <hold mode> <sniff
> mode>
> <park state> <RSSI> <channel quality> <SCO link> <HV2
> packets>
> <HV3 packets> <u-law log> <A-law log> <CVSD> <paging
> scheme>
> <power control> <transparent SCO>
>
> When we're trying to do the same actions on PC with Linux 2.6.12
> (using the same USB-PCI card and BT dongle), the only difference that
> after "hciconfig up" it returns the BD address and UP state. Following
> that all hcitool, sdptool, l2ping etc. services worked ok and we could
> establish BT communication.

Why don't try to use a decent 2.6 kernel for embedded board? This will
make all things a lot easier.

> One additional issue. We see in the product list that our dongle is in
> HCI mode, so we don't have to use hid2hci utility, but for some
> strange reason it doesn't work in any direction (on both Brodacom and
> PC).
> We found that in the list, declared in the file hid2hci.c , this pair
> "vendor-productID" is defined as HID... It's strange.

You need to have a dongle that actually supports HID proxy. Otherwise
this tool doesn't do anything.

> We see in sources that the socket to AF_BLUETOOTH with BT_PROTOHCI is
> opened successfully and even some of ioctl's succeeded, but HCIDEVUP
> did not...
>
> May someone hint us, what we did wrong.
> Should we change something in the "default" hcid.conf (class device or
> something else)?
> Or should we make something additional configurations?
> We don't find nothing extra in the manuals and HOWTOs...
> How could we fix this HCI connection and move forward in establishing
> BT communication on the described setup?

Move to a 2.6 kernel, because I think this is a bug inside the USB
subsystem. However if you don't need SCO support, you might wanna
disable the ISOC transfers (SCO support) of the hci_usb driver.

Regards

Marcel




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2006-02-14 07:53:36

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] SuSE 10.0 BlueZ and wvdial

Hi Paulo,

> i did install SuSE 10.0, BlueZ and paired my gprs phone. Ok, it worked.
> But when i try to use wvdial to connect to the internet using the GPRS
> service, through rfcomm0 port, i get the following message:
> --> WvDial: Internet dialer version 1.54.0
> --> Cannot open /dev/rfcomm0: Cannot get information for serial port.
> --> Cannot open /dev/rfcomm0: Input/output error
> --> Cannot open /dev/rfcomm0: Cannot get information for serial port.
> Does anyone knows what could be happening?

I've seen this before and this is specific to the wvdial package with
SuSE. Actually to make them happy we need to implement some specific TTY
ioctl() which I haven't really got around.

Regards

Marcel




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2006-02-13 20:41:43

by Paulo Wollny

[permalink] [raw]
Subject: [Bluez-users] SuSE 10.0 BlueZ and wvdial

Hi all,

i did install SuSE 10.0, BlueZ and paired my gprs phone. Ok, it worked.
But when i try to use wvdial to connect to the internet using the GPRS
service, through rfcomm0 port, i get the following message:
--> WvDial: Internet dialer version 1.54.0
--> Cannot open /dev/rfcomm0: Cannot get information for serial port.
--> Cannot open /dev/rfcomm0: Input/output error
--> Cannot open /dev/rfcomm0: Cannot get information for serial port.
Does anyone knows what could be happening?

Best regards,

Paulo



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users