I'm trying to use a bluetooth module, but I'm stuck at connecting/configuring it.
When powered, the module blinks an led connected to PIO5 once per second, so it is in Discoverable/Inquiring/Idle according to "7.3 LED Status" of the user manual.
When I view the properties of the device on my laptop, it shows its using COM6.
Bluetooth Settings shows the device using two ports: COM6 and COM7.
Device Manager shows COM6 and 7 for serial over bluetooth.
My first question is why there are two ports being used; one for outgoing and one for incoming. I did not expect to see separate ports for incoming and outgoing.
I attempt to connect to the device from my laptop with PuTTY over COM6 using the settings documented in 3.2 and 3.3 of the user manual.
The LED stops blinking, but that behavior isn't documented.
PuTTY 's session window is empty and doesn't allow me to type/send characters, even after hitting enter a dozen times.
Am I doing something wrong?
Should I have a second session open on COM7?
Best Answer
A bit of background first: the distinction between incoming and outgoing RFCOMM (Bluetooth stack protocol for virtual COMs) ports is necessary because it's always one of the communicating devices that initiates the connection (a bit similar to TCP sockets - where you have server and client).
Once the connection is opened it is bidirectional, regardless of the type.
That said, this Bluetooth module supports both master and slave mode (see manual chapter 2), that's why it advertises 2 RFCOMM/SPP ports, I guess. If you want PC to initiate the connection, use COM6, otherwise use COM7.
Why you see no echo in PuTTY? By default there's no local echo, and you actually shouldn't see any characters you type (unless you short UART_RX to UART_TX, or have some real device attached there to communicate with). The module itself is transparent (in the data mode, that is).
Also, baud rate etc. shouldn't really matter for Blueooth connection - note, that chapter 3.2 refers to configuring the device via physical serial port (UART_RX/TX pins, i.e. from the device side), while 3.3 describes configuring over virtual port (i.e. from the PC side). I somehow feel you're confusing the module sides ;)
This excerpt from the manual is quite important:
Cool module, btw!