How to use bluetooth module for send our custom data - Page 1
Forum section: electronics / general

author: mathan
author_rank: Newbie
timestamp: November 28, 2020, 10:07:46 am
content: Hi,My project demands wireless data transfer between windows application to the MCU(ATSAMD21) and it process the data send it to the display through uart. we choose bluetooth for wireless data transfer. since samd21 does not have in-built bluetooth module, we have been looking for bluetooth driver and found ATWINC3400 suitable for our application. After read software design documentation of ATWINC3400, I have following doubts.1. are we only able to utilize bluetooth feature of ATWINC3400 if we use their dedicated mobile apps?2. Is data transfer via ATWINC3400 driver possible for PC(windows application)?3. what I understand from documentation is we able to utilize ble module only if our application is IOT based ? is it correct?4. Final question, does ATWINC3400 help me with my application that I explained above?Please guide me to right way to do my task. Thanks in advance smileyRegards,Mathan Jeeva

author: jnz
author_rank: Frequent Contributor
timestamp: November 28, 2020, 05:16:49 pm
content: Yikes dude. You have some reading to do before you come here with that.Go read about BLE. You almost certainly want low energy and not classic. You probably want to read about GATT data transfer. I would recommend the topic of pub/sub messaging because BLE works best with “notifications” which leads you to an event based pub/sub system. Your follow-up questions will be about how to transfer more than 20 bytes of data in BLE4 or 185-247 in BLE5 to which there are lots of answers.If that is all already above your head; I would consider a BLE module that converts UART to BLE for you and not plan on programming your own BLE CPU.

author: abyrvalg
author_rank: Frequent Contributor
timestamp: November 30, 2020, 10:39:45 am
content: If the power consumption is not critical (not running from batteries) - go for classic Bluetooth SPP (Serial Port Profile). This will save a lot of time on PC side (it will show up as a normal COM port). There are easy to use modules like HC-05 / HC-06 - you hook it to UART and it “just works”.

author: JPortici
author_rank: Super Contributor
timestamp: November 30, 2020, 12:16:30 pm
content: I've given up in trying to add ble support to my things under windows. The thing's just too damn quirky and could work or not depending on what ble chipset (and drivers) you have. Things that "just work" on any mobile platformI second the classic bluetooth + SPP

author: Renate
author_rank: Super Contributor
timestamp: November 30, 2020, 06:35:51 pm
content: Well, the Bluetooth spec is only about 2700 pages. Need a good read?It seems that serial port protocol is the typical thing people reach for.Although, unstructured serial is so boring.I've recently being doing Android apps with BLE GATT, heart rate and an iRig Blueboard foot switches.In the USB world, I usually reach for USB HID for structured data.I've not used the HID profile in Bluetooth yet.

author: jnz
author_rank: Frequent Contributor
timestamp: December 01, 2020, 06:32:02 am
content: You guys above recommending BT Classic over BLE are assuming PC host, I was assuming App/Phone host.

author: JPortici
author_rank: Super Contributor
timestamp: December 01, 2020, 10:18:59 am
content: He did mention "windows application" in the OP though

author: Refrigerator
author_rank: Super Contributor
timestamp: December 01, 2020, 10:28:23 am
content: Quote from: jnz on December 01, 2020, 06:32:02 amBT classic works fine on anything as far as i've tried.

author: abyrvalg
author_rank: Frequent Contributor
timestamp: December 03, 2020, 11:11:00 am
content: Quote from: JPortici on November 30, 2020, 12:16:30 pmExactly. We ended up buying BLED112 USB-BLE dongles for their simplified and portable API.