2003-08-29 15:06:26

by Alexandre Jousset

[permalink] [raw]
Subject: [Bluez-users] Belkin F8T002 PC Card problem with Bluez

Hi all,

I am trying for 3 days to configure this card on my laptop. I am
running Mandrake 9.2beta with a hand-compiled kernel 2.4.22.

First, to make my card recognized by the hardware, I have to enter
"cardctl insert". It does not do this automatically. Is this normal ?
But when I remove the card it beeps and knows that the card is no more
here. But this is not the most important problem... Here it is...

I succeeded to know what to do to have the card recognized by the
kernel (compile with CONFIG_SERIAL as a module) and now when I do the
"cardctl insert"command, I have the new /dev/ttyS4 device that appears.
OK. But then, when I try to hciattach it with "hciattach /dev/ttyS4 any
flow", the CPU is loaded and in the /var/log/messages logfile is
appended a lot of lines, all the same, saying "h4_recv: Unknown HCI
packet type ef", with the last "ef" changed with "0f", "18", etc... each
time a different hexadecimal number.

I patched the drivers/char/serial.c module source and the
include/linux/pci_ids.h to have the chip recognized by the serial module.

Output of lspci -vv is :
-------------------------------------------
[...]
02:00.0 Serial controller: Oxford Semiconductor Ltd OXCB950 Cardbus
16950 UART (prog-if 06 [16950])
Subsystem: Oxford Semiconductor Ltd: Unknown device 0001
Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop-
ParErr- Stepping- SERR- FastB2B-
Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium
>TAbort- <TAbort- <MAbort- >SERR- <PERR-
Interrupt: pin A routed to IRQ 11
Region 0: I/O ports at 4000 [size=8]
Region 1: Memory at 20800000 (32-bit, non-prefetchable) [size=4K]
Region 2: I/O ports at 4010 [size=16]
Region 3: Memory at 20801000 (32-bit, non-prefetchable) [size=4K]
Region 4: Memory at 20802000 (32-bit, non-prefetchable) [size=4K]
Capabilities: [40] Power Management version 1
Flags: PMEClk- DSI- D1- D2+ AuxCurrent=0mA
PME(D0+,D1-,D2+,D3hot+,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
-------------------------------------------

Output of setserial /dev/ttyS4 is :
-------------------------------------------
/dev/ttyS4, UART: 16950/954, Port: 0x4000, IRQ: 11
-------------------------------------------

This is my first try with bluetooth so if I made something wrong,
please tell me...

So, why is my log full of unknown HCI packets ? Thanks in advance.
--
\^/ Cordialement/Regards,
-/ O \----------------------------------------
| |/ \| Alexandre (Midnite) Jousset |
-|___|----------------------------------------



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users


2003-08-30 10:45:16

by Alexandre Jousset

[permalink] [raw]
Subject: Re: [Bluez-users] Belkin F8T002 PC Card problem with Bluez

Hi all,

I tried with setserial to set ttyS4 to irq 3 (it gave me this value
once when doing setserial autoconfig) -> hang.

I tried with setserial to set port to 0x4010 (as listed as second I/O
ports region with lspci), no error but hciconfig hci0 up fails with timeout.

With the original setup (irq 11 and ports at 0x4000, as the serial
module set them and the config that put the lines h4_recv: Unknown HCI
packet type xx), I wrote a small C program to read ttyS4 and print the
numbers on stdout. I noticed some reccurrent value so I told the program
to put a newline before each value 18. The output is :

-----------------------------------------------------------
18 20 e8 36 be f0
18 20 e8 36 be f8
18 20 e8 36 be f8
18 20 e8 36 ef 0f
18 24 e8 36 ef f0
18 24 e8 36 ef f0
18 20 e8 9b be f8
18 20 e8 36 ef 0f ff
18 20 e8 36 ef 0f ff
18 20 e8 9b be f8
18 24 e8 36 ef f0
18 20 e8 36 ef 0f
18 24 e8 36 ef d0
18 20 e8 36 ef d0
18 20 e8 9b be f8
18 20 e8 9b be f8
18 20 e8 9b be f8
18 20 e8 36 ef 0f
18 20 e8 36 ef 0f
18 20 e8 36 ef 0f
18 20 e8 9b be f8
18 20 e8 36 ef 0f ff
18 20 e8 9b be f8
18 20 e8 36 ef 41
18 20 e8 36 ef 0f
18 20 e8 36 ef 0f
-----------------------------------------------------------

So that must mean something but I don't know what. The first octet is
always 18, the second is either 20 or 24, the third always e8, the
fourth either 36 or 9b, the fifth either be or ef, the sixth either 0f
or d0 or f8 and when it is 0f it is sometimes followed by ff...

Any clue ?

Thanx !
--
\^/ Cordialement/Regards,
-/ O \----------------------------------------
| |/ \| Alexandre (Midnite) Jousset |
-|___|----------------------------------------




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2003-08-29 15:26:41

by Alexandre Jousset

[permalink] [raw]
Subject: Re: [Bluez-users] Belkin F8T002 PC Card problem with Bluez

Hi Marcel,

Marcel Holtmann wrote:
> try "hciattach /dev/ttyS4 bcsp".

I tried this and it says, after some seconds : "BCSP initialization
timed out".

> Send the patch (diff -urN) to the mailing list.

Sorry I forgot this. I found the patch on
"http://www.ussg.iu.edu/hypermail/linux/kernel/0203.0/0040.html".

and it is :

---------------------------------------
diff -ruN linux/drivers/char/serial.c linux-new/drivers/char/serial.c
--- linux/drivers/char/serial.c Fri Dec 21 18:41:54 2001
+++ linux-new/drivers/char/serial.c Fri Mar 1 09:43:42 2002
@@ -4658,6 +4658,9 @@
{ PCI_VENDOR_ID_OXSEMI, PCI_DEVICE_ID_OXSEMI_16PCI952,
PCI_ANY_ID, PCI_ANY_ID, 0, 0,
pbn_b0_2_115200 },
+ { PCI_VENDOR_ID_OXSEMI, PCI_DEVICE_ID_OXSEMI_OXCB950,
+ PCI_ANY_ID, PCI_ANY_ID, 0, 0,
+ pbn_b0_bt_1_115200 },

/* Digitan DS560-558, from [email protected] */
{ PCI_VENDOR_ID_ATT, PCI_DEVICE_ID_ATT_VENUS_MODEM,
diff -ruN linux/include/linux/pci_ids.h linux-new/include/linux/pci_ids.h
--- linux/include/linux/pci_ids.h Fri Dec 21 18:42:03 2001
+++ linux-new/include/linux/pci_ids.h Fri Mar 1 09:43:52 2002
@@ -1458,6 +1458,7 @@
#define PCI_DEVICE_ID_OXSEMI_12PCI840 0x8403
#define PCI_DEVICE_ID_OXSEMI_16PCI954 0x9501
#define PCI_DEVICE_ID_OXSEMI_16PCI952 0x950A
+#define PCI_DEVICE_ID_OXSEMI_OXCB950 0x950B
#define PCI_DEVICE_ID_OXSEMI_16PCI95N 0x9511
#define PCI_DEVICE_ID_OXSEMI_16PCI954PP 0x9513
---------------------------------------

I applied the patch by hand since I have kernel 2.4.22 and not 2.4.17
and after this I had the new ttyS4 device.
--
\^/ Cordialement/Regards,
-/ O \----------------------------------------
| |/ \| Alexandre (Midnite) Jousset |
-|___|----------------------------------------

2003-08-29 15:17:51

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] Belkin F8T002 PC Card problem with Bluez

Hi Alexandre,

> I am trying for 3 days to configure this card on my laptop. I am
> running Mandrake 9.2beta with a hand-compiled kernel 2.4.22.
>
> First, to make my card recognized by the hardware, I have to enter
> "cardctl insert". It does not do this automatically. Is this normal ?
> But when I remove the card it beeps and knows that the card is no more
> here. But this is not the most important problem... Here it is...
>
> I succeeded to know what to do to have the card recognized by the
> kernel (compile with CONFIG_SERIAL as a module) and now when I do the
> "cardctl insert"command, I have the new /dev/ttyS4 device that appears.
> OK. But then, when I try to hciattach it with "hciattach /dev/ttyS4 any
> flow", the CPU is loaded and in the /var/log/messages logfile is
> appended a lot of lines, all the same, saying "h4_recv: Unknown HCI
> packet type ef", with the last "ef" changed with "0f", "18", etc... each
> time a different hexadecimal number.

try "hciattach /dev/ttyS4 bcsp".

> I patched the drivers/char/serial.c module source and the
> include/linux/pci_ids.h to have the chip recognized by the serial module.

Send the patch (diff -urN) to the mailing list.

Regards

Marcel




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users

2003-09-01 14:16:41

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-users] Belkin F8T002 PC Card problem with Bluez

