Reading data from Bluetooth device

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
simon.schvartzman
Posts: 641
Joined: Tue Jul 29, 2014 12:52 am
Location: Brazil

Reading data from Bluetooth device

Post by simon.schvartzman » Wed Apr 03, 2024 4:11 pm

Hi all, is there any way to read the data being sent from a Bluetooth device properly paired to the device where Livecode is running?

Suppose I have a BT device properly paired to my device and I want to read all the data received, can I do that? How?

Many thanks in advance

Regards, Simon
Simon
________________________________________
To ";" or not to ";" that is the question

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9670
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Reading data from Bluetooth device

Post by dunbarx » Wed Apr 03, 2024 5:15 pm

There is a function "mergNICisBluetoothConnected()" that determines whether a bluetooth device is connected at all. Beyond that, when you say:
any way to read the data being sent from a Bluetooth device
how do you mean that? Whatever comes over via bluetooth has to end up somewhere, and isn't that the first, best (and only?) place to read from?

Craig

simon.schvartzman
Posts: 641
Joined: Tue Jul 29, 2014 12:52 am
Location: Brazil

Re: Reading data from Bluetooth device

Post by simon.schvartzman » Wed Apr 03, 2024 5:59 pm

Thanks @craig, many thanks for your answer:

Reading the dictionary I understand mergNICisBluetoothConnected() the function returns if BT is connected, nothing else, right?

What I would like to do is the following:

If device is connected put everything the device has sent into a variable.

Is is possible?

Regards, Simon
Simon
________________________________________
To ";" or not to ";" that is the question

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9670
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Reading data from Bluetooth device

Post by dunbarx » Wed Apr 03, 2024 6:33 pm

Simon,
nothing else, right?
Seems so.

I am the wrong person to even speak here, since I do not do mobile. But, again, I do not think that bluetooth is the issue. Whatever mobile app you have created must query and read from some dataset in some app on your phone. How that source gets its data via bluetooth I do not know, and do not think it matters. In other words, if you typed some stuff somewhere on your phone you could have your app find it and read it. If you get your stuff via bluetooth from something else, ultimately the same process must proceed.

I think.

Somebody please help this guy...

Craig
Last edited by dunbarx on Wed Apr 03, 2024 10:55 pm, edited 1 time in total.

simon.schvartzman
Posts: 641
Joined: Tue Jul 29, 2014 12:52 am
Location: Brazil

Re: Reading data from Bluetooth device

Post by simon.schvartzman » Wed Apr 03, 2024 6:54 pm

Thanks @craig, for some reason Livecode does not support BT on Android...so maybe Bluetooth has something to do

Regards,
Simon
________________________________________
To ";" or not to ";" that is the question

Post Reply

Return to “Talking LiveCode”