

To quit it, type "(CTRL + A) + :quit" Second option : connect using minicomĪnd then run sudo minicom -D /dev/rfcomm0 If you forget to run it as root, you will get an error like Aleksander got :
Show bluetooth mac in terminal emulator android commands install#
You can install it (it's always usefull anymore) by using : sudo apt-get install screen If you forget to run the program as root, you may have an error : stty: /dev/rfcomm0: Device or resource busy I describe here several programs that can do that (so that you can choose depending on your need or on what is installed on your system for example). There are several ways to write on the file, but note that all ways to proceed involve root. Third and last step : write into the /dev/rfcomm0 Note that if you try to write on the input of rfcom, nothing happened. Indeed, even if you close with Ctrl+C the program, it still run in background. Provide a usable file /dev/rfcomm0įirstly, be sure that you didn't run any rfcomm command before. You do not need to connect, so you can now quit bluetoothctl by typing Ctrl + D. You will be asked to type a PIN, by default it's 1234 on my HC-05 device. Then, you just need to pair the device like this : # pair

Now we enable the scan mode to find our device and be able to pair it : # scan onĪfter a few seconds the MAC of your device should appear. We now start the agent that will "remember the pin" for rfcomm : # agent on Run : sudo bluetoothctlīe sure that the bluetooth device is started : # power on First, let us pair the device from command line. Here is the command line way to proceed that worked for me. I tried to setup from GUI the pairing, but it wasn't working. First step : pair the device and provide the PIN I've tested it with a baud 9600 rate setup on the HC-05 device. It does not need to write a file like in Brian's answer, but the idea is similar. Here is my way to proceed to connect to a HC-05 bluetooth device plugged on my arduino.
