Page 1 of 1

Collection: HowTo config various BT modules

Posted: Fri Jun 10, 2011 6:46 pm
by Hamburger
Hi,
in order to relieve myself from storing notes all over the place I start compiling info here.
From my experience the dealers' documentation usually is contradictory and not really helpful. In one case I got one BT module with 3 files stating 2 different hardware specifics and 2 config ways for configuration. Take your pick.
So it seems the only way to identify the proper way to config is by identifying the BT via its name if it is a slave module.
For master modules that does not seem to work as the master modules I know do not advertise a name.

Rules: label each post with the BT module's name.

Hamburger

linvar slave module

Posted: Fri Jun 10, 2011 6:50 pm
by Hamburger
comes preconfigured with 9600 baud.
For setup, no hardware fiddling is required.
Ignore "PIO11 to high" notes, just run commands after power on. you have approx 1/2 second after poweron.
Best do it via a arduino sketch.
For setup with arduino use Serial.print("command");
no cr lf, no \r\n

prepare separate sketches for name setting and for baud setting or else the baud setting command becomes part of the name.
commands:
AT+NAMEname
AT+BAUDn with n from table (1=1200, 2=2400,...8=11520)

That's all there is to it.

Omnitek_bluetooth slave

Posted: Fri Jun 10, 2011 6:54 pm
by Hamburger
- requires pio11 set high via 10k pullup.
- powerup
- connect with 38400,N,1
- run commands
AT+NAME=newName
AT+UART=115200,0,0
- query with AT+name? and AT+uart?
- remove pullup
- power cycle
done.

OBDII_Bluetooth Slave

Posted: Sat Jul 23, 2011 9:55 am
by lazarus
pre configured at 38400 baud
setting PIO4 high returned 'OK' to the wired serial interface- no idea what it is okaying
setting PIO11 high has no effect on entering AT mode (tested with and with out 10k pullup)

never did manage to program it before a mishap ended it

Re: Collection: HowTo config various BT modules

Posted: Mon Jan 09, 2012 12:24 am
by Hamburger
programming the BT module can be done by connecting it to an arduino and run a tailored sketch on the arduino.
Sketch could be something like (save to a file named bt.pde, open in the Arduino IDE and upload to your arduino

Code: Select all

void setup() {  
  pinMode(13, OUTPUT);     
  Serial.begin(9600);
  //Serial.print("AT+NAMEBT.SL.115k" );   //  BT slave  module linvar , no trailing cr+lf !!! must exit after name setting or else all following commands get appended to name !!
}

void loop() {
  Serial.print("AT+BAUD8" );   //  BT slave mit shield    und module linvar !!! no trailing cr+ lf
  digitalWrite(13, HIGH);   // set the LED on
  delay(600);              // wait f
  digitalWrite(13, LOW);    // set the LED off
  delay(4000);              // wait
}

Re: Collection: HowTo config various BT modules

Posted: Sun Mar 11, 2012 10:19 pm
by Esquilax
Hello

I know that it's been a while since somebody posted to this thread but i think this information can be useful for somebody :)

Lazarus, i love you ;) After i spent hours on getting this thing to work your post gave me the last clue.
I got a Bluetooth-Module from Ebay that looks very similar to yours. The difference is that the text "sct 1052" isn't on mine.
You nearly solved the problem.
If i set Pin 28 (PIO5?) to high level the devices sends "OK" and the blinking of the LED gets slower. Now the module is in "command-mode". I can send AT-Commands with 38400 Baud. Everything works fine :)

Bye,
Alex

Re: Collection: HowTo config various BT modules

Posted: Wed Mar 28, 2012 11:15 pm
by Meenzer
Hi there,
the info on this page did help me get my board up. :D

Got mine from e-bay too.
it did report
OBDII
as name

to identify the board :
the antenna has three loops toward the inside like so:
inside
|
| __ __ __
|_| |_| |_| |_______

Command mode can be enabled via pin 28 / pio5. gives an OK (*)
LED indicator is pin 31.
- command mode . slow blinking
- normal not active - fast blinking
- normal active - on
(*) Command mode will set 38k baud regardless of programmed baud rate

at+baud does not work
at+uart does work fine

at+pin does not work
at+pswd does work

I did use the at+name=
to change the device name

