# Bluetooth connection from Arduino to Android phone wont connect

**URL:** <https://discourse.processing.org/t/bluetooth-connection-from-arduino-to-android-phone-wont-connect/36378>\
**Category:** Electronics (Arduino, etc.)\
**Created:** [April 16, 2022, 12:21pm UTC](https://discourse.processing.org/t/bluetooth-connection-from-arduino-to-android-phone-wont-connect/36378 "2022-04-16T12:21:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![KrisNielsen](https://avatars.discourse-cdn.com/v4/letter/k/f4b2a3/32.png) [@KrisNielsen](https://discourse.processing.org/u/KrisNielsen)\
**Post date:** [April 16, 2022, 12:21pm UTC](https://discourse.processing.org/t/bluetooth-connection-from-arduino-to-android-phone-wont-connect/36378/1 "2022-04-16T12:21:26Z")

</div>

Hello. I am working on an that will recieve data over bluetooth from an arduino. The problem is that i can not connect the bluetooth moduel to my phone. I am using the MLT-BT05, I can comunicate with the moduel from the arduino no problem, but i can not pair it with my android phone. I am using the OnePlus9. When I try to pair the device, the BT05 shows up under bluetooth devices on the phone, but when i try to connect its unable to pair the two devices. I have made sure trough AT commands that the BT05 is set to slave mode, and I have checked the PIN for the device to be 123456. I can connect to the device using other Apps like BlueLight and Serial Bluetooth Terminal. I have tried to connect to the device using Ketai libray but that does not work either. Here is the code from the App

import android.content.Intent;  
import android.os.Bundle;  
import ketai.net.bluetooth._;  
import ketai.ui._;  
import [ketai.net](http://ketai.net).\*;

KetaiBluetooth bt;  
String info = “”;  
KetaiList klist;

ArrayList devicesDiscovered = new ArrayList();  
boolean isConfiguring = true;

void onCreate(Bundle savedInstanceState) {  
super.onCreate(savedInstanceState);  
bt = new KetaiBluetooth(this);  
}

void onActivityResult(int requestCode, int resultCode, Intent data) {  
bt.onActivityResult(requestCode, resultCode, data);  
}

void setup() {  
orientation(PORTRAIT);  
background(0);  
stroke(255);  
textSize(25);  
textAlign(CENTER);  
bt.start();  
println(bt.getAddress());  
}

void draw() {  
background(0);  
if (!bt.isDiscovering() && isConfiguring == true) bt.discoverDevices();

if (bt.getDiscoveredDeviceNames().size() \> 0 && isConfiguring == true) {  
ArrayList devices = bt.getDiscoveredDeviceNames();  
for (int i = 0; i \< devices.size(); i++) {  
info += “[”+i+"] "+devices.get(i).toString() + “\n”;  
}  
println(info);  
text(info, width/2, height/2);  
info = “”;  
delay(500);  
bt.connectToDeviceByName(“BT05”);  
}

Is there any one out there with some tips to how i can read data from the bluetooth. Because when i connect to the device using any of the two listet Apps i can se the data I am sending from the BT05 and it can recive what i send from the App. But i need a way to get the data in to my Processing App.

---

<div class="post-metadata">

**Author:** ![jafal](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jafal/32/19112_2.png) [@jafal](https://discourse.processing.org/u/jafal)\
**Post date:** [April 17, 2022, 3:06pm UTC](https://discourse.processing.org/t/bluetooth-connection-from-arduino-to-android-phone-wont-connect/36378/2 "2022-04-17T15:06:01Z")

</div>

Hi

Search the forum many topics about ketai Bluetooth with working examples

---

<div class="post-metadata">

**Author:** ![jafal](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jafal/32/19112_2.png) [@jafal](https://discourse.processing.org/u/jafal)\
**Post date:** [April 17, 2022, 3:35pm UTC](https://discourse.processing.org/t/bluetooth-connection-from-arduino-to-android-phone-wont-connect/36378/3 "2022-04-17T15:35:06Z")

</div>

Try this

> [@Android Bluetooth to Arduino and vice versa](https://discourse.processing.org/t/android-bluetooth-to-arduino-and-vice-versa/26578/112):
>
> Today I have spent some time trying to plot some lines to the canvas like I’ve done before with the Ketai lib, but I found out that I can’t plot any data on my Android 10 phone. It connects and I can read the data in the console with the println() function but that’s it. So I installed the APDE version [v0.4.1 Alpha](https://github.com/Calsign/APDE/releases/tag/v0.4.1-alpha) which I used the last time for plotting and installed it on my Lollipop phone, Which worked again. But for me working with a library that can’ even transmit data to the draw() loop ma…
