Search Results

Search found 952 results on 39 pages for 'bluetooth'.

Page 11/39 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • New Bluetooth API question

    - by Ralphz
    I have written a small app that puts my bluetooth in discoverable mode for a long time (G1 - API 1.6). I use that along with small program on windows to lock/unlock the computer if the phone is close by. Recently i try to port this app to my nexus one but it seems like i have to pop up the message every 300s to enable device to go to discoverable mode. does anyone know how i can suppress that? I'm ok with saying ok for the first time but not every 300s :)

    Read the article

  • how to programatically determine Bluetooth master/slave roles?

    - by Rich
    So in a bluetooth piconet, there is one master with upto seven slaves. The master sets the clock and frequency hop that the slaves sync with. But is there a way to determine which device is the master and which is the slave? I'm mainly interested in portable devices (Android,iPhone) but beggars can't be choosers, if anybody has info in this field I would be interested. Thanks

    Read the article

  • Midlet wake up from bluetooth connection

    - by WhiteTigerK
    Hi, I'm trying to register a midlet for push registration, in order to wake up from a bluetooth connection. The requested behavior is that the application will wake up when a car's kit (hands free) will be in the range of the device. Is it possible at all? If yes, how should it be done? Thanks in advance,

    Read the article

  • Displaying a notification when bluetooth is disconnected - Android

    - by Ryan T
    I am trying to create a program that will display a notification to the user if a Blue tooth device suddenly comes out of range from my Android device. I currently have the following code but no notification is displayed. I was wondering if it was possible I shouldn't use ACTION_ACL_DISCONNECTED because I believe the bluetooth stack would be expecting packets that state a disconnect is requested. My requirements state that the bluetooth device will disconnect without warning. Thank you for any assistance! BluetoothNotification.java: //This is where the notification is created. import android.app.Activity; import android.app.Notification; import android.app.NotificationManager; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.app.Activity; import android.app.Notification; import android.app.NotificationManager; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; import android.os.Bundle; public class BluetoothNotification extends Activity { public static final int NOTIFICATION_ID = 1; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); /** Define configuration for our notification */ int icon = R.drawable.logo; CharSequence tickerText = "This is a sample notification"; long when = System.currentTimeMillis(); Context context = getApplicationContext(); CharSequence contentTitle = "Sample notification"; CharSequence contentText = "This notification has been generated as a result of BT Disconnecting"; Intent notificationIntent = new Intent(this, BluetoothNotification.class); PendingIntent contentIntent = PendingIntent.getActivity(this, 0, notificationIntent, 0); /** Initialize the Notification using the above configuration */ final Notification notification = new Notification(icon, tickerText, when); notification.setLatestEventInfo(context, contentTitle, contentText, contentIntent); /** Retrieve reference from NotificationManager */ String ns = Context.NOTIFICATION_SERVICE; final NotificationManager mNotificationManager = (NotificationManager) getSystemService(ns); mNotificationManager.notify(NOTIFICATION_ID, notification); finish(); } } Snippet from OnCreate: //Located in Controls.java IntentFilter filter1 = new IntentFilter(BluetoothDevice.ACTION_ACL_DISCONNECTED); this.registerReceiver(mReceiver, filter1); Snippet from Controls.java: private final BroadcastReceiver mReceiver = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { String action = intent.getAction(); BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE); if (BluetoothDevice.ACTION_ACL_DISCONNECTED.equals(action)) { //Device has disconnected NotificationManager nm = (NotificationManager) getSystemService(NOTIFICATION_SERVICE); } } };

    Read the article

  • Bluetooth communications with C#

    - by Abdulaziz
    hello, I want to write 2 programs with C# one work on PC, the other work on a windows mobile phone. So I want the PC program to send a signal via Bluetooth ( 1 byte maybe) to the windows mobile phone. and the mobile program (which work on background) handles and accepts this byte without the need of pairing. how to code this? please I need any kind of help.

    Read the article

  • turn on bluetooth in pocket pc VS-c++

    - by baash05
    I'm attempting to turn on the bluetooth network of a Janam (wince5.0) I understand it involves ndisuio, but I'm not sure how to invoke it. I assume it will involve the use of a standard DLL or api call, how can I find out what that call would be?

    Read the article

  • Bluetooth support on Android Emulator

    - by John
    Hi everyone! I wanna know if the developer team wich made the emulator have some information to make bluetooth works in the android emulator, indicate some links about it, if they have some date for release or if they'll make it works in the future. Thanks.

    Read the article

  • Combination USB Drive / Bluetooth Adapter Device

    - by ghawkes
    I am looking for a combination USB device that is both a flash drive and a Bluetooth adapter. Has anyone seen an item like this available recently? I found some old articles circa 2004 but could not find anything current. Could anyone recommend a company or service that could help me find an item like this? Thank you, - G

    Read the article

  • Using External GPS Device w/ Android via Bluetooth

    - by jeremynealbrown
    Hello, I am writing an Android 2.0 application that is going to be used in a somewhat remote location. There will be no internet connection available and it will be used outside of the U.S. I am considering the option of using an external Nokia or similar GPS device as a receiver/transmitter and connecting to it for use in my application via the bluetooth API. I am looking for opinions on whether or not this is even possible, if anyone has attempted it or if someone has a suggestion for some other external device or approach that would be more fitting. Link to possible external GPS device: http://europe.nokia.com/find-products/accessories/all-accessories/navigation/gps-modules/nokia-gps-module-ld-3w Thanks in advance...

    Read the article

  • Bluetooth -> service discovery failed

    - by Kaiser
    Hello, I'm writing an application which is able to communicate with my PC. I have used the Bluetooth functionalities of the SDK 2.1. I can find devices, get their MAC address, create a RFCOMM socket, but when I start the connection, I get the following error message : Service discovery failed. 1)Is it because of the UUID which is not the same on my application and on my PC ? 2)How can I get the correct UUID on my PC ? If I write a such application, is my Nexus one the client or the server ? Thanks a lot for your help !

    Read the article

  • iPhone Development with Bluetooth SPP OS 3/4

    - by nigel-jewell
    Hi all, I am in the process of developing an iPhone application that communicates with a number of Bluetooth devices that all support Serial Port Profile - well I assume that it is SPP as they show on my MacBook as Serial Port DevB etc. I understand that iPhone OS 3.x does not support SPP - is that correct? Does anyone know if that has been "fixed" in OS 4? I've seen reports of OS 4 supporting keyboards, but is that a locked version of HID, or will SPP be available via the SDK? Kind Regards, Nige.

    Read the article

  • Getting list of bluetooth devices nearby on iphone sdk

    - by Michael Cindric
    Hi Guys, I need to be able to search for all bluetooth devices nearby and just get there ids. I don't need to pair at all. I am using iphone 2.3 beta. Is this possible l have tried using GameKit and no luck does anyone know how to do this. BOOL result = NO; if (!session) { session = [[GKSession alloc] initWithSessionID:@"SCANNER" displayName:nil sessionMode:GKSessionModePeer]; self.session.delegate = self; [self.session setDataReceiveHandler:self withContext:nil]; self.session.available = YES; result = YES; } it dies on [self.session setDataReceiveHandler:self withContext:nil]; with the following error Scanner[42754:207] Error: 30500 -- Invalid parameter for -setDataReceiveHandler:withContext:. then ~ DNSServiceRegister callback: Ref=471fa40, Flags=2, ErrorType=0 name=00rusor1A..iPhone Simulator regtype=_q1eu29voete9jf._udp. domain=local.

    Read the article

  • Using my cell phone as remote control for PC via Bluetooth/Java

    - by Jan Kuboschek
    I've got a PC and a Samsung Eternity (that's a cell phone). I'd like to use my Eternity as remote control for my PC. Here's how I think I have to go about it: Write a desktop app (server) that accepts a connection from my cell. Write an app (client) for my cell through which I can establish a connection to the server and send commands to it. The server then executes the commands (e.g. adjust volume, pause/resume movie) Thoughts on that? Spot on or way off? Regarding the Eternity: What's a good way to get started with that? I'm guessing that I'll have to get the SDK. Does anyone have a good place to start/tutorial for that? Regarding the server: Does Java come with Bluetooth connectivity straight out of the box or do I need to fetch a library for that from somewhere? If so, from where? All help is much appreciated :)

    Read the article

  • GameKit Bluetooth Transfer Problem

    - by David Schiefer
    Hi, I am trying to send a file via Bluetooth using the GameKit framework. The problem I am having though is that I can only send one NSData object at a time, but I need to save it on the other end. this obviously isn't possible without knowing the filename, but i don't know how to transmit that. I've tried to convert it to a string NSData*data = [NSData dataWithContentsOfFile:urlAddress]; but i can only send one NSData object, not two. Has anyone come across this problem yet?

    Read the article

  • JavaMe Bluetooth service registration

    - by NoGlue
    Hello, I am trying to develope an application that offers a service via bluetooth. Everything works fine in the emulator but as soon I install it on a real device (6120/X6 Nokia) the service cannot be found. If I search for already registered services such as OBEX they are found. So I think it has something to do with the registration. This is how I register the service, all of this happens in its own thread. try { LocalDevice.getLocalDevice().setDiscoverable(DiscoveryAgent.GIAC); } catch (BluetoothStateException e) { } try { notifier = (StreamConnectionNotifier) Connector.open(m_url); ServiceRecord sr = local.getRecord(notifier); StreamConnection conn = notifier.acceptAndOpen(); } catch (IOException e) { } And this is what m_url looks like: "btspp://localhost:" + 0x1116 + ";name=BlueMatch"; Thanks for your time. Best regards

    Read the article

  • Why is /dev/rfcomm0 giving PySerial problems?

    - by Travis G.
    I am connecting my Ubuntu box to a wireless readout setup over Bluetooth. I wrote a Python script to send the serial information through /dev/rfcomm0. The script connects fine and works for a few minutes, but then Python will start using 100% CPU and the messages stop flowing through. I can open rfcomm0 in a serial terminal and communicate through it by hand just fine. When I open it through a terminal it seems to work indefinitely. Also, I can swap the Bluetooth receiver for a USB cable, and change the port to /dev/ttyUSB0, and I don't get any problems over time. It seems either I'm doing something wrong with rfcomm0 or PySerial doesn't handle it well. Here's the script: import psutil import serial import string import time sampleTime = 1 numSamples = 5 lastTemp = 0 TEMP_CHAR = 't' USAGE_CHAR = 'u' SENSOR_NAME = 'TC0D' gauges = serial.Serial() gauges.port = '/dev/rfcomm0' gauges.baudrate = 9600 gauges.parity = 'N' gauges.writeTimeout = 0 gauges.open() print("Connected to " + gauges.portstr) filename = '/sys/bus/platform/devices/applesmc.768/temp2_input' def parseSensorsOutputLinux(output): return int(round(float(output) / 1000)) while(1): usage = psutil.cpu_percent(interval=sampleTime) gauges.write(USAGE_CHAR) gauges.write(chr(int(usage))) #write the first byte #print("Wrote usage: " + str(int(usage))) sensorFile = open(filename) temp = parseSensorsOutputLinux(sensorFile.read()) gauges.write(TEMP_CHAR) gauges.write(chr(temp)) #print("Wrote temp: " + str(temp)) Any thoughts? Thanks. EDIT: Here is the revised code, using Python-BlueZ instead of PySerial: import psutil import serial import string import time import bluetooth sampleTime = 1 numSamples = 5 lastTemp = 0 TEMP_CHAR = 't' USAGE_CHAR = 'u' SENSOR_NAME = 'TC0D' #gauges = serial.Serial() #gauges.port = '/dev/rfcomm0' #gauges.baudrate = 9600 #gauges.parity = 'N' #gauges.writeTimeout = 0 #gauges.open() gaugeSocket = bluetooth.BluetoothSocket(bluetooth.RFCOMM) gaugeSocket.connect(('00:06:66:42:22:96', 1)) filename = '/sys/bus/platform/devices/applesmc.768/temp2_input' def parseSensorsOutputLinux(output): return int(round(float(output) / 1000)) while(1): usage = psutil.cpu_percent(interval=sampleTime) #gauges.write(USAGE_CHAR) gaugeSocket.send(USAGE_CHAR) #gauges.write(chr(int(usage))) #write the first byte gaugeSocket.send(chr(int(usage))) #print("Wrote usage: " + str(int(usage))) sensorFile = open(filename) temp = parseSensorsOutputLinux(sensorFile.read()) #gauges.write(TEMP_CHAR) gaugeSocket.send(TEMP_CHAR) #gauges.write(chr(temp)) gaugeSocket.send(chr(temp)) #print("Wrote temp: " + str(temp)) It seems either Ubuntu must be closing /dev/rfcomm0 after a certain time or my Bluetooth receiver is messing things up. Even when the BluetoothError arises, the "connected" light on the receiver stays illuminated, and it is not until I power-cycle to receiver that I can reconnect. I'm not sure how to approach this problem. It's odd that the connection would work fine for a few minutes (seemingly a random amount of time) and then seize up. In case it helps, the Bluetooth receiver is a BlueSmirf Silver from Sparkfun. Do I need to be trying to maintain the connection from the receiver end or something?

    Read the article

  • Android Bluetooth Fails to Pair

    - by CaseyB
    I am having a problem getting my devices to pair in Android. If I go into the settings and pair them manually I can get them to connect using the following code: Server // Make sure the device it discoverable mServerSocket = mAdapter.listenUsingRfcommWithServiceRecord("Moo Productions Bluetooth Server", mUUID); mState = State.ACCEPTING; BluetoothSocket socket = mServerSocket.accept(); mServerSocket.close(); connected(socket); Client Set<BluetoothDevice> pairedDevices = mAdapter.getBondedDevices(); BluetoothSocket socket = null; // Search the list of paired devices for the right one for(BluetoothDevice device : pairedDevices) { try { mState = State.SEARCHING; socket = device.createRfcommSocketToServiceRecord(mUUID); mState = State.CONNECTING; socket.connect(); connected(socket); break; } catch (IOException e) { socket = null; continue; } } But if the devices hadn't already been paired it gets out of the foreach without connecting to a valid socket. In that case I start discovering. // If that didn't work, discover if(socket == null) { mState = State.SEARCHING; mReceiver = new SocketReceiver(); mContext.registerReceiver(mReceiver, new IntentFilter(BluetoothDevice.ACTION_FOUND)); mAdapter.startDiscovery(); } // ... Later ... private class SocketReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { if(BluetoothDevice.ACTION_FOUND.equals(intent.getAction())) { try { // Get the device and try to open a socket BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE); BluetoothSocket socket = device.createRfcommSocketToServiceRecord(mUUID); mState = State.CONNECTING; socket.connect(); // This is our boy, so stop looking mAdapter.cancelDiscovery(); mContext.unregisterReceiver(mReceiver); connected(socket); } catch (IOException ioe) { ioe.printStackTrace(); } } } } But it will never find the other device. I never get a pairing dialog and when I step through I see that it discovers the correct device, but it fails to connect with this exception java.io.IOException: Service discovery failed. Any ideas as to what I'm missing?

    Read the article

  • Bluetooth service problem

    - by hara
    hi I need to create a custom bluetooth service and I have to develop it using c++. I read a lot of examples but I didn't success in publishing a new service with a custom UUID. I need to specify a UUID in order to be able to connect to the service from an android app. This is what i wrote: GUID service_UUID = { /* 00000003-0000-1000-8000-00805F9B34FB */ 0x00000003, 0x0000, 0x1000, {0x80, 0x00, 0x00, 0x80, 0x5F, 0x9B, 0x34, 0xFB} }; SOCKET s, s2; SOCKADDR_BTH sab if (WSAStartup(MAKEWORD(2, 2), &wsd) != 0) return 1; printf("installing a new service\n"); s = socket(AF_BTH, SOCK_STREAM, BTHPROTO_RFCOMM); if (s == INVALID_SOCKET) { printf ("Socket creation failed, error %d\n", WSAGetLastError()); return 1; } memset (&sab, 0, sizeof(sab)); sab.addressFamily = AF_BTH; sab.port = BT_PORT_ANY; sab.serviceClassId = service_UUID; if (0 != bind(s, (SOCKADDR *) &sab, sizeof(sab))) { printf ("bind() failed with error code %d\n", WSAGetLastError()); closesocket (s); return 1; } int result=sizeof(sab); getsockname(s,(SOCKADDR *) &sab, &result ); printSOCKADDR_BTH(sab); if(listen (s, 5) == 0) printf("listen() is OK! Listening for connection... :)\n"); else printf("listen() failed with error code %d\n", WSAGetLastError()); printf("waiting connection"); for ( ; ; ) { int ilen = sizeof(sab2); s2 = accept (s, (SOCKADDR *)&sab2, &ilen); printf ("accepted"); } if(closesocket(s) == 0) printf("closesocket() pretty fine!\n"); if(WSACleanup () == 0) printf("WSACleanup() is OK!\n"); return 0; When i print the SOCKADDR_BTH structure retrieved with get getsockname i get an UUID that is not the mine. Furthermore if i use the UUID read from getsockname to connect the Android application the connection fails with this exception: java.io.IOException: Service discovery failed Could you help me?? Thanks!

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >