bluetooth

Qt and Android characteristicChanged is not emitted

*爱你&永不变心* 提交于 2020-01-15 08:12:49
问题 I have a problem with testing my application on Android platform. I have functional application on x86 architecture. This application can connect to Bluetooth LowEnergy device and communicate with it. BT device is HM-10 module - serial line. But when I try the same application, but just compiled for Android, I'm not able to receive any data back. On the other hand I can see on remote device that all data from mobile terminal are sent. What I suspect as a possible problem is that signal

send text message from PC to Mobile via bluetooth in C#

旧城冷巷雨未停 提交于 2020-01-15 07:46:18
问题 I want to send text message from PC to Mobile via bluetooth and I wrote this code private void send_text() { BluetoothRadio.PrimaryRadio.Mode = RadioMode.Discoverable; bluetoothClient = new BluetoothClient(); for (int i = 0; i < sayi; i++) { InTheHand.Net.BluetoothAddress adres = this.adres_dizisi[i]; try { bluetoothClient.Connect(new BluetoothEndPoint((BluetoothAddress)adres,service)); // in this line error // socketexception was found The requested address is not valid in its context

Thread blocking UI in android

十年热恋 提交于 2020-01-15 06:43:45
问题 I am using this sample code from the Android Bluetooth guide, found here http://developer.android.com/guide/topics/connectivity/bluetooth.html under "Connecting as a Client". private class ConnectThread extends Thread { private final BluetoothSocket mmSocket; private final BluetoothDevice mmDevice; public ConnectThread(BluetoothDevice device) { // Use a temporary object that is later assigned to mmSocket, // because mmSocket is final BluetoothSocket tmp = null; mmDevice = device; // Get a

Bluecove : restart bluetooth stack programmatically

时光怂恿深爱的人放手 提交于 2020-01-14 19:30:50
问题 I'm trying to close bluetooth service, but Bluecove has bug on Connection close method (https://code.google.com/p/bluecove/issues/detail?id=90) and I am trying to do some workaround to restart service. I think restarting bluetooth stack will solve my problem. Can I do it programmatically? I'am using microsoft bluetooth stack. 回答1: Problem solved in this way. I restart the application, but firstly shut down bluecove manually. BlueCoveImpl.shutdown(); If I only restart application, bluecove

Finding the cartesian coordinates of another smartphone?

倖福魔咒の 提交于 2020-01-14 10:28:33
问题 Considering I have two smartphones, A and B. If I am holding smartphone A, is there a way to determine the location of B in relation to myself? So if we had the situation of this image: : it would tell me B is at position (2, 1). Inventive methods like using the strength of wifi signals to get position are more then welcomed. Could I also determine if there is a wall between the two phones? 回答1: As far as I understand, both Bluetooth and Wi-Fi signals move in a radial wave in all directions -

Bluetooth on Android: StartDiscovery not working. Cannot scan devices

丶灬走出姿态 提交于 2020-01-14 06:51:11
问题 I am new to android and i am making an application with bluetooth functionalities. I am able to set the bluetooth adaptor, an fetch my own device information, but i could not use startdiscovery to discover bluetooth devices. When i start a scan it does nothing. i am using an onclicklistner to start a scan: bt.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { if (!(bluetooth.isEnabled())) { status = "Bluetooth is not Enabled."; Toast.makeText(AddUser.this,

Bluetooth on Android: StartDiscovery not working. Cannot scan devices

≯℡__Kan透↙ 提交于 2020-01-14 06:51:08
问题 I am new to android and i am making an application with bluetooth functionalities. I am able to set the bluetooth adaptor, an fetch my own device information, but i could not use startdiscovery to discover bluetooth devices. When i start a scan it does nothing. i am using an onclicklistner to start a scan: bt.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { if (!(bluetooth.isEnabled())) { status = "Bluetooth is not Enabled."; Toast.makeText(AddUser.this,

How come GetDefaultCommConfig() Doesn't Work with Bluetooth SPP Devices?

橙三吉。 提交于 2020-01-14 06:31:57
问题 I maintain an application that, amongst other things, provides a list to the user of available serial port devices on the host computer. This application makes use of the GetDefaultCommConfig() function in order to verify that devices in its list of serial port names are valid. I have received notice that my application does not work with Bluetooth serial ports. While debugging this issue today, I found that the GetDefaultCommConfig() function does not return a successful value when called

How come GetDefaultCommConfig() Doesn't Work with Bluetooth SPP Devices?

本小妞迷上赌 提交于 2020-01-14 06:31:10
问题 I maintain an application that, amongst other things, provides a list to the user of available serial port devices on the host computer. This application makes use of the GetDefaultCommConfig() function in order to verify that devices in its list of serial port names are valid. I have received notice that my application does not work with Bluetooth serial ports. While debugging this issue today, I found that the GetDefaultCommConfig() function does not return a successful value when called

Can't accept an incoming bluetooth connection unless device is discoverable

故事扮演 提交于 2020-01-14 06:19:19
问题 I've hit my wits end with this one. I have a typical BluetoothServerSocket that I'm trying to get the A&D Weight scale (UC-321PBT) to connect to. Their company has an app (myFitnessCompanion) which doesn't seem to have many connection issues, yet the scale will only connect to my app if I have the phone 'discoverable'. Mind you this is after I pair with the scale. The only key code that is really needed here is how the listener is open, beyond that it's typical Bluetooth serverSocket =