P pgargom Member Licensed User Longtime User Jan 7, 2014 #1 Hi Erel, i have a doubt about use of Bluetooth. i want to implement an app to send data to devices but implement only 1 side of the conection. I use "serial1.Connect3(Address,11)" to connect with my device. My question is, how i can to send a photo to the other devices when i am conected? Can i use syncstreams or not? Thank you !!
Hi Erel, i have a doubt about use of Bluetooth. i want to implement an app to send data to devices but implement only 1 side of the conection. I use "serial1.Connect3(Address,11)" to connect with my device. My question is, how i can to send a photo to the other devices when i am conected? Can i use syncstreams or not? Thank you !!
Erel B4X founder Staff member Licensed User Longtime User Jan 7, 2014 #2 You can use AsyncStreams in standard (not prefix) mode to communicate with any Bluetooth device that supports the SPP profile (serial port profile). I guess that you are looking for a different profile. Other profiles are handled by the OS. Upvote 0
You can use AsyncStreams in standard (not prefix) mode to communicate with any Bluetooth device that supports the SPP profile (serial port profile). I guess that you are looking for a different profile. Other profiles are handled by the OS.
P pgargom Member Licensed User Longtime User Jan 8, 2014 #3 Then, if im using the code of BTAutoPair (http://www.b4x.com/android/forum/threads/btautopair-programmatic-bluetooth-device-bonding.25675), and in the BtSerial_Connected event i put the next, it would be to send data to the other device? Code: Copy AStreams.Initialize(Null,BtSerial.OutputStream,"AStreams") Dim buffer() As Byte buffer = "This is an example".GetBytes("UTF8") AStreams.Write(buffer) Because i am using this code and i cant send data to other devices. However, if i use the example of BluetoothIntent ( http://www.b4x.com/android/forum/threads/send-text-file-using-bluetooth.35683/#content), i can send data to the other device, but i have to touch the tablet to select the device to send the data, and i want to send the data automatically, without touch the device. What do you think about this? is this posibble? thank you and sorry for the trouble. Upvote 0
Then, if im using the code of BTAutoPair (http://www.b4x.com/android/forum/threads/btautopair-programmatic-bluetooth-device-bonding.25675), and in the BtSerial_Connected event i put the next, it would be to send data to the other device? Code: Copy AStreams.Initialize(Null,BtSerial.OutputStream,"AStreams") Dim buffer() As Byte buffer = "This is an example".GetBytes("UTF8") AStreams.Write(buffer) Because i am using this code and i cant send data to other devices. However, if i use the example of BluetoothIntent ( http://www.b4x.com/android/forum/threads/send-text-file-using-bluetooth.35683/#content), i can send data to the other device, but i have to touch the tablet to select the device to send the data, and i want to send the data automatically, without touch the device. What do you think about this? is this posibble? thank you and sorry for the trouble.
Erel B4X founder Staff member Licensed User Longtime User Jan 8, 2014 #4 Not sure how this question is related to the previous one. If the devices are already paired then you can call Serial.GetPairedDevices and directly connect. Upvote 0
Not sure how this question is related to the previous one. If the devices are already paired then you can call Serial.GetPairedDevices and directly connect.
P pgargom Member Licensed User Longtime User Jan 9, 2014 #5 ok.. sorry.. my question is: if the devices are paired and conected, how i can to do to send data to the device? Because i try to send data with the code of the third post, but the device dont receive nothing. Upvote 0
ok.. sorry.. my question is: if the devices are paired and conected, how i can to do to send data to the device? Because i try to send data with the code of the third post, but the device dont receive nothing.
Erel B4X founder Staff member Licensed User Longtime User Jan 10, 2014 #6 See this: http://www.b4x.com/android/forum/th...nd-and-receive-files-with-asyncstreams.30493/ Upvote 0