Re: bluetooth BW-BH02U reset failure

2003-04-02 Thread miniyan
Hello Maksim,

[...]

> actually, i have added support for firmware download in ng_ubt(4)
> driver and ported Broadcom firmware download utility from Linux.
> this will be included into the next snapshot which will be realeased
> in a few days.
It's good news. I'll try it.
 
[...]

> > Could not execute command "initialize". Invalid argument
> 
> this tells me that your userland and kernel are out of sync. you need
> to recompile all userland tools. when upgrading please follow these
> steps

I've re-compiled with following operation.  To fixed this error.

> 1) download latest snapshot
> 
> 2) extract it into your home directory. please *do not* extract
> shapshot into /usr. you *should* build snapshot *outside* of
> main FreeBSD source tree.
> 
> 3) build and install kernel modules
> 
> cd $snapshot_dir/src/sys/modules/netgraph/bluetooth
> make depend
> make
> make install
> make cleandir
> 
> 4) build and install userspace tools
> 
> cd $snapshot_dir/src/usr.bin/bluetooth
> make depend
> make
> make install
> make cleandir
> 
> cd $snapshot_dir/src/usr.sbin/bluetooth
> make depend
> make
> make install
> make cleandir
> 
> 5) build and install ports (optional)
> 
> IMPORTANT:
> 
>- build snapshot *outside* of FreeBSD main source tree. *Do not*
>  update sources in /usr/src. If you run 'cvsup' then all your
>  changes to /usr/src *will be lost*.
> 
>- always update your userspace tools
> 
>- after bulding and installing new kernel *do not* forget to
>  re-compile/re-install Bluetooth kernel modules (from snapshot).
>  you need this because kernel build will install old (stock)
>  Bluetooth modules
> 
>- after making "word" please *do not* forget to re-compile/re-install
>  both kernel modules and userland tools from snapshot.
> 

[...]

It's good information for me.  I was cvsup'd after copy bluetooth tree
to /usr/src and build everything.  It's very hard and waist time.
This time,  I understand how bluetooth tree build to make shorty and
correctly.

> this is different. M_NOWAIT/M_DONTWAIT and M_WAITOK/N_NOWAIT flags
> have chanaged again :( this is related to the following commit:
> 
> ==
> Revision 1.114 / (download) - annotate - [select for diffs], Mon Mar 10 
> 19:39:53 2003 UTC (3 weeks ago) by phk

[...]
> 
I understand. I can separate this topic.

Thank you.
Takahiko
-- 
miniyan <[EMAIL PROTECTED]>

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: bluetooth BW-BH02U reset failure

2003-04-01 Thread miniyan
Hi Maksim,

It's slow response

[...]
> 
> what you need is Linux bluez-bluefw-0.9 package. in firmware/
> directory you will find two files: BCM2033-MD.hex (mini-driver)
> and BCM2033-FW.bin (firmware). the loader itself is implemented
> in bcm_usb.c file.
I understand it.  It's my further target.

[...]
> 
> right. you *will* get these errors if you disconnect the device
> while stack is running (i.e. USB transfer is pending). i'm still
> looking into USB code to find why i'm getting lots of IOERRORs
> before CANCELLED.
I've no special error on it.

[...]
> >>3) is it uhci or ohci USB controller?
> > 
[...]

I have another PC, which is Crusoe LAPTOP CASIO FIVA 206.  This PC has
OHCI root hub AcerLab M5237 (Aladdin-V) USB controller. I tried to
connect mitsumi's dongle and rc.bluetooth.
So this pc shows error. If you have any well-known problem with OHCI,
please let me know or point information.

# usbdevs -d -v
Controller /dev/usb0:
addr 1: full speed, self powered, config 1, OHCI root hub(0x), AcerLabs(0x), 
rev 1.00
  uhub0
 port 1 addr 2: full speed, power 200 mA, config 1, product 0x641f(0x641f), 
Mitsumi(0x03ee), rev 1.14
   ubt0
 port 2 powered

# /etc/rc.bluetooth start ubt0
BD_ADDR: 00:a0:96:1f:d6:d6
Features: 0xff 0xff 0x5 00 00 00 00 00 
<3-Slot> <5-Slot>  
   
   

 
Max. ACL packet size: 128 bytes
Number of ACL packets: 8
Max. SCO packet size: 64 bytes
Number of SCO packets: 8
Could not execute command "initialize". Invalid argument
#
but console shows(sorry detailed value does not recognized. I just take picture
and read text from it) 
Bad mbuf alloc flags: 1
Stack backtrace:
backtrace(...
mb_alloc(...
m_get(1,8,...
ng_btsocket_hcl_raw_send(
send+0xd8
sosend(
sendit(
sendto(
syscall(
XInt0x80_syscall() at ...
--- syscall (133),elp = ...

> BTW you might want to check Pav Lucistnik's ([EMAIL PROTECTED]) Bluetooth
> on FreeBSD page.
> 
> http://www.oook.cz/bsd/bluetooth.html
> 
It's very good information.  It's big helps for me.  I trying to connect
with this document.  Unfortunately,  I just finished hccontrol.  h2ping
looks strange.  I just summarize it and send further mail.

Thanks,
Takahiko

-- 
miniyan <[EMAIL PROTECTED]>

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: bluetooth BW-BH02U reset failure

2003-03-18 Thread Maksim Yevmenkin
Hello Takahiko,

[...]

well, i did some research on that. it turns out Broadcom Bluetooth
chip based devices require firmware download. in particular the
device you have (Vendor ID 0x0a5c/Product ID 0x2033) uses special
procedure to download firmware file, i.e. you have to download
mini-driver first and then firmware itself. you can find both mini-driver
and firmware images on the net. also Linux BlueZ stack has bluefw
utility that can download firmware into this device. i will need
to port this on FreeBSD. however i'm not sure about copyright issues.
bottom line: i removed this device from the list of supported devices
for now. i will add support for firmware download in the next version
of ng_ubt(4) driver.
I just understand about this information.  I cannot found firmware for
DBT120, BW120M and GWBH02H. Of course, you know, this problem is
effects every BroadCom(Vendor ID 0x0a5c/Product ID 0x2033) devices.
I checked BlueZ bluefw already.
what you need is Linux bluez-bluefw-0.9 package. in firmware/
directory you will find two files: BCM2033-MD.hex (mini-driver)
and BCM2033-FW.bin (firmware). the loader itself is implemented
in bcm_usb.c file.
[...]

ubt_bulk_in_complete: ubt0 - Bulk-in xfer failed. IOERROR (13)
ubt0: at uhub0 port 2 (addr 2) disconnected
ubt_bulk_in_complete: ubt0 - Bulk-in xfer failed. IOERROR (13)
- 19 times repeat last line 
ubt0: detached
1) do these errors happen only when you disconnect the device?
I checked my action,  I've my action fault.
I was doing following actions...
  a. connect USB BT device
  b. run rc.bluetooth start
  c. disconnect USB BT device
  d. run rc.bluetooth stop
right. you *will* get these errors if you disconnect the device
while stack is running (i.e. USB transfer is pending). i'm still
looking into USB code to find why i'm getting lots of IOERRORs
before CANCELLED.
I works with following actions to do not happen that  errors.
  a. connect USB BT device
  b. run rc.bluetooth start
  c. run rc.bluetooth stop
  d. disconnect USB BT device
yes. you should not get any errors if you stop the stack first.
once you stop the stack all pending USB transfers are removed.
2) do you see these errors during the normal activity, i.e. when
  device is active and you try to send/receive data?
Device already removed.

3) is it uhci or ohci USB controller?
boot message and usbdevs asked controller is uhci. Do I has to check on
board?
--- messages
Mar 14 09:38:52  kernel: uhci0:  port 0x9000-0x901f irq 10 at device 7.2 on pci0
Mar 14 09:38:52  kernel: usb0:  on uchi0
--- usbdevs
Controller /dev/usb0:
addr 1: full speed, self powered, config 1, UHCI root hub(0x), Intel(0x), rev 
1.00
 port 1 powered
 port 2 addr 2: full speed, power 200 mA, config 1, product 0x641f(0x641f), 
Mitsumi(0x03ee), rev 1.14
no. that is good enough.

BTW you might want to check Pav Lucistnik's ([EMAIL PROTECTED]) Bluetooth
on FreeBSD page.
http://www.oook.cz/bsd/bluetooth.html

this page has some useful information. please let me know about your
progress.
thank you,
max
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message


Re: bluetooth BW-BH02U reset failure

2003-03-18 Thread miniyan
Hi Maksim,

> > > > ugen0: Broadcom product 0x2033, rev 1.01/0.a0, addr 2
> > > 
> > I just mistake device name,  it not BW-BH02U. true name is "GW-BH02U".
> 
> well, i did some research on that. it turns out Broadcom Bluetooth
> chip based devices require firmware download. in particular the
> device you have (Vendor ID 0x0a5c/Product ID 0x2033) uses special
> procedure to download firmware file, i.e. you have to download
> mini-driver first and then firmware itself. you can find both mini-driver
> and firmware images on the net. also Linux BlueZ stack has bluefw
> utility that can download firmware into this device. i will need
> to port this on FreeBSD. however i'm not sure about copyright issues.
> 
> bottom line: i removed this device from the list of supported devices
> for now. i will add support for firmware download in the next version
> of ng_ubt(4) driver.
I just understand about this information.  I cannot found firmware for
DBT120, BW120M and GWBH02H. Of course, you know, this problem is
effects every BroadCom(Vendor ID 0x0a5c/Product ID 0x2033) devices.
I checked BlueZ bluefw already.

> dump this looks fine to me, btw you might want to use hcidump -x
> next time.
I should use -x option.

> > ubt_bulk_in_complete: ubt0 - Bulk-in xfer failed. IOERROR (13)
> > ubt_bulk_in_complete: ubt0 - Bulk-in xfer failed. IOERROR (13)
> > ubt_intr_complete: ubt0 - Interrupt xfer failed. IOERROR (13)
> >  12 time repeats last 3 lines
> > ubt_bulk_in_complete: ubt0 - Bulk-in xfer failed. IOERROR (13)
> > ubt0: at uhub0 port 2 (addr 2) disconnected
> > ubt_bulk_in_complete: ubt0 - Bulk-in xfer failed. IOERROR (13)
> > - 19 times repeat last line 
> > ubt0: detached
> 
> 1) do these errors happen only when you disconnect the device?
I checked my action,  I've my action fault.
I was doing following actions...
  a. connect USB BT device
  b. run rc.bluetooth start
  c. disconnect USB BT device
  d. run rc.bluetooth stop

I works with following actions to do not happen that  errors.
  a. connect USB BT device
  b. run rc.bluetooth start
  c. run rc.bluetooth stop
  d. disconnect USB BT device

> 2) do you see these errors during the normal activity, i.e. when
>device is active and you try to send/receive data?
Device already removed.

> 3) is it uhci or ohci USB controller?
boot message and usbdevs asked controller is uhci. Do I has to check on
board?
--- messages
Mar 14 09:38:52  kernel: uhci0:  port 0x9000-0x901f irq 10 at device 7.2 on pci0
Mar 14 09:38:52  kernel: usb0:  on uchi0
--- usbdevs
Controller /dev/usb0:
addr 1: full speed, self powered, config 1, UHCI root hub(0x), Intel(0x), rev 
1.00
 port 1 powered
 port 2 addr 2: full speed, power 200 mA, config 1, product 0x641f(0x641f), 
Mitsumi(0x03ee), rev 1.14

> also you might get the same errors if you just start/stop/start the
> stack *without* disconnecting device after you stop stack. this
> is also a known issue and i'm tracking it down.
When I get any other errors, I'll report you..

Thanks,
Takahiko
-- 
miniyan <[EMAIL PROTECTED]>


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message


RE: bluetooth BW-BH02U reset failure

2003-03-16 Thread Maksim Yevmenkin
Hello Takahiko,

[...]

> OK, I checked my copy of 2003-03-05.  It only has sys.  I'd download latest
> 2003-03-05 on your directory.  I've rebuild environment.

good

[...]

> > > ugen0: Broadcom product 0x2033, rev 1.01/0.a0, addr 2
> > 
> I just mistake device name,  it not BW-BH02U. true name is "GW-BH02U".

well, i did some research on that. it turns out Broadcom Bluetooth
chip based devices require firmware download. in particular the
device you have (Vendor ID 0x0a5c/Product ID 0x2033) uses special
procedure to download firmware file, i.e. you have to download
mini-driver first and then firmware itself. you can find both mini-driver
and firmware images on the net. also Linux BlueZ stack has bluefw
utility that can download firmware into this device. i will need
to port this on FreeBSD. however i'm not sure about copyright issues.

bottom line: i removed this device from the list of supported devices
for now. i will add support for firmware download in the next version
of ng_ubt(4) driver.

[...]

> I tried to get DBT-120M, but I cannot get yet.  fortunately, I got
> another device.  It is HASEGAWA SYS-COM's HNT-UB01.  I checked this
> device with usbdevs.  ng_ubt asked this device is MITSUMI(0x3ee)
> BT_DONGLE(0x641f)

yes this device should work just fine.

> This device is work on my environment(some time failure in "reset",
> "initialize" I cannot solved yet why that failure). following message is
> this devices' one. Action is connect -> start -> stop -> disconnect

[...]

dump this looks fine to me, btw you might want to use hcidump -x
next time.

> ubt_bulk_in_complete: ubt0 - Bulk-in xfer failed. IOERROR (13)
> ubt_bulk_in_complete: ubt0 - Bulk-in xfer failed. IOERROR (13)
> ubt_intr_complete: ubt0 - Interrupt xfer failed. IOERROR (13)
>  12 time repeats last 3 lines
> ubt_bulk_in_complete: ubt0 - Bulk-in xfer failed. IOERROR (13)
> ubt0: at uhub0 port 2 (addr 2) disconnected
> ubt_bulk_in_complete: ubt0 - Bulk-in xfer failed. IOERROR (13)
> - 19 times repeat last line 
> ubt0: detached

1) do these errors happen only when you disconnect the device?

2) do you see these errors during the normal activity, i.e. when
   device is active and you try to send/receive data?