all AT commands also accept lower case

at+version reports +VERSION:Serial BT v2.1

maybe this picture will work ?

Image
Michael

Re: Collection: HowTo config various BT modules

Posted: Thu Mar 29, 2012 9:03 am
by Hamburger
Michael,
for the OBDII module to set the name you use STNA= or NAME= ?

Re: Collection: HowTo config various BT modules

Posted: Thu Mar 29, 2012 11:48 am
by msev
The "linvar slave module" seems to be the easiest to config...Baud rate has to be changed to 11520 right? Where can I buy it? :)

Re: Collection: HowTo config various BT modules

Posted: Thu Mar 29, 2012 4:57 pm
by Hamburger
glb or emartee?
Just get a cheap one and figure things out. Only caveat: make sure you get one that is _not_ explicitly fixed to _master_ mode.

Re: Collection: HowTo config various BT modules

Posted: Tue Apr 17, 2012 4:54 pm
by Wayne
I have:
http://www.goodluckbuy.com/serial-bluet ... pin-1.html
It started as ‘linvar’.
I get no reply, ever…but I did stumble upon the correct Baud and could then see the LED slow when sending AT+BAUD8 and AT+NAMEwhatever.

I could always Pair and now MWConfig does open and close the correct port.
MWConfig will start but show nothing.
WinGui will start and show nothing but will pop-up ‘no valid answer’ error within a few seconds.

Am I correct in assuming that BT is connected to MEGAs serial 0? (MWv2.0)
Do I have to tell MW to speak BT? I see BTSERIAL but I do now want to fly via BT, just GUI.

Re: Collection: HowTo config various BT modules

Posted: Tue Apr 17, 2012 4:58 pm
by Hamburger
No btserial.
But try and swap tx rx lines between bt and mwii.

Re: Collection: HowTo config various BT modules

Posted: Tue Apr 17, 2012 9:21 pm
by Hamburger
to reconfigure 'linvar' modules, you can use the arduino sketch I posted earlier.

Re: Collection: HowTo config various BT modules

Posted: Tue Apr 17, 2012 9:27 pm
by PatrikE
Or follow my guide to setup Linvor.

BT Configuration

Re: Collection: HowTo config various BT modules

Posted: Mon Apr 23, 2012 8:41 pm
by Wayne
Thanks guys, I did see the guide and the sketch is just a little over my head but..
Back at trying to get my BT working after a great weekend of flying.
As before I never get a reply when sending AT commands to Linvar.
But I did get the light to slow when sending AT+BAUD8 and
I am able to change and have changed its name.
Today while trying to make it work I had BT plugged into RX0 & TX0.
MWCONFIG can open and close the COM but no data flow.
Here’s where it came together for me.
With BT hooked up I plugged a cable to MEGA and my desktop computer, selected the proper COMport and MWCONFIG would do the same thing as with BT, open the COM but no data flow.
Now I unplug BT, restart the desktop MWCF and it works as usual.
WHILE MWCF is running on the desktop I plug BT back in, open MWCF on my laptop, point to the BT COM, hit start and IT WORKS. (everything but read and write)
Bummer, as soon as I stop the desktop, BT stops also.

I now know two things:
My BT is working.
My MEGA2560 does not like BT piggybacked onto RX0 & TX0.

Re: Collection: HowTo config various BT modules

Posted: Sat Apr 28, 2012 4:27 pm
by Cronalex
Hello everyone I have a problem with crius SE second module is the "Serial Bluetooth RF Transceiver Module RS232" after a while I use gives me problems. connects to the phone but did not receive anything ... is the second module I is burned in this way ... I can only connect ... more why?

Re: Collection: HowTo config various BT modules

Posted: Sun Jul 15, 2012 12:01 pm
by haydent
so i have the jy-mcu bt from glb, have change the baud rate and it replies back OK to AT at new baud rate. i can pair it but there is no data read or shown in the app...

my fc is http://www.goodluckbuy.com/mwc-multi...lticopter.html
running MW 2.0

is there any tests i can do to narrrow in on where the problem is ?

Re: Collection: HowTo config various BT modules

Posted: Sun Jul 15, 2012 12:23 pm
by Hamburger
Switch rx tx lines.

Re: Collection: HowTo config various BT modules

