Page 1 of 1

BLUETOOTH SPP OSX OK BUT WINDOWS PROBLEM

Posted: Fri May 18, 2012 11:55 am
by itzalak2
Hi to everybody,


I have developed an app for OSX that sends and receives data from bluetooth system through BT (as COM PORT) and it works very well but I tried the WINDOWS version in XP PC with BLUETOOTH DONGLE and I can send data but didn't receive anything.

Obviously the hardware is OK because in OSX it works well. I saw that in WINDOWS there are 2 COM PORTS fro the BT dongle, I tried:
1) using one first to send and receive through the same port (as in osx) but only sends data
2) using the second one to send and receive through the same port (as in osx) but only sends data
3) using one to send data and the other to receive data but only sends data and doesn't receive anything.

I tried the serial port example (serialtest) by Shara and it doesn't work. Didn't receive nothing.

Any idea why I can't receive data under windows?

Thanks in advance

Re: BLUETOOTH SPP OSX OK BUT WINDOWS PROBLEM

Posted: Fri May 18, 2012 12:14 pm
by Mark
There's no need to write the title of your post in all caps.

Re: BLUETOOTH SPP OSX OK BUT WINDOWS PROBLEM

Posted: Fri May 18, 2012 6:49 pm
by itzalak2
Sorry for the caps, I'm not used to write in the forums.

Re: BLUETOOTH SPP OSX OK BUT WINDOWS PROBLEM

Posted: Sat May 19, 2012 3:56 pm
by BvG
Basically, Serial is a bitch, and Bluetooth even more so, especially on legacy OSes like XP.

As far as I know, you can't use a bluetooth dongle on XP unless you have installed the correct driver, not even in serial mode.

The hard part is finding out which chip is inside your specific dongle, and then installing the correct driver. Often, the drivers are badly written, and don't work, so you also need to test different _versions_ of the correct driver. When your driver is installed, Often you also find they install 3-5 autostarting helper programs that now make your computer start several seconds slower.

When you have the correct driver, things can work, but often you can't script the bluetooth connections to start from within LC. Instead you need to start up the COM-over-Bluetooth connection with their GUI, then query the driverNames function in LC, to find out which port it is. But not all dongles have this problem.

Altho XP might show you COM ports without installing a driver, they won't work. (Note: I've heard from people that did get their COM-over-Bluetooth to run on XP without driver, but I couldn't get that to work myself.)

I've heard it's a bit easier on Vista/7, and altho you still need a driver, often the OS automatically installs a default one that works.

Re: BLUETOOTH SPP OSX OK BUT WINDOWS PROBLEM

Posted: Mon May 21, 2012 7:57 am
by itzalak2
Thanks for your answer BvG.

I have belkin bluetooth dongle with drivers for XP (CD included with the dongle). It gives me a SPP port (COM8 and COM9) and I verified that I can send data through COM9 because the other system answer to my request.

First I connect the computer with the other system with the BT GUI from manufacturer, then in LC I open the ports (COM8 and COM9) and I send data (verified) but can't "catch" the received data. In OSX it works very well with the same dongle.

I tried the same thing before with windows 7 with the same poor result.

Any idea? I'm desperate.

Thanks in advance

Re: BLUETOOTH SPP OSX OK BUT WINDOWS PROBLEM

Posted: Mon May 21, 2012 11:49 am
by LiveCodeSteve
Hi ,

Have exactly the same problem in Windows.

Tried sarah's stack and it failed.............

What is more strange is that a standalone compiled under a old version of runrev communicated with no problems via the bluetooth driver.

The device accepts data from write command and responds correctly , but the read command is empty ??

The bluetooth driver works , other software (non LiveCode) works , it's just Livecode read that fails.

What we need to understand is why it fails in recent Livecode releases.

Regards

Re: BLUETOOTH SPP OSX OK BUT WINDOWS PROBLEM

Posted: Mon May 21, 2012 11:59 am
by itzalak2
Hi LiveCodeSteve,

Could you pleas tell me witch version works to make a try?

Re: BLUETOOTH SPP OSX OK BUT WINDOWS PROBLEM

Posted: Mon May 21, 2012 1:38 pm
by LiveCodeSteve
Hi ,

It can't remember which RunRev Version but it was current in 2008 (pc OS Windows XP)

If the same stack is compiled to standalone in 4.5.3 is fails (pc OS Windows 7) ?

The only change to the PC i have was changed from XP to Windows 7 , though the stack wrote and compiled to standalone in 2008 works on Windows 7.

Regards

Re: BLUETOOTH SPP OSX OK BUT WINDOWS PROBLEM

Posted: Tue May 22, 2012 8:29 pm
by LiveCodeSteve
Version 3.5.0 works ...................................
Sarah stack okay in 3.5.0 fails in 4.6.4 :cry:

Re: BLUETOOTH SPP OSX OK BUT WINDOWS PROBLEM

Posted: Wed May 23, 2012 7:15 am
by itzalak2
Hi,

Discovered that 4.0 works and 4.5 and 5.5 doesn't.

Something essential to solve COM port problems before buying it unfortunately :evil:

Thanks to everybody for give me a "solution" to this problem and verify the LC weakness. :P

Re: BLUETOOTH SPP OSX OK BUT WINDOWS PROBLEM

Posted: Wed May 23, 2012 10:20 am
by LiveCodeSteve
Moving how do we get this fixed...................... :x

Re: BLUETOOTH SPP OSX OK BUT WINDOWS PROBLEM

Posted: Wed May 23, 2012 8:37 pm
by BvG
Reported. It'll be fixed whenever they feel like it. Please don't hold your breath (or projects), there's bugs that never got fixed in 10 years, and others get fixed the same week (much more seldom tho), so you never know...

http://quality.runrev.com/show_bug.cgi?id=10230

Re: BLUETOOTH SPP OSX OK BUT WINDOWS PROBLEM

Posted: Wed May 23, 2012 8:57 pm
by itzalak2
4.5 enterprise edition works too. Sure there is many people that want to buy LC but can't due to this problem. I don't understand why it is not fixed yet.