Trouble connecting FTDI device - visual-c++

I am trying to use the second example code for Visual C++ (http://www.ftdichip.com/Support/Soft...SSE/FTCSPI.htm) To connect to the FT2232H Mini Module. My code works and indicates no device is connected when none is. However, when i connect the board and then run the code i recieve the attached message (the device is used by another application). I am not sure why i am getting this message. Any input greatly appreciated.

The FT2232 has two different drivers. One that presents the device as a serial port and one that allows the developer to use a custom interface. Odds are that you have the Virtual Com Port (VCP) driver installed instead of the D2XX driver.
See: http://www.ftdichip.com/Products/ICs/FT2232H.htm

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.

Bluetooth SPP module SPP-C SPP-CA BK3211 chip - entering AT mode?

I have Bluetooth SPP module SPP-C / SPP-CA , it is cheap module that should work the same way as well known HC-06 / HC-05 modules.
I have got one problem, everything works, module is communicating over serial interface pairing etc... but i can not enter the AT mode to change device name pin or baud rate. Does anyone had the same problem and how to solve it ? there is a very small data published and sellers are not responding.
So I assume that someone may help with that situation. http://www.ebay.com/itm/Bluetooth-Module-UART-Serial-Interface-SPP-CA-works-with-YZXstudio-USB-Monitors-/201414967094 that's the module. it is based on Beken BK3211 chip.
It seems that nothing special is needed to enter command mode on the SPP-CA module I have.
Whenever you connect or disconnect by bluetooth, the module will print:
CONNECTED
.. serial data is transferred ..
+DISC:SUCCESS
When the module is disconnected, you can execute AT commands such as AT+BAUD just like with HC05 modules.
3 years later and I've looked everywhere for an answer to this question and finally stumbled upon the solution by fiddling away.
I am connecting via an FTDI module using Teraterm software to enter commands.
You need to power up the FTDI and BT modules by plugging into PC USB. open Teraterm and set up to see the COM port.
Now you have to momentarily connect GND to port 11 on the BT module to 'reset' the module. The module will power down and back up again and in doing so will enter AT mode and you should be able to communicate with the module.
Good luck
Old question however still relevant, I found the solution! It is pretty simple, you can use an breadboard and some jumper wires however you can also create an adapter like I did. Like explained in this document with AT-commands, you need another UART (serial connection) to program the SPP. The SPP must not connected to anything (discovery mode) to be able to program it.
You can do this, like I did, with another SPP or you can use serial programmer or an Arduino. Notice that the serial connection is 3V, so when using an Arduino you need some resistors (1K and 2K) to create a voltage divider (google it).
The schematic is pretty simple (when not using an Arduino), I designed this adapter:
You need these components to create the adapter (and maybe some wires):
Connect everything like in the schematic above (STATE and EN are not connected), insert the modules (take care of pin orientation!), insert an USB cable and connect it to some power source.
In Arduino IDE, select the com-port you want to configure and launch the Serial monitor, you can now enter AT-commands to configure the one that is not connected:
Done! That is pretty easy right? When you want to configure the other, disconnect the one that is connect and connect the other one. An overview of AT-commands can be found in the document in provided link above.
Hopes it helps ;-)

Teensy 2.0 / Atmega32u4 as Keyboard: Send and Receive

I'm currently working on a device which is able to work as a keyboard and communicate via Serial with a self-written software.
Now I have to install serial drivers (from Arduino) on different computers if I want to communicate with my application which I actually want to avoid.
Is there any other solution to solve this problem? Is it possible that my microcontroller works as a keyboard AND is able to send and receive data as HID device?
Thanks and greetings!
I actually do something similar with a 32u4, but it receives its serial over the built-in UART. I do this because it's linking between two separate systems. If it were only one system I could implement a 2nd interface. (Don't forget, a USB HID device must have an IN endpoint even if you are not using it.) Or you could just throw a $2 USB/TTL converter on and do it the same as I did.

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.

Unable to access bluetooth device via COM port on dell axim pda with J2ME

I'm trying to write part of a J2ME application and I'm responsible for reading NMEA data from a GPS device attached via bluetooth (to a Dell Axim X51 PDA).
I've paired the gps device with the PDA and I can run the sample program that comes with the gps device and it succesfully streams NMEA strings.
In system settings, in GPS settings, I've set up a COM port (8) for programs to use to obtain GPS data, however, when providing the details for the GPS hardware port there doesn't seem to be a matching baud rate to the one I had to use in the sample program? Does this matter? What does baud rate actually mean?
Now, as far as I understand the settings, I should now be able to read NMEA data over COM 8?
However, when I print out:
System.getProperty("microedition.commports")
COM8 does not appear in the list returned and if I try and open a connection on that port I get the following error:
java.io.IOException: GetCommState() failed; error code=21, (21) The device is not ready.
Any pointers on successfully setting up the COM port for reading, and actually reading from it would be most welcome. I'm pretty stumped and clueless as to what to do.
Don't know about that particular device, but the usual way of opening a bluetooth COM port in J2ME is using the JSR-82 API.
You would scan for devices within your vicinity, figure out which is your GPS (usually contains "GPS" in the friendly name), scan for services on that device (most GPSs only offer one), and open a BTSPP connection to that service.
There is a good chance the j2me implementation on your device doesn't support bluetooth COM ports at all. I would suggest confirming that first. It could be worth comparing the result of the system property call on other (recent) handsets.

Resources