STM32F4 Discovery usb蓝牙模块驱动 - UUBT

上传者: gz_eddie_htc | 上传时间: 2026-01-14 16:49:49 | 文件大小: 53KB | 文件类型: RAR
Uubt is for McU UsB BlueTooth ============================= This is a demo application for bluetooth USB dongle connected to STM32F4DISCOVERY (http://www.st.com/internet/evalboard/product/252419.jsp) board based on BTstack (http://code.google.com/p/btstack) project and ST USB libraries. LICENSING --------- My files are licensed under the terms of GPLv3, although I haven't thoroughly investigated the licenses compatibility for packages used. Please note that files from different projects involved use different licences. WHAT IS SPECIAL --------------- Pure FOSS components using hardware comprized of very cheap STM32F4DISCOVERY board and commodity bluetooth USB dongles. WHAT YOU NEED ------------- - STM32F4DISCOVERY board - cable to connect it to USB dongle (I use normal USB A male to micro-USB cable + USB A female/USB A female adapter) - USB dongle: USB parameters are currently hardcoded rather than read from descriptors, so you should verify that they match (I use lsusb -v for that purpose). Dongles tested thus far are: CSR and Atheros AR3011. Firmware loading is implemented for some Atheros chips but it is not very stable. - toolchain and libraries. I use linux, code sourcery lite (eabi build), https://github.com/texane/stlink project. You should download btstack source and STM32F4DISCOVERY firmware package (http://www.st.com/internet/com/SOFTWARE_RESOURCES/SW_COMPONENT/FIRMWARE/stm32f4discovery_fw.zip). COMPILING --------- Currently 2 build flavours are supported: bare (no OS) and for ChibiOS/RT (http://www.chibios.org). To build for ChibiOS/RT, additionally download respective sources (I use trunk, which is currently at 2.3.4+). You will probably not need newlib_stubs.c here. The description below is for no-OS build. Fix ST libs (mine are marked as 1.1.0 revision) using the patch provided. Btstack source probably needs configuring (I'm not sure). Couple of build options are currently implemented via Makefile variables, see Makefile head for details. Fix paths in Makefile and verify that defines in source files match your hardware. Grab missing files (such as linker script) from btstack and ST packages. After successful make flash the board using gdb shipped with code sourcery lite and stlink utility. Please have in mind that btstack uses several libc functions. You may use newlib shipped with code sourcery lite, but you will need to provide libnosys or stubs file, for instance as described in https://sites.google.com/site/stm32discovery/open-source-development-with-the-stm32-discovery/getting-newlib-to-work-with-stm32-and-code-sourcery-lite-eabi Personally I use custom printf() printing to memory buffer and using stlink/SWD to communicate it to host. I find it quite comfortable, but I don't want to share this code because it's very ugly and not essential for this project. WHAT YOU GET ------------ The demo app is based on btstack/MSP-EXP430F5438-CC256x/example/spp_counter.c example. See btstack site wiki (MSP430 section) for example apps description. Besides that I can see my board responding to remote l2ping, hcitool name, hcitool scan and possibly more. To observe app main function, connect rfcomm port (sudo rfcomm 0 1), start terminal such as minicom and observe "BTstack counter xxxx" lines emerging. CURRENT STATE ------------- Using any one of 2 of my dongles, no-OS build flavour feels quite stable. ChibiOS build works but not so stable, in particular, removing -O0 gcc option breaks things for me. l2ping looks reproducable, contrary to rfcomm. ChibiOS flavour firmware loading is not tested.

文件下载

资源详情

[{"title":"( 30 个子文件 53KB ) STM32F4 Discovery usb蓝牙模块驱动 - UUBT","children":[{"title":"uubt-master_original","children":[{"title":"uubt-master","children":[{"title":"COPYING <span style='color:#111;'> 34.32KB </span>","children":null,"spread":false},{"title":"src","children":[{"title":"conf","children":[{"title":"chibios","children":[{"title":"mcuconf.h <span style='color:#111;'> 8.34KB </span>","children":null,"spread":false},{"title":"halconf.h <span style='color:#111;'> 9.88KB </span>","children":null,"spread":false},{"title":"chconf.h <span style='color:#111;'> 16.48KB </span>","children":null,"spread":false}],"spread":true},{"title":"usb_conf.h <span style='color:#111;'> 766B </span>","children":null,"spread":false},{"title":"config.h <span style='color:#111;'> 654B </span>","children":null,"spread":false}],"spread":true},{"title":"clones","children":[{"title":"system_stm32f4xx.c <span style='color:#111;'> 21.77KB </span>","children":null,"spread":false},{"title":"newlib_stubs.c <span style='color:#111;'> 4.86KB </span>","children":null,"spread":false},{"title":"usb_bsp.c <span style='color:#111;'> 14.43KB </span>","children":null,"spread":false},{"title":"stm32f4xx_conf.h <span style='color:#111;'> 3.65KB </span>","children":null,"spread":false}],"spread":true},{"title":"hal_uubt.h <span style='color:#111;'> 349B </span>","children":null,"spread":false},{"title":"my_usb.h <span style='color:#111;'> 402B </span>","children":null,"spread":false},{"title":"usbh_bt_core.c <span style='color:#111;'> 11.30KB </span>","children":null,"spread":false},{"title":"dummy","children":[{"title":"usbh_conf.h <span style='color:#111;'> 22B </span>","children":null,"spread":false},{"title":"usbh_usr.c <span style='color:#111;'> 1.71KB </span>","children":null,"spread":false},{"title":"my_stm32f4_discovery.h <span style='color:#111;'> 732B </span>","children":null,"spread":false},{"title":"stdio.h <span style='color:#111;'> 34B </span>","children":null,"spread":false}],"spread":true},{"title":"Makefile <span style='color:#111;'> 4.13KB </span>","children":null,"spread":false},{"title":".gitignore <span style='color:#111;'> 51B </span>","children":null,"spread":false},{"title":"os","children":[{"title":"chibios","children":[{"title":"usb_bsp.c <span style='color:#111;'> 3.47KB </span>","children":null,"spread":false},{"title":"hal_bt_os.c <span style='color:#111;'> 769B </span>","children":null,"spread":false},{"title":"Makefile <span style='color:#111;'> 8.00KB </span>","children":null,"spread":false},{"title":".gitignore <span style='color:#111;'> 11B </span>","children":null,"spread":false}],"spread":true},{"title":"none","children":[{"title":"stm32f4xx_it.c <span style='color:#111;'> 461B </span>","children":null,"spread":false},{"title":"hal_bt_os.c <span style='color:#111;'> 928B </span>","children":null,"spread":false}],"spread":false}],"spread":true},{"title":"hci_transport_uubt.c <span style='color:#111;'> 3.54KB </span>","children":null,"spread":false},{"title":"main.c <span style='color:#111;'> 6.80KB </span>","children":null,"spread":false}],"spread":false},{"title":"stm32f4discovery_fw.diff <span style='color:#111;'> 4.63KB </span>","children":null,"spread":false},{"title":".gitignore <span style='color:#111;'> 9B </span>","children":null,"spread":false},{"title":"README <span style='color:#111;'> 3.97KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明