Posted: Sun Jul 15, 2012 1:55 pm
by haydent
ive tried both ways, and all 3 serial ports with no difference... thanks for your suggestion though

Re: Collection: HowTo config various BT modules

Posted: Sun Jul 15, 2012 2:22 pm
by chris ables
You did click settings in android gui and choose the right mwc version didn't you ? I had that problem when i first used mine ! Said it was connected but i couldn't get any readings . It was set on 1.9 version and i needed it on 2.0 !

Re: Collection: HowTo config various BT modules

Posted: Sun Jul 15, 2012 5:29 pm
by Hamburger
test against another computer with the correct GUI for your mwii version.
Use cable first, only then switch to BT bridging.

Re: Collection: HowTo config various BT modules

Posted: Mon Jul 16, 2012 1:06 am
by haydent
i did set mw versien.

i also have no problems with ftdi usb cable and windows.

i will look into trying between my laptop bluetooth and mw instead of via fone

Re: Collection: HowTo config various BT modules

Posted: Mon Jul 16, 2012 2:47 am
by chris ables
http://www.rctimer.com/index.php?gOo=go ... oductname= i bought this and didnt have to configure anything in firmware and it works great ! CHEAP TOO! That is on my phone though , i havent tried pc yet and may have to change something to use on pc ! But i thought i'd share this with phone users !

Re: Collection: HowTo config various BT modules

Posted: Mon Jul 16, 2012 3:06 am
by haydent
yeah im thinking i will just have to buy a new one considering how cheap they are.

Re: Collection: HowTo config various BT modules

Posted: Fri Jul 27, 2012 6:51 pm
by brettwal
I have a Mega 2560 board (GLB $69 board w/ IMU) and a bluetooth module (JY-MCU v1.03). If I connect the BT module to the FTDI port on the FC, I get data in the GUI. If I connect the BT Module to any of the Serial ports on the FC, I do not get data. Is there anything that I need to change in the code to make this work on one of the Mega Serial ports instead of the FTDI?? Is it possible to run on a serial port?

Thanks

Re: Collection: HowTo config various BT modules

Posted: Tue Aug 07, 2012 8:22 am
by haydent
i have this exact board and problem. ive tried two bluetooth boards now with no difference...

does anyone know if there's somewhere in the code to choose the port it is plugged into like with gps ?

Re: Collection: HowTo config various BT modules

Posted: Tue Aug 07, 2012 10:30 am
by haydent
i got it working !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

i love open source !!!!!!!!!!!!!!!!!

so i started reading the code to work out how it does what it does via serial and it became clear that Serial 0 is the port its using for these messages for gui or phone via bt...

mega has 4 serial. on our board 0 is used for ftdi and bt, it would be nice to have bt on serial 1 (or whichever one you specify) instead !!!

ive been confused thinking ftdi pins on fc are a different type of port but they are really just a serial port with different pin numbers to the others, its on the ftdi/usb adapter where the translation occurs....

anyway you have to jack power from serial 1, here's my pic:

P1010875.JPG

Re: Collection: HowTo config various BT modules

Posted: Tue Aug 07, 2012 1:18 pm
by brettwal
haydent wrote:i got it working !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

i love open source !!!!!!!!!!!!!!!!!

so i started reading the code to work out how it does what it does via serial and it became clear that Serial 0 is the port its using for these messages for gui or phone via bt...

mega has 4 serial. on our board 0 is used for ftdi and bt, it would be nice to have bt on serial 1 (or whichever one you specify) instead !!!

ive been confused thinking ftdi pins on fc are a different type of port but they are really just a serial port with different pin numbers to the others, its on the ftdi/usb adapter where the translation occurs....

anyway you have to jack power from serial 1, here's my pic:

P1010875.JPG




So did you find where in the code to change it from COM 0 ?

Re: Collection: HowTo config various BT modules

Posted: Wed Aug 08, 2012 10:48 am
by haydent
i found areas where it is specifying serial 0 for this job, i didnt look for them all though. but if you chango it you will also be changing your ftdi connection to that port (eg 1) as it doesnt differentiate between bt and ftdi/usb communications, they are all handled by the same protocol code regardless.

for now im not bothered trying to mod it as i can just switch my bt and ftdi plug as needed.

i did start a fix request here though viewtopic.php?f=7&t=2218