android - changing baud rate on bluetooth SPP connection -
i have requirement collect bluetooth data remote bluetooth device @ rate of 1.15k bluetooth spp. connect remote device follows.
try { tmp = device.createrfcommsockettoservicerecord(my_uuid); } catch (ioexception e) { log.e(tag, "create() failed", e); } mmsocket = tmp; } public void run() { log.i(tag, "begin mconnectthread"); setname("connectthread"); // cancel discovery because slow down connection madapter.canceldiscovery(); // make connection bluetoothsocket try { // blocking call , return on // successful connection or exception mmsocket.connect(); } catch (ioexception e) { connectionfailed(); // close socket try { mmsocket.close(); } catch (ioexception e2) { log.e(tag, "unable close() socket during connection failure", e2); } the connection request remote device successful , can receive data @ default baud rate of 9600bps.
but when change sending baud rate on remote bluetooth adapter device 1.15kbps, application not receive packet on bluetooth. mentioned above, have tried suggestion of this post.
is there missing out? true not need in application change baud rate? rfcomm channel adjust baud rate automatically?
i using android 2.1-update1 platform.
regards, jagmeet
i found answer questions.
is true not need in application change baud rate?
answer: no, not need on client side change baud rate. rfcomm channel adjusts baud rate automatically.
Comments
Post a Comment