Bluetooth serial how to ?

Previous topic - Next topic

Marmor

Hi ,
Ive paired a bluetooth device from my maximite
With my palm / or mac / or win computer .
But how i can access the device with glb ?
Its a serial bluetooth device.
I will get and send some data from/to.
Anyone ?

mentalthink

Yes Marmo I use Bluettoh whit arduino, and WinCe 6.5 or whit a usb Blutooth in pc or mac... very easy.
Search the Com Serial Library in the forum... and you send and receive whit glbasic commands, and making you code in your electronic board...

Very Easy.  :P

Marmor

Cool  :-*but will it work with webos/android ?

mentalthink

This Library only works for me, in WinCE... I think you have to use inline for use Bluetooth in Palm Pre, like Android... But I don´t know if can be very difficult... Whit Palm Pre, you have the SDK,and it´s open Source, They give you all the info for turn on the BT whit C++... and android now we have a mode for make calls to Java... but you have the NDK too... I never tried, but perhaps not it´s too much complex to do some code for the Bt works whit GLBasic...

matchy

That is right, mentalthink, that the comms lib won't compile for android, which is a shame because it would be extremely handy right now with arduino serial. I would like to connect my leo to pocketpc via usb but I think I need a ttl convertor shield. Is that right?  :-[

Marmor, without being specific, this becomes a raised technical comms lib concern. I have wondered if there is an non glb script or some app to buffer and dump the serial or send to glb locally on android.

mentalthink

@Matchy, I´m not sure how connect via USB I try to make somthing similar whit my windows Ce Mobile, I take a USB cable and cut at the end... but when I connect the wires in the port of arduino... don´t makes nothing... I´m not sure if I did somethig wrong... or perhpas not it´s easiest how put the wires of the USB into the Serial Ports...

But, I don´t know how do it... but call the bluetooth whit Inline perhaps not it´s complex... you know a lot of C++... another thing it´s people than me... I don´t have too much idea about programming...  :-[

Marmor

Ok ive got serial over Bluetooth working.
Now ill search for the mobile solution .
Ill prrefere the wlan solution .

Marmor

Ähem - arduino uses 3,3 or 5 ttl !
Also usb is a different protokoll and will not
Work if you cut the cable without an usb-ttl adapter

mentalthink

If you need connect the computer... very easy buy something like this... it´s very cheaper...

well this it´s from Spain... but in any Country you find for this price or less... look at China, but sometimes, all the product not are really cheaper... or perhaps eBay...

http://www.tecnonova.es/ADAPTADOR%20MINI%20BLUETOOTH%20USB%20V2.0%20WINXP%20VISTA%20PLUG&PLAY-p-30.html?gclid=CIHr_MeLirMCFeTHtAodCUoA-w

For 4$ + or - you have BT USB for computer... I use one like this and works in Mac mini and Windows... (When I updated the Ram modules I crash the BT and the AirPort... Better minus Radiation in my Room  =D )

Marmor

 :puke: i use the serial lib .
the device manager shows me com10:com11:and com 12 for serial .
terratherm use com11  for the connection and it works.
with the glb lib com11 will not work.
if anyone have a working sample please show me

Marmor

yes we like M$   :whip:
http://msdn.microsoft.com/en-us/library/windows/desktop/aa363858%28v=vs.85%29.aspx

COM ports under Windows7
If your com port is greater than 9, trying to open e.g. "COM10" will fail... This is documented above, but there is a subtlety with using the syntax specified:

"\\.\COM10" must be in your code as "\\\\.\\COM10":

sprintf(tmp,"\\\\.\\COM%d",comport);
CreateFile(tmp,GENERIC_READ|GENERIC_WRITE,0,NULL,OPEN_EXISTING,0,NULL);