Active1 year, 3 months ago
- Bluetooth Serial Port Service
- Bluetooth Serial Port Profile
- Serial Bluetooth Adapter
- Bluetooth Serial Port Profile
- Bluetooth Serial Port Software
- Bluetooth Serial Port Protocol
Backstory:
So I have an HM10 (Bluetooth module) that is connected to my arduino. I have verified the connection with my phone by connecting to it and reading some packets so I am certain the connection to the arduino is solid. I have a usb Bluetooth module that is connected to my computer that has Windows 10 on it. I went into the settings on Windows, found the HM10, and connected to it no problem. It shows up as 'connected' under my devices. So the last part of the setup is to make the HM10 show up as a COM port. I have followed the instructions that many sites say:
- Open Bluetooth Devices.Note From the Windows desktop, navigate: Start > (Settings) > Control Panel > (Network and Internet) > Bluetooth Devices.Note If using Windows 8/10, navigate: Right-click Start > Control Panel > In the search box, enter 'Bluetooth' then select Change Bluetooth settings.
- From the COM Ports tab, click Add.
- Ensure that 'Incoming (device initiates the connection)' is selected then click OK.
- Click OK.
See how it is shown as connected in the bluetooth window:
Also see how it does show up in device manager:
Solu ® Xbee Bluetooth USB to Serial Port Arduino Bee Adapter Adapter Ft232rl with Wire/arduon Pro Mini Btbee Bluetooth Bee USB to Serial Port Xbee Adapter Module. 3.4 out of 5 stars 9. Get it as soon as Tomorrow, Jun 12. FREE Shipping on orders over $25 shipped by Amazon. HiLetgo HC-05 Wireless Bluetooth RF Transceiver Master Slave Integrated Bluetooth Module 6 Pin Wireless Serial Port Communication BT Module for Arduino. 4.2 out of 5 stars 45. Get it as soon as Tue, Sep 24. FREE Shipping on orders over $25 shipped by Amazon. Wireless RS232 Adapter. Apr 28, 2016 Recently I have been using a HC 05 Bluetooth module connected to an Arduino and have found it incredibly useful. You can easily connect it to an Arduino serial port and use Bluetooth to communicate with the Arduino as if it were connected through serial USB to a computer.
Problem:
The problem that I have is even though my HM10 shows up in the valid Bluetooth devices under device manager, it does not show up in the list after I click 'Incoming'. The list is simply blank. Is there something I am missing to make it show up in this list?
Making a bluetooth device recognized as a COM port? HM-11 do not have the 'Standard Serial over Bluetooth link' function like HC-05 module, if anybody know how to. The Bluetooth device needs to be setup to use a COM port. In order to do this open up the Bluetooth settings and press the More Bluetooth Options link at the bottom. In the Bluetooth Settings dialog switch to the COM Ports tab and then press the Add button. There are a number of bluetooth terminal application for android. I chose Serial Bluetooth Terminal. Connect the app to the HC-05 module. The module’s status LED should now be steadily on. Now we will write a sketch that accepts a character from the serial port (where the HC-05 is connected) and change the state of the LED based on that.
Does not show up in this list!
Eric F
Eric FEric F2,97055 gold badges1717 silver badges3232 bronze badges
2 Answers
I figured out that the problem is HM-10 and HM-11 do not have the 'Standard Serial over Bluetooth link' function like HC-05 module, if anybody know how to add that function to it, it might work!
if you have HC-05 bluetooth module, you can use it as direct UART connection to your computer without problem.
To open the hardware funtions windows: Control panel > Hardware and Sound > Devices and Printers > double click on the bluetooth device > choose Hardware tab.
maisonsmdmaisonsmd
I was unable to directly figure out the problem however went a different route altogether. Since the goal of this question was to connect my Arduino to my computer wirelessly, I decided to use RF transmission instead of bluetooth. Google cloud connect for microsoft office free download. In doing this I purchased the following:
I believe that my biggest issue was that I did not have the USB to UART converter. This also may have been the reason my bluetooth modules didn't work as they were simply transcievers as well without the usb to UART converter. Either way, if someone else is trying to have wireless communication between an Arduino and a Windows based computer, I would suggest the RF method instead.
Eric FEric F2,97055 gold badges1717 silver badges3232 bronze badges
Not the answer you're looking for? Browse other questions tagged windows-10bluetooth or ask your own question.
This node module lets you communicate over Bluetooth serial port with devices using Node.js. The goal is have an easy to use API. This module is great for communicating with Bluetooth enabled Arduino devices.
If you have any problems make sure to checkout the FAQ.
New in the last release
- Adds support for node v12
- Node v6 and v7 are no longer supported
Check the release notes for an overview of the change history.
Prerequisites on Linux
- Needs Bluetooth development packages to build
apt-get install build-essential libbluetooth-dev
Note on RFCOMM Server Sockets
As the initial implementation of the RFCOMM server sockets is based on BlueZ4, in order to work with SDP we need to change the bluetoothd service configuration file by modifing the systemd unit file: bluetooth.service:
(Debian based distro)
sudo vim /lib/systemd/system/bluetooth.service
Bluetooth Serial Port Service
(RedHat based distro)
sudo vim /usr/lib/systemd/system/bluetooth.service
and adding the --compat flag to the ExecStart value:
ExecStart=/usr/lib/bluetooth/bluetoothd
--compat
Finally, restart the service:
Bluetooth Serial Port Profile
Prerequisites on macOS
- Needs Xcode and Xcode command line tools installed.
Prerequisites on Windows
- Needs Visual Studio (Visual C++) and its command line tools installed.
- Needs Python 2.x installed and accessible from the command line path.
Install
npm install bluetooth-serial-port
Test build Linux using docker
docker build -t bluetooth-serial-port .
Basic client usage
Basic server usage (only on Linux)
API
BluetoothSerialPort
Event: ('data', buffer)
Emitted when data is read from the serial port connection.
- buffer - the data that was read into a Buffer object.
Event: ('closed')
Emitted when a connection was closed either by the user (i.e. calling
close
or remotely).Event: ('failure', err)
Emitted when reading from the serial port connection results in an error. The connection is closed.
- err - an Error object describing the failure.
Event: ('found', address, name)
Emitted when a bluetooth device was found.
- address - the address of the device
- name - the name of the device (or the address if the name is unavailable)
Event: ('finished')
Emitted when the device inquiry execution did finish.
BluetoothSerialPort.inquire()
Starts searching for bluetooth devices. When a device is found a 'found' event will be emitted.
BluetoothSerialPort.inquireSync()
Starts searching synchronously for bluetooth devices. When a device is found a 'found' event will be emitted.
BluetoothSerialPort.findSerialPortChannel(address, callback[, errorCallback])
Checks if a device has a serial port service running and if it is found it passes the channel id to use for the RFCOMM connection.
- callback(channel) - called when finished looking for a serial port on the device.
- errorCallback - called the search finished but no serial port channel was found on the device.Connects to a remote bluetooth device.
- bluetoothAddress - the address of the remote Bluetooth device.
- channel - the channel to connect to.
- [successCallback] - called when a connection has been established.
- [errorCallback(err)] - called when the connection attempt results in an error. The parameter is an Error object.
BluetoothSerialPort.close()
Closes the connection.
BluetoothSerialPort.isOpen()
Check whether the connection is open or not.
BluetoothSerialPort.write(buffer, callback)
Writes a Buffer to the serial port connection.
- buffer - the Buffer to be written.
- callback(err, bytesWritten) - is called when the write action has been completed. When the
err
parameter is set an error has occured, in that caseerr
is an Error object. Whenerr
is not set the write action was successful andbytesWritten
contains the amount of bytes that is written to the connection.
BluetoothSerialPort.listPairedDevices(callback)
NOT AVAILABLE ON LINUX
Lists the devices that are currently paired with the host.
- callback(pairedDevices) - is called when the paired devices object has been populated. See the pull request for more information on the
pairedDevices
object.
BluetoothSerialPortServer
BluetoothSerialPortServer.listen(callback[, errorCallback, options])
Listens for an incoming bluetooth connection. It will automatically advertise the server via SDP
- callback(address) - is called when a new client is connecting.
- errorCallback(err) - is called when an error occurs.
- options - An object with these properties:
- uuid - [String] The UUID of the server. If omitted the default value will be 1101 (corresponding to Serial Port Profile UUID). Can be a 16 bit or 32 bit UUID.
- channel - [Number] The RFCOMM channel the server is listening on, in the range of 1-30. If omitted the default value will be 1.Example:
var options = { uuid: 'ffffffff-ffff-ffff-ffff-fffffffffff1', channel: 10 }
BluetoothSerialPortServer.write(buffer, callback)
Writes data from a buffer to a connection.
- buffer - the buffer to send over the connection.
- callback(err, len) - called when the data is send or an error did occur.
error
contains the error is appropriated.len
has the number of bytes that were written to the connection.
BluetoothSerialPortServer.close()
Stops the server.
BluetoothSerialPortServer.disconnectClient()
Disconnects the currently-connected client and re-listens and re-publishes to SDP.
BluetoothSerialPortServer.isOpen()
Serial Bluetooth Adapter
Checks is a server is listening or not.
Event: ('data', buffer)
Emitted when data is read from the serial port connection.
- buffer - the data that was read into a Buffer object.
Event: ('disconnected')
Bluetooth Serial Port Profile
Emitted when a connection was disconnected (i.e. from calling
disconnectClient
Tales of arabian nights game. or if the bluetooth device disconnects (turned off or goes out of range)).Event: ('closed')
Emitted when the server is closed (i.e. from calling
close
or as the result of a non-disconnect error).Bluetooth Serial Port Software
Event: ('failure', err)
Emitted when reading from the serial port connection results in an error. The connection is closed.
- err - an Error object describing the failure.
Typescript support
Bluetooth Serial Port Protocol
The type script declaration file is bundled with this module.
LICENSE
This module is available under a FreeBSD license, see the LICENSE file for details.