Write descriptor failed - HM-10 BLE - bluetooth

I have problem with HM-10 BLE module with V705 firmware. When I try to connect to the module with Bluetooth Serial Monitor app(Xiaomi Redmi 5 Plus, MIUI 11.0.2 Global, Android 8.1), I get write descriptor failed error. UUID is 0xFFE0(default). Same module works fine with V609 firmware.
Also, phone gets paired with mthe module if I use BLE Scanner app - Image on info BLE Scanner sees.
I turned on Bluetooth debbuging in Dev. options and I found this.
I'm new to Bluetooth (LE). Also, if I try to pair with the module from phone's settings, if module doesn't require PIN, then phone can't pair, but if it requires PIN, then phone can pair. Why?
Why with V705 firmware pairing doesn't work but with V609 works without any problems? All settings are untouched.
HM-10 will be used for DIY project. App for the project will be done soon, so for now I use Bluetooth Serial Monitor app to see packages from BT. Thanks for help!

Related

Bluetooth Firmware Update

I have a BLE module that i'm trying to update the firmware in, but having a lot of problems connecting the recommended update software (ISupdater). All I get is 'connect failed' message. There seems to be no troubleshooting information available, so I hope that someone has run into the same issues and solved it.
For the hardware setup, I'm connecting to a PC via a USB-USART serial adapter board. I have the 3.3V, GND, reset switch, mode switch, USART connection from the RN4870 BLE module connected as per the microchip connection diagrams (https://microchipdeveloper.com/ble:rn4870-app-example-fw-upgrade). I have verified many many many times that my connections are correct.
Connection Diagram
To test the BLE connection and data transfer I have mobile devices (iOS and Android) with the recommended apps (SmartData, mBIoT). I can see the BLE broadcast in the bluetooth lists, and I can connect to it to use the apps.
For the RN4870 module, I'm able to connect to CoolTerm software to test that I'm getting communication between the terminal and a mobile device. I'm able to send and receive data on the CoolTerm terminal, and on the mobile device apps, so that suggests to me that the USART adaptor is working correctly, and so is the BLE module.
In CoolTerm, I'm able to enter the CMD mode for the RN4870 module to set and read settings of the module, so I can check and set the baudrate to the default 115200.
If I use a BM70 module (which is the same hardware as RN4870 but different firmware), i can't enter any CMD mode, or do any sort of reset. The data is still able to be sent and received, so that confirms the baud rate is correct.
When I attempt to connect to either BLE module using the ISUpdate software that is recommended in the update steps to use as the firmware updater, I'm not able to connect to the module to update the firmware. I've tried many times to get the software to connect, many different ways, without success, and it's frustrating to no end.
I've updated the MCP2200 drivers to the latest ones from the microchip website, as well as using the latest versions of the CoolTerm and ISupdater. I've also tried previous versions, but still they all have 'connect failed'
ISupdater Image
has anyone got any solutions to the issue?
PC: Windows 10, 64-bit
BLE Modules: RN4870, BM70
CoolTerm Version: v1.8.0 (build 861)
ISUpdater Version: v4.0.0.207
IS187x_102_BLEDK3v1.11_UIv1.01 for Windows 10
Mobile Apps: SmartData, LightBlue for iOS, LightBlue for Android, mBIoT
Hmm, well it turns out that the USB-USART serial adaptor (although confirmed to be working correctly) seemed to be the problem.
At first, I only had the 1 adaptor, and I had to borrow a different adaptor. After swapping this FTDI232 USB-USART Serial adaptor, the connection was made first try, and I was able to update the firmware. I have now purchased a new adaptor.
So, if you are having the same trouble, try using a different adaptor.

MIT App Inventor Bluetooth connect with unpaired device

I am using MIT App Inventor 2 to do some bluetooth connection. I am trying to connect to my Arduino Bluetooth hc05.
I noticed that if I didn't pair my device, the app I wrote can't connect to the device.
Below is the code that I used to connect to my Bluetooth device.
Is there any way to use the code to connect with the Bluetooth device without having to pair it first?
Or is there any way to use the code to input the pairing password using MIT App Inventor 2?
The devices must be paired before being able to connect.
There is no Pairing method available in the App Inventor Bluetooth components. But you could write your own extension, which does the pairing.
More information about how to create an extension see here.
However that will be more advanced and will require some Java skills...

Communicate microcontroller with smartphone via bluetooth

I need do communicate atmega88 with a smartphone via bluetooth using a bluetooth HC-05 module. The problem is that all my atmega pins are being used. Rxd and txd pins are being used by a keypad (Keypad at PORTD). My project is almost done, at this stage i don't want to change the micro. Is there any alternative to solve this problem? Thanks
You can use Software serial library for that controller. But it is better to connect HC-05 module to default UART pins.

How to connect to Bluetooth OBD II with visual C++ and for PC

