* [Bluez-users] Once again: Socket CF card and Kernel 2.6 @ 2005-02-26 3:19 Mathias Adam 2005-02-28 8:13 ` Marcel Holtmann 0 siblings, 1 reply; 14+ messages in thread From: Mathias Adam @ 2005-02-26 3:19 UTC (permalink / raw) To: bluez-users Hello, I'm trying to install a Socket Bluetooth Compactflash Card (Revision H) in my Thinkpad X21. I tested it with the 2.4.29 kernel (from Debian unstable) and it works, but I would like to use 2.6 and there it doesn't work. With 2.6, the serial_cs module gets loaded as I insert the card and dmesg shows the following: ----- ttyS1: detected caps 00000700 should be 00000100 ttyS1 at I/O 0x2f8 (irq = 11) is a 16C950/954 ----- Then I run modprobe hci_uart and this is what dmesg says: ----- Bluetooth: HCI UART driver ver 2.1 Bluetooth: HCI BCSP protocol initialized ----- (I didn't include CONFIG_BT_HCIUART_H4 in my kernel this time) No problem so far, but then: hciattach ttyS1 socket and it says "BCSP initialization timed out" and hcitool dev doesn't show any devices. I already searched this list's archives and found that some cards (the Socket and some Xircom?) seem to have those problems with 2.6 while some others (Zoom?) don't. Does anybody know yet how to solve this problem? If there is no other solution: as my card works well with kernel 2.4, I wonder if it is possible to use the old hci_uart module from 2.4 in 2.6? Thanks for advice Mathias -- Perfection is achieved not when you have nothing more to add, but when you have nothing left to take away. - Antoine de Saint-Exupery ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Bluez-users mailing list Bluez-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bluez-users ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Bluez-users] Once again: Socket CF card and Kernel 2.6 2005-02-26 3:19 [Bluez-users] Once again: Socket CF card and Kernel 2.6 Mathias Adam @ 2005-02-28 8:13 ` Marcel Holtmann 2005-02-28 22:02 ` a2 0 siblings, 1 reply; 14+ messages in thread From: Marcel Holtmann @ 2005-02-28 8:13 UTC (permalink / raw) To: BlueZ Mailing List Hi Mathias, > I'm trying to install a Socket Bluetooth Compactflash Card (Revision H) > in my Thinkpad X21. I tested it with the 2.4.29 kernel (from Debian > unstable) and it works, but I would like to use 2.6 and there it doesn't > work. > > With 2.6, the serial_cs module gets loaded as I insert the card and > dmesg shows the following: > > ----- > ttyS1: detected caps 00000700 should be 00000100 > ttyS1 at I/O 0x2f8 (irq = 11) is a 16C950/954 > ----- > > Then I run modprobe hci_uart and this is what dmesg says: > > ----- > Bluetooth: HCI UART driver ver 2.1 > Bluetooth: HCI BCSP protocol initialized > ----- > (I didn't include CONFIG_BT_HCIUART_H4 in my kernel this time) > > No problem so far, but then: hciattach ttyS1 socket > and it says "BCSP initialization timed out" and hcitool dev doesn't show > any devices. what kind of 2.6 kernel is this? Give 2.6.11-rc5 a chance. Do you see anything special with dmesg? Regards Marcel ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Bluez-users mailing list Bluez-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bluez-users ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Bluez-users] Once again: Socket CF card and Kernel 2.6 2005-02-28 8:13 ` Marcel Holtmann @ 2005-02-28 22:02 ` a2 2005-03-01 8:29 ` Marcel Holtmann 0 siblings, 1 reply; 14+ messages in thread From: a2 @ 2005-02-28 22:02 UTC (permalink / raw) To: bluez-users Hi Marcel, On 28.02.05 09:13:51, Marcel Holtmann wrote: > > I'm trying to install a Socket Bluetooth Compactflash Card (Revision H) > > in my Thinkpad X21. I tested it with the 2.4.29 kernel (from Debian > > unstable) and it works, but I would like to use 2.6 and there it doesn't > > work. > > > > With 2.6, the serial_cs module gets loaded as I insert the card and > > dmesg shows the following: > > > > ----- > > ttyS1: detected caps 00000700 should be 00000100 > > ttyS1 at I/O 0x2f8 (irq = 11) is a 16C950/954 > > ----- > > > > Then I run modprobe hci_uart and this is what dmesg says: > > > > ----- > > Bluetooth: HCI UART driver ver 2.1 > > Bluetooth: HCI BCSP protocol initialized > > ----- > > (I didn't include CONFIG_BT_HCIUART_H4 in my kernel this time) > > > > No problem so far, but then: hciattach ttyS1 socket > > and it says "BCSP initialization timed out" and hcitool dev doesn't show > > any devices. > > what kind of 2.6 kernel is this? Give 2.6.11-rc5 a chance. Do you see > anything special with dmesg? Before I have tried 2.6.9-1-686 (Debian unstable) and 2.6.10 (from www.kernel.org). Now I patched the 2.6.10 up to 2.6.11-rc5, but it seems to behave the same - same messages in dmesg as before, still timeout when running hciattach (nothing in dmesg after this command)... Also the same with the -mh4 patch (against a clean 2.6.10). I checked what the working 2.4.29 shows in dmesg, maybe this helps somewhat: Inserting the card: ----- cs: memory probe 0x0c0000-0x0fffff: excluding 0xc0000-0xcffff 0xd8000-0xfffff ttyS01 at port 0x02f8 (irq = 11) is a 16C950/954 ----- modprobe hci_uart: ----- BlueZ HCI UART driver ver 2.1 Copyright (C) 2000,2001 Qualcomm Inc Written 2000,2001 by Maxim Krasnyansky <maxk@qualcomm.com> ----- hciattach ttyS1 socket: ----- bcsp_recv: Out-of-order packet arrived, got 1 expected 0 ----- (but the bluetooth device works despite this error) One idea: is there an (easy) way to log what's going on on the ttyS1 device (I mean the communication between the hci_uart driver and the cf card)? This way one could compare the logs of kernel 2.4 and 2.6 and maybe see what's wrong... Another question: What about the btuart_cs.ko module, what's the difference to the hci_uart module? Thanks in advance Mathias -- http://www.adamis.de/adam/ Es gibt mehr Leute, die kapitulieren, als solche, die scheitern. - Henry Ford ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Bluez-users mailing list Bluez-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bluez-users ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Bluez-users] Once again: Socket CF card and Kernel 2.6 2005-02-28 22:02 ` a2 @ 2005-03-01 8:29 ` Marcel Holtmann 2005-03-05 5:37 ` Mathias Adam 0 siblings, 1 reply; 14+ messages in thread From: Marcel Holtmann @ 2005-03-01 8:29 UTC (permalink / raw) To: BlueZ Mailing List Hi Mathias, > > what kind of 2.6 kernel is this? Give 2.6.11-rc5 a chance. Do you see > > anything special with dmesg? > > Before I have tried 2.6.9-1-686 (Debian unstable) and 2.6.10 (from > www.kernel.org). Now I patched the 2.6.10 up to 2.6.11-rc5, but it seems > to behave the same - same messages in dmesg as before, still timeout > when running hciattach (nothing in dmesg after this command)... > Also the same with the -mh4 patch (against a clean 2.6.10). > > I checked what the working 2.4.29 shows in dmesg, maybe this helps > somewhat: > > Inserting the card: > ----- > cs: memory probe 0x0c0000-0x0fffff: excluding 0xc0000-0xcffff > 0xd8000-0xfffff > ttyS01 at port 0x02f8 (irq = 11) is a 16C950/954 > ----- > > modprobe hci_uart: > ----- > BlueZ HCI UART driver ver 2.1 Copyright (C) 2000,2001 Qualcomm Inc > Written 2000,2001 by Maxim Krasnyansky <maxk@qualcomm.com> > ----- > > hciattach ttyS1 socket: > ----- > bcsp_recv: Out-of-order packet arrived, got 1 expected 0 > ----- > (but the bluetooth device works despite this error) > > One idea: is there an (easy) way to log what's going on on the ttyS1 > device (I mean the communication between the hci_uart driver and the cf > card)? This way one could compare the logs of kernel 2.4 and 2.6 and > maybe see what's wrong... I am not an serial card expert. This is a problem in the serial subsystem and a BlueZ problem. > Another question: What about the btuart_cs.ko module, what's the > difference to the hci_uart module? It only supports H:4 and is very limited and no longer supported. Regards Marcel ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Bluez-users mailing list Bluez-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bluez-users ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Bluez-users] Once again: Socket CF card and Kernel 2.6 2005-03-01 8:29 ` Marcel Holtmann @ 2005-03-05 5:37 ` Mathias Adam 2005-03-05 9:17 ` Erwin Authried 2005-03-05 11:24 ` Marcel Holtmann 0 siblings, 2 replies; 14+ messages in thread From: Mathias Adam @ 2005-03-05 5:37 UTC (permalink / raw) To: bluez-users Hi, I just got it working by doing a little change in the serial driver (8250.c). I tested it with 2.6.11 but I think it could work for any 2.6 kernel. Marcel Holtmann schrieb: > I am not an serial card expert. This is a problem in the serial > subsystem and a BlueZ problem. That proved to be true. Marcel: One thing I discovered while debugging this: the hci_uart driver seems to initialize the actual UART with only 230400 baud. Is this really the case or are those UARTs clocked at nonstandard (higher) frequencies so that this setting does result in a higher real baud rate? Regards, Mathias ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Bluez-users mailing list Bluez-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bluez-users ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Bluez-users] Once again: Socket CF card and Kernel 2.6 2005-03-05 5:37 ` Mathias Adam @ 2005-03-05 9:17 ` Erwin Authried 2005-03-05 14:42 ` Mathias Adam 2005-03-05 11:24 ` Marcel Holtmann 1 sibling, 1 reply; 14+ messages in thread From: Erwin Authried @ 2005-03-05 9:17 UTC (permalink / raw) To: bluez-users On Sat, 2005-03-05 at 06:37, Mathias Adam wrote: > Hi, > > I just got it working by doing a little change in the serial driver > (8250.c). I tested it with 2.6.11 but I think it could work for any 2.6 > kernel. > > Marcel Holtmann schrieb: > > I am not an serial card expert. This is a problem in the serial > > subsystem and a BlueZ problem. > > That proved to be true. > > Marcel: One thing I discovered while debugging this: the hci_uart driver > seems to initialize the actual UART with only 230400 baud. Is this > really the case or are those UARTs clocked at nonstandard (higher) > frequencies so that this setting does result in a higher real baud rate? I can't say for sure if that applies to your specific CF card, but usually PCMCIA/CF uarts are just register-compatible emulations of a standard uart, and the clockrate doesn't matter at all. The actual data rate can be very high. Regards, Erwin ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Bluez-users mailing list Bluez-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bluez-users ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Bluez-users] Once again: Socket CF card and Kernel 2.6 2005-03-05 9:17 ` Erwin Authried @ 2005-03-05 14:42 ` Mathias Adam 0 siblings, 0 replies; 14+ messages in thread From: Mathias Adam @ 2005-03-05 14:42 UTC (permalink / raw) To: bluez-users On 05.03.05 10:17:46, Erwin Authried wrote: > > seems to initialize the actual UART with only 230400 baud. Is this > > really the case or are those UARTs clocked at nonstandard (higher) > > frequencies so that this setting does result in a higher real baud rate? > > I can't say for sure if that applies to your specific CF card, but > usually PCMCIA/CF uarts are just register-compatible emulations of a > standard uart, and the clockrate doesn't matter at all. The actual data > rate can be very high. Hmm, I don't know... as the card didn't work with the wrong baud rate programmed in its UART I think it does use the selected clock rate - ok, at least the divisor must be right, the UART might be clocked internally at much more than the standard ~1.8MHz giving a higher real baud rate. Regards Mathias -- Twenty years from now you will be more disappointed by the things that you didn't do than by the ones you did do. So throw off the bowlines. Sail away from the safe harbor. Catch the trade winds in your sails. Explore. Dream. Discover. (Mark Twain) ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Bluez-users mailing list Bluez-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bluez-users ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Bluez-users] Once again: Socket CF card and Kernel 2.6 2005-03-05 5:37 ` Mathias Adam 2005-03-05 9:17 ` Erwin Authried @ 2005-03-05 11:24 ` Marcel Holtmann 2005-03-05 14:18 ` Mathias Adam 1 sibling, 1 reply; 14+ messages in thread From: Marcel Holtmann @ 2005-03-05 11:24 UTC (permalink / raw) To: BlueZ Mailing List Hi Mathias, > I just got it working by doing a little change in the serial driver > (8250.c). I tested it with 2.6.11 but I think it could work for any 2.6 > kernel. please provide a patch for your change. > One thing I discovered while debugging this: the hci_uart driver > seems to initialize the actual UART with only 230400 baud. Is this > really the case or are those UARTs clocked at nonstandard (higher) > frequencies so that this setting does result in a higher real baud rate? The hci_uart is only a line discipline. Every initialization and baud rate settings are done with hciattach. Regards Marcel ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Bluez-users mailing list Bluez-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bluez-users ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Bluez-users] Once again: Socket CF card and Kernel 2.6 2005-03-05 11:24 ` Marcel Holtmann @ 2005-03-05 14:18 ` Mathias Adam 2005-03-05 14:35 ` Mathias Adam 2005-03-05 18:17 ` Marcel Holtmann 0 siblings, 2 replies; 14+ messages in thread From: Mathias Adam @ 2005-03-05 14:18 UTC (permalink / raw) To: bluez-users [-- Attachment #1: Type: text/plain, Size: 1831 bytes --] Hi Marcel, On 05.03.05 12:24:19, Marcel Holtmann wrote: > > I just got it working by doing a little change in the serial driver > > (8250.c). I tested it with 2.6.11 but I think it could work for any 2.6 > > kernel. > > please provide a patch for your change. So - after some cleaning - here it is. A short description: The BlueZ driver requests a baud rate of 230400 which is uartclk/8 (serial_cs sets uartclk=1843200). However serial8250_set_termios() refuses to program a baud rate larger than uartclk/16 which should be ok for most UARTs. I looked into the 2.4 driver and found some code that changes the internal prescaler to values between 1:16 and 1:4 to support baud rates up to uartclk/4 respectively (this is done for 16C950 UARTs only). The datasheet of oxford's oxcf950 chip confirms this feature. Apply the patch to the file drivers/serial/8250.c Please let me know if there are problems or if it does work. > > One thing I discovered while debugging this: the hci_uart driver > > seems to initialize the actual UART with only 230400 baud. Is this > > really the case or are those UARTs clocked at nonstandard (higher) > > frequencies so that this setting does result in a higher real baud rate? > > The hci_uart is only a line discipline. Every initialization and baud > rate settings are done with hciattach. ok so it's hciattach that sets the baudrate - but that wasn't the point (or I misunderstood your answer?): I wonder if the bluetooth module is really accessed at only 230400 baud (that's the rate which is given to the 8250 driver) which seems a little bit slow thinking of bluetooths >700kbaud maximum rate... Regards Mathias -- Der Jammer der Menschen ist, daß die Narren so sicher sind und die Klugen so voller Zweifel. (Bertrand Russel) [-- Attachment #2: patch-serial-16c950 --] [-- Type: text/plain, Size: 1535 bytes --] --- 8250.c_2.6.11-org 2005-03-02 08:37:47.000000000 +0100 +++ 8250.c 2005-03-05 15:01:34.000000000 +0100 @@ -1604,7 +1604,7 @@ struct uart_8250_port *up = (struct uart_8250_port *)port; unsigned char cval, fcr = 0; unsigned long flags; - unsigned int baud, quot; + unsigned int baud, quot, max_baud; switch (termios->c_cflag & CSIZE) { case CS5: @@ -1636,9 +1636,29 @@ /* * Ask the core to calculate the divisor for us. */ - baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16); + max_baud = (up->port.type == PORT_16C950 ? port->uartclk/4 : port->uartclk/16); + baud = uart_get_baud_rate(port, termios, old, 0, max_baud); quot = serial8250_get_divisor(port, baud); + /* + * 16C950 supports additional prescaler ratios between 1:16 and 1:4 + * thus increasing max baud rate to uartclk/4. The following was taken + * from kernel 2.4 by Mathias Adam <a2@adamis.de> to make the Socket + * Bluetooth CF Card work under 2.6.11. + * (Patch might have other side effects so be careful!) + */ + if (up->port.type == PORT_16C950) { + unsigned int baud_base = port->uartclk/16; + if (baud <= port->uartclk/16) + serial_icr_write(up, UART_TCR, 0); + else if (baud <= port->uartclk/8) { + serial_icr_write(up, UART_TCR, 0x8); + } else if (baud <= port->uartclk/4) { + serial_icr_write(up, UART_TCR, 0x4); + } else + serial_icr_write(up, UART_TCR, 0); + } + /* * Work around a bug in the Oxford Semiconductor 952 rev B * chip which causes it to seriously miscalculate baud rates ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Bluez-users] Once again: Socket CF card and Kernel 2.6 2005-03-05 14:18 ` Mathias Adam @ 2005-03-05 14:35 ` Mathias Adam 2005-03-05 18:17 ` Marcel Holtmann 1 sibling, 0 replies; 14+ messages in thread From: Mathias Adam @ 2005-03-05 14:35 UTC (permalink / raw) To: bluez-users On 05.03.05 15:18:58, Mathias Adam wrote: > + unsigned int baud_base = port->uartclk/16; OK, this line can be removed... Regards Mathias ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Bluez-users mailing list Bluez-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bluez-users ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Bluez-users] Once again: Socket CF card and Kernel 2.6 2005-03-05 14:18 ` Mathias Adam 2005-03-05 14:35 ` Mathias Adam @ 2005-03-05 18:17 ` Marcel Holtmann 2005-03-05 19:25 ` Mathias Adam 1 sibling, 1 reply; 14+ messages in thread From: Marcel Holtmann @ 2005-03-05 18:17 UTC (permalink / raw) To: BlueZ Mailing List Hi Mathias, > > > I just got it working by doing a little change in the serial driver > > > (8250.c). I tested it with 2.6.11 but I think it could work for any 2.6 > > > kernel. > > > > please provide a patch for your change. > > So - after some cleaning - here it is. A short description: > > The BlueZ driver requests a baud rate > of 230400 which is uartclk/8 (serial_cs sets uartclk=1843200). However > serial8250_set_termios() refuses to program a baud rate larger than > uartclk/16 which should be ok for most UARTs. I looked into the 2.4 > driver and found some code that changes the internal prescaler to values > between 1:16 and 1:4 to support baud rates up to uartclk/4 respectively > (this is done for 16C950 UARTs only). The datasheet of oxford's oxcf950 > chip confirms this feature. > > Apply the patch to the file drivers/serial/8250.c > > Please let me know if there are problems or if it does work. I only have the old Socket cards (dtl1_cs driver) at hand and so I can't test it, but my Xircom card is still not working. > > > One thing I discovered while debugging this: the hci_uart driver > > > seems to initialize the actual UART with only 230400 baud. Is this > > > really the case or are those UARTs clocked at nonstandard (higher) > > > frequencies so that this setting does result in a higher real baud rate? > > > > The hci_uart is only a line discipline. Every initialization and baud > > rate settings are done with hciattach. > > ok so it's hciattach that sets the baudrate - but that wasn't the point > (or I misunderstood your answer?): I wonder if the bluetooth module is > really accessed at only 230400 baud (that's the rate which is given to > the 8250 driver) which seems a little bit slow thinking of bluetooths > >700kbaud maximum rate... For the Socket card the baud rate is 230400 and yes, this is to slow for the full bandwith of a piconet. However I never did any bandwith test with this card, but actually there are cards out there where the UART limits the total possible bandwidth. Regards Marcel ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Bluez-users mailing list Bluez-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bluez-users ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Bluez-users] Once again: Socket CF card and Kernel 2.6 2005-03-05 18:17 ` Marcel Holtmann @ 2005-03-05 19:25 ` Mathias Adam 2005-03-05 19:55 ` Marcel Holtmann 0 siblings, 1 reply; 14+ messages in thread From: Mathias Adam @ 2005-03-05 19:25 UTC (permalink / raw) To: bluez-users [-- Attachment #1: Type: text/plain, Size: 893 bytes --] Hi Marcel, On 05.03.05 19:17:50, Marcel Holtmann wrote: > I only have the old Socket cards (dtl1_cs driver) at hand and so I can't > test it, but my Xircom card is still not working. Is that Xircom card similar to the newer Socket cards? i.e. does it have a 16C95x UART? If yes you could try this patch which I used while investigating the problem, it includes some debug messages which might help. > For the Socket card the baud rate is 230400 and yes, this is to slow for > the full bandwith of a piconet. However I never did any bandwith test > with this card, but actually there are cards out there where the UART > limits the total possible bandwidth. Huh - but at least it's still a lot faster than a GPRS connection so it's okay for me... Regards, Mathias -- The first time you'll get a Microsoft product that doesn't suck, will be the day they start producing vacuum cleaners. [-- Attachment #2: debug-patch --] [-- Type: text/plain, Size: 1736 bytes --] --- 8250.c_2.6.11-org 2005-03-02 08:37:47.000000000 +0100 +++ 8250.c 2005-03-05 02:32:50.000000000 +0100 @@ -56,11 +56,11 @@ /* * Debugging. */ -#if 0 +//#if 0 #define DEBUG_AUTOCONF(fmt...) printk(fmt) -#else -#define DEBUG_AUTOCONF(fmt...) do { } while (0) -#endif +//#else +//#define DEBUG_AUTOCONF(fmt...) do { } while (0) +//#endif #if 0 #define DEBUG_INTR(fmt...) printk(fmt) @@ -346,7 +346,7 @@ static inline void serial8250_clear_fifos(struct uart_8250_port *p) { if (p->capabilities & UART_CAP_FIFO) { - serial_outp(p, UART_FCR, UART_FCR_ENABLE_FIFO); +//alskdfj serial_outp(p, UART_FCR, UART_FCR_ENABLE_FIFO); serial_outp(p, UART_FCR, UART_FCR_ENABLE_FIFO | UART_FCR_CLEAR_RCVR | UART_FCR_CLEAR_XMIT); serial_outp(p, UART_FCR, 0); @@ -1636,9 +1636,25 @@ /* * Ask the core to calculate the divisor for us. */ - baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16); + baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk /* /16 */); quot = serial8250_get_divisor(port, baud); + printk(KERN_INFO "***** Serial: baud=%d quot=%d\n", baud, quot); + if (up->port.type == PORT_16C950) { + unsigned int baud_base = port->uartclk/16; + if (baud <= baud_base) + serial_icr_write(up, UART_TCR, 0); + else if (baud <= 2*baud_base) { + serial_icr_write(up, UART_TCR, 0x8); + baud_base = baud_base * 2; + } else if (baud <= 4*baud_base) { + serial_icr_write(up, UART_TCR, 0x4); + baud_base = baud_base * 4; + } else + serial_icr_write(up, UART_TCR, 0); + printk(KERN_INFO "***** Serial: baud_base=%d\n", baud_base); + } + /* * Work around a bug in the Oxford Semiconductor 952 rev B * chip which causes it to seriously miscalculate baud rates ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Bluez-users] Once again: Socket CF card and Kernel 2.6 2005-03-05 19:25 ` Mathias Adam @ 2005-03-05 19:55 ` Marcel Holtmann 2005-03-06 19:37 ` Mathias Adam 0 siblings, 1 reply; 14+ messages in thread From: Marcel Holtmann @ 2005-03-05 19:55 UTC (permalink / raw) To: BlueZ Mailing List Hi Mathias, > > I only have the old Socket cards (dtl1_cs driver) at hand and so I can't > > test it, but my Xircom card is still not working. > > Is that Xircom card similar to the newer Socket cards? i.e. does it have > a 16C95x UART? If yes you could try this patch which I used while > investigating the problem, it includes some debug messages which might > help. I get these extra log messages with your patch and the Xircom card: ttyS2: autoconf (0x03e8, 0x00000000): iir=3 iir1=6 iir2=6 Xscale type=XScale ttyS2 at I/O 0x3e8 (irq = 20) is a XScale ***** Serial: baud=9600 quot=12 ***** Serial: baud=9600 quot=12 ***** Serial: baud=9600 quot=12 ***** Serial: baud=9600 quot=12 ***** Serial: baud=9600 quot=12 ***** Serial: baud=9600 quot=12 ***** Serial: baud=9600 quot=12 ***** Serial: baud=115200 quot=1 Don't ask why the type is now Xscale. It seems it is Xscale for every serial port in my system and it is a normal P4 system. > > For the Socket card the baud rate is 230400 and yes, this is to slow for > > the full bandwith of a piconet. However I never did any bandwith test > > with this card, but actually there are cards out there where the UART > > limits the total possible bandwidth. > > Huh - but at least it's still a lot faster than a GPRS connection so it's > okay for me... If you have another system with an USB Bluetooth dongle, you can simply check what's the max piconet bandwidth. Use a PAN connection or test it with the l2test or rctest program. Regards Marcel ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Bluez-users mailing list Bluez-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bluez-users ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [Bluez-users] Once again: Socket CF card and Kernel 2.6 2005-03-05 19:55 ` Marcel Holtmann @ 2005-03-06 19:37 ` Mathias Adam 0 siblings, 0 replies; 14+ messages in thread From: Mathias Adam @ 2005-03-06 19:37 UTC (permalink / raw) To: bluez-users Hi Marcel, On 05.03.05 20:55:37, Marcel Holtmann wrote: > I get these extra log messages with your patch and the Xircom card: > > ttyS2: autoconf (0x03e8, 0x00000000): iir=3 iir1=6 iir2=6 Xscale type=XScale > ttyS2 at I/O 0x3e8 (irq = 20) is a XScale > ***** Serial: baud=9600 quot=12 > ***** Serial: baud=9600 quot=12 > ***** Serial: baud=9600 quot=12 > ***** Serial: baud=9600 quot=12 > ***** Serial: baud=9600 quot=12 > ***** Serial: baud=9600 quot=12 > ***** Serial: baud=9600 quot=12 > ***** Serial: baud=115200 quot=1 > > Don't ask why the type is now Xscale. It seems it is Xscale for every ^^^ was it different without my patch? Shouldn't be... > serial port in my system and it is a normal P4 system. What kernel version did you patch? What does dmesg show when calling hciattach (should be some ***** Serial messages)? Does the card work with a 2.4 kernel (e.g. 2.4.29)? > > > For the Socket card the baud rate is 230400 and yes, this is to slow for > > > the full bandwith of a piconet. However I never did any bandwith test > > > with this card, but actually there are cards out there where the UART > > > limits the total possible bandwidth. > > > > Huh - but at least it's still a lot faster than a GPRS connection so it's > > okay for me... > > If you have another system with an USB Bluetooth dongle, you can simply > check what's the max piconet bandwidth. Use a PAN connection or test it > with the l2test or rctest program. I didn't find l2test nor rctest but I tried some OBEX file transfers and only got around 25-30 KiByte/s, the same with Windows so it seems the card really is limited to 230400 baud... Btw, do you know another cf card without external antenna? Regards, Mathias -- There are only 10 types of people in this world: those who understand binary, and those who don't. ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Bluez-users mailing list Bluez-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bluez-users ^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2005-03-06 19:37 UTC | newest] Thread overview: 14+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2005-02-26 3:19 [Bluez-users] Once again: Socket CF card and Kernel 2.6 Mathias Adam 2005-02-28 8:13 ` Marcel Holtmann 2005-02-28 22:02 ` a2 2005-03-01 8:29 ` Marcel Holtmann 2005-03-05 5:37 ` Mathias Adam 2005-03-05 9:17 ` Erwin Authried 2005-03-05 14:42 ` Mathias Adam 2005-03-05 11:24 ` Marcel Holtmann 2005-03-05 14:18 ` Mathias Adam 2005-03-05 14:35 ` Mathias Adam 2005-03-05 18:17 ` Marcel Holtmann 2005-03-05 19:25 ` Mathias Adam 2005-03-05 19:55 ` Marcel Holtmann 2005-03-06 19:37 ` Mathias Adam
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox