Open hitqiu opened 10 years ago
Hi hitqiu,
do you use smartphone as the peer? What about PC? Anyway, please describe your situation more verbosely.
On Wed, Apr 16, 2014 at 06:44:14PM -0700, hitqiu wrote:
I try to download the uubt-noos.bin which has been made by your uubt projecct to the STM32F4discovery board and use the printf funtion to print the information . The heartbeat clocks , usb_bsp_init,run_loop_init works very well. But my smart phone can not search for the bluetooth device on the stm32F4discovery. The cmd of "lsusb -v" gives the informations like this:
Bus 002 Device 004: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode) Couldn't open device, some information will be missing Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 1.10 bDeviceClass 224 Wireless bDeviceSubClass 1 Radio Frequency bDeviceProtocol 1 Bluetooth bMaxPacketSize0 16 idVendor 0x0a12 Cambridge Silicon Radio, Ltd idProduct 0x0001 Bluetooth Dongle (HCI mode) bcdDevice 1.34 iManufacturer 0 iProduct 0 iSerial 0 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 108 bNumInterfaces 2 bConfigurationValue 1 iConfiguration 0 bmAttributes 0x80 (Bus Powered) MaxPower 100mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 3 bInterfaceClass 224 Wireless bInterfaceSubClass 1 Radio Frequency bInterfaceProtocol 1 Bluetooth iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0010 1x 16 bytes bInterval 1 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x82 EP 2 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x02 EP 2 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0010 1x 16 bytes bInterval 1 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x82 EP 2 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x02 EP 2 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 224 Wireless bInterfaceSubClass 1 Radio Frequency bInterfaceProtocol 1 Bluetooth iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x83 EP 3 IN bmAttributes 1 Transfer Type Isochronous Synch Type None Usage Type Data wMaxPacketSize 0x0000 1x 0 bytes bInterval 1 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x03 EP 3 OUT bmAttributes 1 Transfer Type Isochronous Synch Type None Usage Type Data wMaxPacketSize 0x0000 1x 0 bytes bInterval 1 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 1 bNumEndpoints 2 bInterfaceClass 224 Wireless bInterfaceSubClass 1 Radio Frequency bInterfaceProtocol 1 Bluetooth iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x83 EP 3 IN bmAttributes 1 Transfer Type Isochronous Synch Type None Usage Type Data wMaxPacketSize 0x0009 1x 9 bytes bInterval 1 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x03 EP 3 OUT bmAttributes 1 Transfer Type Isochronous Synch Type None Usage Type Data wMaxPacketSize 0x0009 1x 9 bytes bInterval 1 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 2 bNumEndpoints 2 bInterfaceClass 224 Wireless bInterfaceSubClass 1 Radio Frequency bInterfaceProtocol 1 Bluetooth iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x83 EP 3 IN bmAttributes 1 Transfer Type Isochronous Synch Type None Usage Type Data wMaxPacketSize 0x0011 1x 17 bytes bInterval 1 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x03 EP 3 OUT bmAttributes 1 Transfer Type Isochronous Synch Type None Usage Type Data wMaxPacketSize 0x0011 1x 17 bytes bInterval 1
I think the usb dongle is the IR3011 and I guess it must be something wrong in the SDP , USB HOST_Init or run_loop add data source. Can you give me some advice about how to fix the project. Thank you for sharing the code.
Reply to this email directly or view it on GitHub: https://github.com/byly/uubt/issues/3
Kind regards, Byly.
Thank you for your response! My code source is download from the website https://github.com/autosportlabs/uubt ,which has been configured. I add the stm32flash.ld to the project and make the uubt-noos.bin file. when I download it to the stm32f4discovery board ,the VBUS led lights. But I cannot find the bluetooth device( The smart phone works just as the tool to find the bluetooth device). I try to print the information to the usart1. The informations is as follows: The SDP service buffer size :111 tick tick tick tick ... I think it must be somothing wrong in the project. Meanwhile, I look at the btstack project about MP430. The process is very similar. USB_Init used the st lib. So I got no idea about it.
Today,I add printf functin to the class_callback fuctions. when I insert the BT device to the board. It can detected the device attached ,device speed ,device desc available and assigned the address to the device. BUT it can not configure desc avaiable, detect manufacturer string, product string, serialnum string and enter the process of USB Enumeration. BUT when I insert USB disk to the board ,I can get the information as follows: device speed detected, device desc available, device address assigned , configuration desc avaiable, manufacturer string, product string, serialnum string, enumeration done and user inputdevice not supported ... The bluetooth device might be problem, I am not sure.( the bluetooth device information has been provided before)
On Thu, Apr 17, 2014 at 09:05:58PM -0700, hitqiu wrote:
Today,I add printf functin to the class_callback fuctions. when I insert the BT device to the board. It can detected the device attached ,device speed ,device desc available and assigned the address to the device. BUT it can not configure desc avaiable, detect manufacturer string, product string, serialnum string and enter the process of USB Enumeration. BUT when I insert USB disk to the board ,I can get the information as follows: device speed detected, device desc available, device address assigned , configuration desc avaiable, manufacturer string, product string, serialnum string, enumeration done and user inputdevice not supported ...
The bluetooth device might be problem, I am not sure.( the bluetooth device information has been provided before)
This is unlikely.
Have you properly patched the ST USB library?
And what is your BT device exact model? What is "IR3011" (is it AR3011)? lsusb (or similar) info you attached may be misleading.
Reply to this email directly or view it on GitHub: https://github.com/byly/uubt/issues/3#issuecomment-40785369
Kind regards, Byly.
It is "AR3011". How to patch the ST USB library? The project can generate uubt_noos.bin file without patching the ST library?
On Thu, Apr 17, 2014 at 09:55:35PM -0700, hitqiu wrote:
It is "AR3011".
AR3011 needs to load firmware before it is operational, it is described in my README. I'd suggest using the classic usb dongle during debugging and then switch to AR3011 if it is necessary.
How to patch the ST USB library?
See my README, but reportedly it is the most weird part due to different library versions available or unavailable. Nobody succeeded thus far according to my correspondence, you have the chance of being the first ;) Well, the second if taking me into account.
The project can generate uubt_noos.bin file without patching the ST library?
Probably, yes, unfortunately ;).
Reply to this email directly or view it on GitHub: https://github.com/byly/uubt/issues/3#issuecomment-40786824
Kind regards, Byly.
I can not open the website (http://www.st.com/internet/com/SOFTWARE_RESOURCES/SW_COMPONENT/FIRMWARE/stm32f4discovery_fw.zip). provided by the READEME file. Is there any way to get the patch.
Accurately,there is no fireware in the website.
On Thu, Apr 17, 2014 at 10:37:34PM -0700, hitqiu wrote:
I can not open the website (http://www.st.com/internet/com/SOFTWARE_RESOURCES/SW_COMPONENT/FIRMWARE/stm32f4discovery_fw.zip). provided by the READEME file. Is there any way to get the patch.
Which means site layout changes with time :(. Try to search on ST site or resort to lmgtfy.com
Reply to this email directly or view it on GitHub: https://github.com/byly/uubt/issues/3#issuecomment-40788241
Kind regards, Byly.
Thank you for your help. I have not been able to search for and connect to a Bluetooth device until I modify the ST lib. But how can I communicate with the board. For example, I want to send a string to the microcontroller. Which software do I need. There is some bluetoothspp app in google store. But it doesn't work.
On Sun, Apr 20, 2014 at 11:30:32PM -0700, hitqiu wrote:
Thank you for your help. I have not been able to search for and connect to a Bluetooth device until I modify the ST lib. But how can I communicate with the board. For example, I want to send a string to the microcontroller. Which software do I need. There is some bluetoothspp app in google store. But it doesn't work.
Nice to hear. I dumped the project quite early, because I was unable to contact ST on the bugs found. So, the only application, I was testing is the modified sppcounter (or something similar) from the BTStack project (the peer being linux PC). But basically, upper layers of the application are pure BTStack, so, if you have the setup listed above working, you can go on and try to extend it (to smartphone as peer and different application protos, for one) the usual BTStack way, I hope.
If you have at least SPP working, I guess, you can ask for further help on BTStack list. Good luck and don't forget to report your success ;)
P.S. Anyway, I suspect you will need to program your apps, probably on both sides of BT link.
Reply to this email directly or view it on GitHub: https://github.com/byly/uubt/issues/3#issuecomment-40918992
Kind regards, Byly.
I try to download the uubt-noos.bin which has been made by your uubt projecct to the STM32F4discovery board and use the printf funtion to print the information . The heartbeat clocks , usb_bsp_init,run_loop_init works very well. But my smart phone can not search for the bluetooth device on the stm32F4discovery. The cmd of "lsusb -v" gives the informations like this:
Bus 002 Device 004: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode) Couldn't open device, some information will be missing Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 1.10 bDeviceClass 224 Wireless bDeviceSubClass 1 Radio Frequency bDeviceProtocol 1 Bluetooth bMaxPacketSize0 16 idVendor 0x0a12 Cambridge Silicon Radio, Ltd idProduct 0x0001 Bluetooth Dongle (HCI mode) bcdDevice 1.34 iManufacturer 0 iProduct 0 iSerial 0 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 108 bNumInterfaces 2 bConfigurationValue 1 iConfiguration 0 bmAttributes 0x80 (Bus Powered) MaxPower 100mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 3 bInterfaceClass 224 Wireless bInterfaceSubClass 1 Radio Frequency bInterfaceProtocol 1 Bluetooth iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0010 1x 16 bytes bInterval 1 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x82 EP 2 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x02 EP 2 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0010 1x 16 bytes bInterval 1 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x82 EP 2 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x02 EP 2 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0040 1x 64 bytes bInterval 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 224 Wireless bInterfaceSubClass 1 Radio Frequency bInterfaceProtocol 1 Bluetooth iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x83 EP 3 IN bmAttributes 1 Transfer Type Isochronous Synch Type None Usage Type Data wMaxPacketSize 0x0000 1x 0 bytes bInterval 1 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x03 EP 3 OUT bmAttributes 1 Transfer Type Isochronous Synch Type None Usage Type Data wMaxPacketSize 0x0000 1x 0 bytes bInterval 1 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 1 bNumEndpoints 2 bInterfaceClass 224 Wireless bInterfaceSubClass 1 Radio Frequency bInterfaceProtocol 1 Bluetooth iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x83 EP 3 IN bmAttributes 1 Transfer Type Isochronous Synch Type None Usage Type Data wMaxPacketSize 0x0009 1x 9 bytes bInterval 1 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x03 EP 3 OUT bmAttributes 1 Transfer Type Isochronous Synch Type None Usage Type Data wMaxPacketSize 0x0009 1x 9 bytes bInterval 1 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 2 bNumEndpoints 2 bInterfaceClass 224 Wireless bInterfaceSubClass 1 Radio Frequency bInterfaceProtocol 1 Bluetooth iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x83 EP 3 IN bmAttributes 1 Transfer Type Isochronous Synch Type None Usage Type Data wMaxPacketSize 0x0011 1x 17 bytes bInterval 1 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x03 EP 3 OUT bmAttributes 1 Transfer Type Isochronous Synch Type None Usage Type Data wMaxPacketSize 0x0011 1x 17 bytes bInterval 1
I think the usb dongle is the IR3011 and I guess it must be something wrong in the SDP , USB HOST_Init or run_loop add data source. Can you give me some advice about how to fix the project. Thank you for sharing the code.