I'm trying to use a Bluetooth OBDII (on-board diagnosis) to connect with a Bluetooth dongle connected to my computer (My OS is windows 7). The dongle connects to the device and assigns it 2 virtual com ports (COM4 for incoming and COM5 for outgoing), But unfortunately I couldn't communicate with this device over the virtual com port. I also attempted to work with winsock library but I didn't find any example for working with Bluetooth OBD and send and receive the instruments. I just found one Bluetooth API for android but it's not useful for me because I want to implement it inside the visual C++ and for PC. and right now I have 2 questions about that :
1. which method is better, Virtual com port or winsock and how ?
2. Do you have any sample code for working with Bluetooth OBD ?
1: Has your device a ELM327 chip? If so, you can setup a serial port over bluetooth, and communicate with that port. I don't know winsock very much, but I think a serial port is better suited for this job.
To set it up, have a look here: http://windows.microsoft.com/en-us/windows7/choose-a-com-port-for-a-bluetooth-enabled-device
Maybe if you can pair with the device, windows 7 will automagically set it up?
2:
You might want to have a look at: http://icculus.org/obdgpslogger/
It's open-source, so you can have a peek how it works. There's also a simulator in the package, which could help you developing/testing. Mostly is Linux based, but it should give you hints where to go. There are also windows installers available for the simulator.

Bluetooth Dongle and iOS Simulator

I have bought an IOGEAR GBU521 bluetooth dongle as per the instruction on Apple's technote:
http://developer.apple.com/library/ios/#technotes/tn2295/_index.html
I have also configured it as instructed and I'm trying to get the temperaturesensor demo to work but the Bluetooth under settings never seems to turn on (keeps spinning). Looking at the console, here is what I see:
2012-11-02 4:17:08.114 PM Preferences[862]: BTM: setting discoverable status enabled
2012-11-02 4:17:08.114 PM Preferences[862]: BTM: setting connectable enabled
2012-11-02 4:17:08.115 PM Preferences[862]: BTM: enabling device scanning
2012-11-02 4:17:08.115 PM Preferences[862]: BTM: failed to start scanning with error 111
Any thoughts? I've seen people ask about this but has anyone got this approach to work?
Best,
Throw away the IOGEAR and pick up a Cirago BTA8000.
I bought the IOGEAR you mention, in addition to the Cirago BTA8000, and the MediaLink 4.0 adapter. Turns out that anything based on the Broadcom chip won't work despite my MacBook having the exact same one built in, which means the MediaLink and IOGEAR don't work. My Cirago shipment just arrived this morning, and the Bluetooth slider in the iOS Simulator flicks to "ON" in less than a second.
If you want to experiment, I'd love to hear if other non-Broadcom chips work too.
I just bought a GBU521 from amazon to upgrade the BT in my MacBook8,3
I had the same problem of it not showing up. Reading the same article you referenced (TN2295) I did a sudo nvram bluetoothHostControllerSwitchBehavior="always" which tells the system to ALWAYS switch to a bluetooth controller if one is plugged in.
The default option:
when a new HCI is connected, the built-in driver only disconnects from the built in HCI and attaches to the external HCI if the new module is not an Apple module.
I presume that because the vendor IDs matched (0xa5c) that it was not switching over to the new dongle. Setting it to always causes OSX to always switch to a new BT adapter. This is confirmed by the following statement in TN2295:
Open the System Information application to verify that the system Bluetooth driver is matched to the built-in Bluetooth host controller interface (HCI). For the Hardware->Bluetooth setting, verify that the Vendor ID is "0x5AC".
Rebooting after the nvram update and I was able to re-pair all of my devices without incident.
HOWEVER this will not work for iOS BT LE development due to the following statement in TN2295:
If the system Bluetooth controller is matched to the Bluetooth LE USB adapter, then the iOS simulator will not be able to use the external Bluetooth controller for Bluetooth LE services.
Actually, you can mod the Info.plist inside the BroadcomBluetoothHostControllerUSBTransport.kext found here:
/System/Library/Extensions/IOBluetoothFamily.kext/Contents/PlugIns/BroadcomBluetoothHostControllerUSBTransport.kext/Contents/Info.plist...
Just copy another Broadcom dictionary and modify it or use the following additon to the Info.plist. You'll need to do this as an admin (i.e. sudo nano or vi this file after making a copy of the original).
<key>Add an appropriate name here</key>
<dict>
<key>CFBundleIdentifier</key>
<string>com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport</string>
<key>IOClass</key>
<string>BroadcomBluetoothHostControllerUSBTransport</string>
<key>IOProviderClass</key>
<string>IOUSBDevice</string>
<key>idProduct</key>
<integer>8680</integer>
<key>idVendor</key>
<integer>2652</integer>
</dict>
May need to reboot after the edit. Did this on 2012 MacBook Pro, ran XCode, and it allowed access to the Bluetooth dongle in iOS Simulator!
I hope this helps!

Resources