Hi Alexandre,

> I tried with setserial to set ttyS4 to irq 3 (it gave me this value
> once when doing setserial autoconfig) -> hang.
>
> I tried with setserial to set port to 0x4010 (as listed as second I/O
> ports region with lspci), no error but hciconfig hci0 up fails with timeout.
>
> With the original setup (irq 11 and ports at 0x4000, as the serial
> module set them and the config that put the lines h4_recv: Unknown HCI
> packet type xx), I wrote a small C program to read ttyS4 and print the
> numbers on stdout. I noticed some reccurrent value so I told the program
> to put a newline before each value 18. The output is :
>
> -----------------------------------------------------------
> 18 20 e8 36 be f0
> 18 20 e8 36 be f8
> 18 20 e8 36 be f8
> 18 20 e8 36 ef 0f
> 18 24 e8 36 ef f0
> 18 24 e8 36 ef f0
> 18 20 e8 9b be f8
> 18 20 e8 36 ef 0f ff
> 18 20 e8 36 ef 0f ff
> 18 20 e8 9b be f8
> 18 24 e8 36 ef f0
> 18 20 e8 36 ef 0f
> 18 24 e8 36 ef d0
> 18 20 e8 36 ef d0
> 18 20 e8 9b be f8
> 18 20 e8 9b be f8
> 18 20 e8 9b be f8
> 18 20 e8 36 ef 0f
> 18 20 e8 36 ef 0f
> 18 20 e8 36 ef 0f
> 18 20 e8 9b be f8
> 18 20 e8 36 ef 0f ff
> 18 20 e8 9b be f8
> 18 20 e8 36 ef 41
> 18 20 e8 36 ef 0f
> 18 20 e8 36 ef 0f
> -----------------------------------------------------------
>
> So that must mean something but I don't know what. The first octet is
> always 18, the second is either 20 or 24, the third always e8, the
> fourth either 36 or 9b, the fifth either be or ef, the sixth either 0f
> or d0 or f8 and when it is 0f it is sometimes followed by ff...

I think this is the BCSP protocol, but with wrong terminal settings or a
wrong baud rate. Try to attach your device with BCSP and different baud
rate settings and replug it every time to have a clean state.

Regards

Marcel




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users