3) is it uhci or ohci USB controller?

note you might see these errors when you disconnect the device.
i do get them as well. for some reason USB stack does not return
CANCELLED status for pending requests right away. instead USB
returns IOERROR status. ng_ubt(4) driver tries to re-submit USB
transfer, but since device is gone it fails again with the same
IOERROR status. now at some point USB stack deliver CANCELLED 
status for pending request and then everything stops. i'm looking
into this right now. perhaps i'm doing something wrong, or perhaps
its normal and i just should not log this at all.

also you might get the same errors if you just start/stop/start the
stack *without* disconnecting device after you stop stack. this
is also a known issue and i'm tracking it down.

> So back to GW-BT02U, I tried to GW-BT02U again.  This device ofcourse
> failure with "reset" command. I captured hcidump for this.  Action is
> same connect -> start -> stop -> disconnect
> hcidump log is just follows:

[...]

> This looks like device not response.  I think freebsd should work
> because MITSUMI's device work. Then this problem relate BroadCom's
> device. What's next steps?

device does not respond because you need to download firmware first :(
i'm working on this. 
 
thanks,
max


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message


Re: bluetooth BW-BH02U reset failure

2003-03-15 Thread miniyan
Hello Maksim,


> > At first,  I installed 5-CURRENT on P3 machine and sync with cvsup to
> > latest.  and  overwrite  2003-03-05 maksim's bluetooth modules.
> 
> please verify that tarball you have downloaded has both kernel
> and userland stuff, i.e. you have sys, share, usr.bin and usr.sbin
> in the snapshot's src/ directory. if not please download updated 
> snapshot from the same location.

OK, I checked my copy of 2003-03-05.  It only has sys.  I'd download latest
2003-03-05 on your directory.  I've rebuild environment.

> > I tried to use planex(http://www.planex.co.jp/) BW-BH02U BlueTooth USB
> > dongle.
> >
> > I plugged BW-BH02U in to FreeBSD without any ko module.  FreeBSD found
> > that device with ugen0.  following message got with usbdevs -v and udesc_dump.
> 
> ugen(4) is generic USB device driver. you need to load ng_ubt(4) driver
> before plugging your device.
> 
> > ugen0: Broadcom product 0x2033, rev 1.01/0.a0, addr 2
> 
I just mistake device name,  it not BW-BH02U. true name is "GW-BH02U".

> D-Link DBW-120M, but there is D-Link DWB-120M. it could be that
> i mistyped the name. is that the one you have
> 
> http://www.dlink.com/products/usb/dwb120m/
> 
> the bad news is that page says its Mac only. also it seems in order
> to make D-Link DWB-120M work on PC you need to download some sort of
> firmware into it.
> 
> according to D-Link there is another adapter D-Link DBT-120
> 
> http://www.dlink.com/products/usb/dbt120/
> 
> and the page says it works with Mac & PC. also to make things very
> confusing according to BlueZ page there are two revisions of DBT-120.
> One has Broadcomm chip (Rev A1) and other CSR chip (Rev B1). The
> version with Broadcomm chip (Rev A1) also needs firmware download.
> Version with CSR chip (Rev B1) works just as it is. 

I  check that site, but I cannot find any topic and drivers out.
also WWW.planex.co.jp does not have any new information.

> i will have to go back to the original tester for clarification on that.
> sorry i do not have this device my self. 
No problem.

> if you have original D-Link DWB-120M or D-Link DBT-120 (Rev A1) than
> for now you out of luck :( i need to get one of these devices myself
> to figure out how to download firmware and add proper support in ng_ubt(4)
> driver. i have downloaded w2k driver for D-Link DBT-120 and will try
> to poke around later.

I tried to get DBT-120M, but I cannot get yet.  fortunately, I got
another device.  It is HASEGAWA SYS-COM's HNT-UB01.  I checked this
device with usbdevs.  ng_ubt asked this device is MITSUMI(0x3ee)
BT_DONGLE(0x641f)

This device is work on my environment(some time failure in "reset",
"initialize" I cannot solved yet why that failure). following message is
this devices' one. Action is connect -> start -> stop -> disconnect

-# hcidump
HCIDump - HCI packet analyzer ver 1.4
device: any snap_len: 65535 filter: 0x
< HCI Command: Reset(0x03|0x0003) plen 0
> HCI Event: Command Complete(0x0e) plen 4
> HCI Event: Command Status(0x0f) plen 4
< HCI Command: Read BD ADDR(0x04|0x0009) plen 0
> HCI Event: Command Complete(0x0e) plen 10
< HCI Command: Read Local Supported Features(0x04|0x0003) plen 0
> HCI Event: Command Complete(0x0e) plen 12
< HCI Command: Read Buffer Size(0x04|0x0005) plen 0
> HCI Event: Command Complete(0x0e) plen 11
< HCI Command: Write Scan Enable(0x03|0x001a) plen 1
> HCI Event: Command Complete(0x0e) plen 4
< HCI Command: Write Class of Device(0x03|0x0024) plen 3
> HCI Event: Command Complete(0x0e) plen 4
< HCI Command: Change Local Name(0x03|0x0013) plen 248
> HCI Event: Command Complete(0x0e) plen 4

-- dmesg
ubt0: Mitsumi product 0x641f, rev 1.10/1.14, addr 2
ubt0: Interface 0 endpoints: interrupt=0x81, bulk-in=0x82, bulk-out=0x2
ubt0: Interface 1 (alt.config 5) endpoints: isoc-in=0x83, isoc-out=0x3; 
wMaxPacketSize=49; nframes=6, buffer size=294
ng_hci_process_event: ubt0hci - got HCI event=0xe, length=4
ng_hci_process_event: ubt0hci - got HCI event=0xf, length=4
ng_hci_process_event: ubt0hci - got HCI event=0xe, length=10
ng_hci_process_event: ubt0hci - got HCI event=0xe, length=12
ng_hci_process_event: ubt0hci - got HCI event=0xe, length=11
ng_hci_process_event: ubt0hci - got HCI event=0xe, length=4
ng_hci_process_event: ubt0hci - got HCI event=0xe, length=4
ng_hci_process_event: ubt0hci - got HCI event=0xe, length=4
ng_l2cap_lower_rcvmsg: ubt0l2cap - HCI node is up, bdaddr:
xx:xx:xx:xx:xx:xx, pkt_size=128 bytes, num_pkts=8
ng_btsocket_l2cap_default_msg_input: Updating hook "ubt0l2c", src 
bdaddr=xx:xx:xx:xx:xx:xx
ng_btsocket_l2cap_raw_input: Updating hook "ubt0ctl", src bdaddr=xx:xx:xx:xx:xx:xx
ubt_bulk_in_complete: ubt0 - Bulk-in xfer failed. IOERROR (13)
ubt_bulk_in_complete: ubt0 - Bulk-in xfer failed. IOERROR (13)
ubt_intr_complete: ubt0 - Interrupt xfer failed. IOERROR (13)
 12 time repeats last 3 lines
ubt_bulk_in_complete: ubt0 - Bulk-in xfer failed. IOERROR (13)
ubt0: at uhub0 port 2 (addr 2) disconnected
ubt_bulk_in_complet

RE: bluetooth BW-BH02U reset failure

2003-03-12 Thread Maksim Yevmenkin
Hello Takahiko,

> At first,  I installed 5-CURRENT on P3 machine and sync with cvsup to
> latest.  and  overwrite  2003-03-05 maksim's bluetooth modules.

please verify that tarball you have downloaded has both kernel
and userland stuff, i.e. you have sys, share, usr.bin and usr.sbin
in the snapshot's src/ directory. if not please download updated 
snapshot from the same location.

> I tried to use planex(http://www.planex.co.jp/) BW-BH02U BlueTooth USB
> dongle.
>
> I plugged BW-BH02U in to FreeBSD without any ko module.  FreeBSD found
> that device with ugen0.  following message got with usbdevs -v and udesc_dump.

ugen(4) is generic USB device driver. you need to load ng_ubt(4) driver
before plugging your device.

> ugen0: Broadcom product 0x2033, rev 1.01/0.a0, addr 2

from ng_ubt.[ch]

{ USB_VENDOR_BROADCOM, USB_PRODUCT_DBW_120M_BT_DONGLE },
#define USB_PRODUCT_DBW_120M_BT_DONGLE  0x2033 /* D-Link DBW-120M */

your device already supported by ng_ubt(4) driver.

[...]

> These message asked BW-BH02U is like BroadCom Product 2033.  I think
> this device similar D-Link DBW-120M.

yes, it is :)

> After,  I disconnect BW-BH02U and load ng_ubt.ko.  I plugged BW-BH02U
> again.  FreeBSD found that module with ubt0.
>
> It looks like work then I try to run rc.bluetooth start ubt0. 
> rc.bluetooth is provided maksim's 2003-02-10 version.
> Unfortunately,  rc.bluetooth has problem with "hccontrol ubt0hci reset"
> command.  This error message is following..
>
>  Could not execute command "reset". Operation timed out

hmm... strange. now i'm confused. i could not find any info on
D-Link DBW-120M, but there is D-Link DWB-120M. it could be that
i mistyped the name. is that the one you have

http://www.dlink.com/products/usb/dwb120m/

the bad news is that page says its Mac only. also it seems in order
to make D-Link DWB-120M work on PC you need to download some sort of
firmware into it.

according to D-Link there is another adapter D-Link DBT-120

http://www.dlink.com/products/usb/dbt120/

and the page says it works with Mac & PC. also to make things very
confusing according to BlueZ page there are two revisions of DBT-120.
One has Broadcomm chip (Rev A1) and other CSR chip (Rev B1). The
version with Broadcomm chip (Rev A1) also needs firmware download.
Version with CSR chip (Rev B1) works just as it is. 

i will have to go back to the original tester for clarification on that.
sorry i do not have this device my self. 

[...]

> I don't know this error related from USB, BT or others.  If you have any
> ideas,  please give me suggestions.

if you have original D-Link DWB-120M or D-Link DBT-120 (Rev A1) than
for now you out of luck :( i need to get one of these devices myself
to figure out how to download firmware and add proper support in ng_ubt(4)
driver. i have downloaded w2k driver for D-Link DBT-120 and will try
to poke around later.

thanks,
max


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message