Jump to content


Photo

Changing Baudrate for Bluetooth Module doesn´t work


  • Please log in to reply
19 replies to this topic

#1 Tom

Tom

    Advanced Member

  • Members
  • PipPipPip
  • 44 posts
  • Country: flag of Germany Germany

Posted 01 November 2011 - 10:12 PM

Hello folks,

I´am trying to change the default baudrate of a Linvor BT-Modul on Mac OS X since hours ...

What I did:

1. Create serial port with system preferences using the bluetooth configuration
2. checking existing serial port: ls /dev/tty.linvor-DevB and /dev/cu.linvor-DevB
3. connection to linvor on serial port using terminal: screen -U /dev/cu.linvor-DevB 9600 --> successfull (getting some cryptic )
4. trying to get any information: AT+VERSION --> no usefull response
5. trying to set baudrate: AT+BAUD7 (later tried AT+BAUD8)
6. setting up GCS to work with new baudrate 56700 (using USB connection)
7. power cycle off CC + power on CC
8. try to connect GCS with BT-module on /dev/cu.linvor-DevB --> NO LINK :(

What did I miss there? What´s wrong?

I tried it also with ZTerm and CoolTerm but no success.


Good night,

Tom

#2 Guest_dankers_*

Guest_dankers_*
  • Guests

Posted 01 November 2011 - 10:57 PM

OK, this is the same as the cheap Chinese one we are using from Goodluckbuy, that module is really weird in that you can not type the commands to it fast enough for it to accept them, instead take the command such as AT+BAUD7, copy it to the clipboard and then paste it to the terminal session.

#3 Tom

Tom

    Advanced Member

  • Members
  • PipPipPip
  • 44 posts
  • Country: flag of Germany Germany

Posted 01 November 2011 - 11:12 PM

OK, this is the same as the cheap Chinese one we are using from Goodluckbuy, that module is really weird in that you can not type the commands to it fast enough for it to accept them, instead take the command such as AT+BAUD7, copy it to the clipboard and then paste it to the terminal session.

I tried this now with copy & paste, both AT-BAUD7 and 8 but no luck. Is there some exit or end command? I just pasted in and the quit the terminal via Apple + Q - is it correct?

#4 Guest_dankers_*

Guest_dankers_*
  • Guests

Posted 01 November 2011 - 11:17 PM

I'm a Windows guy and that's how I was doing it using SecureCRT.

Are you using the CC with the USB to serial firmware or are you connecting the BT adapter in a different way?

#5 Tom

Tom

    Advanced Member

  • Members
  • PipPipPip
  • 44 posts
  • Country: flag of Germany Germany

Posted 01 November 2011 - 11:22 PM

I'm a Windows guy and that's how I was doing it using SecureCRT.

Are you using the CC with the USB to serial firmware or are you connecting the BT adapter in a different way?

No, I don´t using the USB to serial firmware because I thought I´am already connected via serial. I´am wrong?

#6 Guest_dankers_*

Guest_dankers_*
  • Guests

Posted 01 November 2011 - 11:34 PM

No, I don´t using the USB to serial firmware because I thought I´am already connected via serial. I´am wrong?


This could be the confusion.

To set the baud and other parts of the module, it needs to be wired directly to the module without and other stuff in the way. You can not set the baud rate over the bluetooth link from what I understand.

Have you seen this Wiki page: http://wiki.openpilo...tooth Telemetry

There are a few threads around around as well, like this one: http://forums.openpi...tting-bluetooth

#7 dezent

dezent

    Key Member

  • Members
  • PipPipPip
  • 511 posts
  • LocationGöteborg
  • Country: flag of Sweden Sweden


Posted 02 November 2011 - 04:39 AM

i did this on my mac with screen and the firmware
http://wiki.openpilo...rtual+Comm+Port
to make cc a TTL adapter.

Load the firmware with GCS
then open terminal and type "screen /dev/whatever-cc-is-called 9600"

I use the cheap BT module from deal extreme.
http://www.dealextre...er-module-80711
(its a linvor module)

QAV500, Revolution, F-30 SimonK, MT 4006, 4S 5000mah |   My vids on youtube:http://www.youtube.com/dezent

Trex 450Pro, CopterControl / BeastX, 325mm Align FBL       |   My Swedish FPV forum:http://fpv.nu/talk

Trex 700E, VBar, Jive80 HV, 12S 5000mah, 710mm Radix FBL

gripen.png


#8 D-Lite

D-Lite

    Core Team

  • Members
  • PipPipPip
  • 1912 posts
  • Country: flag of Germany Germany


Posted 02 November 2011 - 07:31 AM

1. Create serial port with system preferences using the bluetooth configuration
2. checking existing serial port: ls /dev/tty.linvor-DevB and /dev/cu.linvor-DevB
3. connection to linvor on serial port using terminal: screen -U /dev/cu.linvor-DevB 9600 --> successfull (getting some cryptic )


So you're trying to configure the module via the bluetooth serial connection? This will (unfortunately) not work. You need to connect to the "other side", to the physical serial port of the module. Most (all ?) bluetooth serial modules work this way, they don't accept configuration commands via the bluetooth connection.

(Edit: just saw that Dave already pointed that out two posts above :)

Edited by D-Lite, 02 November 2011 - 07:35 AM.


#9 Tom

Tom

    Advanced Member

  • Members
  • PipPipPip
  • 44 posts
  • Country: flag of Germany Germany

Posted 02 November 2011 - 09:25 AM


This could be the confusion.

To set the baud and other parts of the module, it needs to be wired directly to the module without and other stuff in the way. You can not set the baud rate over the bluetooth link from what I understand.

Have you seen this Wiki page: http://wiki.openpilo...tooth+Telemetry

Yes, I have read this.

There are a few threads around around as well, like this one: http://forums.openpi...tting-bluetooth

I know this thread from dacat, it´s his BT-Module I´am working on ;)

i did this on my mac with screen and the firmware
http://wiki.openpilo...rtual+Comm+Port
to make cc a TTL adapter.

Load the firmware with GCS
then open terminal and type "screen /dev/whatever-cc-is-called 9600"

Oh yes, I will try this with the different firmware.



So you're trying to configure the module via the bluetooth serial connection? This will (unfortunately) not work. You need to connect to the "other side", to the physical serial port of the module. Most (all ?) bluetooth serial modules work this way, they don't accept configuration commands via the bluetooth connection.

(Edit: just saw that Dave already pointed that out two posts above :)

Yes, it makes sense not do this with the actual working bt-serial connection.

#10 D-Lite

D-Lite

    Core Team

  • Members
  • PipPipPip
  • 1912 posts
  • Country: flag of Germany Germany


Posted 02 November 2011 - 10:51 AM

Yes, it makes sense not do this with the actual working bt-serial connection.


Well, this is still confusing :-). It actually WOULD make sense to connect to the module via bluetooth and then configure the physical serial port of the module via this connection. It's just not supported by the modules. Instead you have to connect to the physical port and reconfigure that physical port's parameters on the fly, which means if you change e.g. the baud rate, you'll kill your connection and have to re-connect with that new baud rate before you can go on (at least with the BTM-222 that I am using).

#11 Berkely

Berkely

    Core Team

  • Members
  • PipPipPip
  • 967 posts
  • Country: flag of Flemish Belgium Flemish Belgium


Posted 02 November 2011 - 12:18 PM

Instead you have to connect to the physical port and reconfigure that physical port's parameters on the fly, which means if you change e.g. the baud rate, you'll kill your connection and have to re-connect with that new baud rate before you can go on (at least with the BTM-222 that I am using).


Yes, I have 4 of those Ebay/Goodluckbuy bluetooth modules & they all work like that. You have to configure the baudrate & then the connection is lost so one has to reconnect with the new baud rate.

#12 Felix Da Cat

Felix Da Cat

    ('-' ) (._. ) ( ._. ) ( '-' ) ( ._.)

  • Members
  • PipPipPip
  • 2043 posts
  • Country: flag of Germany Germany


Posted 03 November 2011 - 06:32 AM

Hi,

finally Tom and myself worked it out and made a video tutorial for changing the baudrate

Step 1 will be configurate the BT-module like i showed in the my first video

http://vimeo.com/30257531

Step 2 would be changing the baudrate on the BT-module

http://vimeo.com/31516943


i would never got that without Tom ... i think he is worth a "Diamond"

also the firmware for the Virtual Com Port does not work from the wiki-link
the one out of the forum worked though ... some should test both ways and maybe change the download link in the wiki section

if you find any mistakes or anything let us know ... we will be happy to change it

@ Berkley... maybe you could load up this videos for us in the wiki?

CC/3D                    Revo/OPLink


#13 Felix Da Cat

Felix Da Cat

    ('-' ) (._. ) ( ._. ) ( '-' ) ( ._.)

  • Members
  • PipPipPip
  • 2043 posts
  • Country: flag of Germany Germany


Posted 03 November 2011 - 07:53 PM

small changes.... there is now only 1 video showing everything from soldering to changing baudrate


View on Vimeo

CC/3D                    Revo/OPLink


#14 scphoto

scphoto

    Advanced Member

  • Members
  • PipPipPip
  • 474 posts
  • LocationNorthern NJ USA
  • Country: flag of United States United States


Posted 26 February 2012 - 06:07 AM

Got a Bluetooth telemetry adapter and having some issues:
On a mac running Lion - GCS seems to crash quite a bit (even before trying to set this up)
Following the video quite closely, I was at first able to establish a Bluetooth link via GCS prior to setting the board as a TTL adapter. I was able to pair the BT Board with the GCS and entered code 1234 and got solid red. Then downloaded and flashed the virtual comm port firmware to the board successfully and was able to see the stm 32 connection through GCS.
The problems arose when working in terminal - After entering ls /dev/tty. tab,tab - I would get a "No more PTYs.Sorry, could not find a PTY. [screen is terminating]" message.
I googled the message and came up with a few possible terminal code solutions - none of which worked along with a terminal reprimand to be careful with sudo command.
I then went to disk utilities and tried repairing permissions which seemed to do the trick in that I was able to enter the ls /dev/tty. tab, tab command and got the address of the usbmodemfa131. Tried entering the 9600 command which brought up a new blank terminal window which would not show my typing which I was prepared for but neither did I get an OK in response from AT. I was stuck at that point and didn't know what to do. Tried re entering the commands to get back to accessing the BTmodule but nothing is working. I can access the module via the mac and it goes through the pairing process ok but the GCS no longer shows it as a connection option nor does the ST32 connection via ttl bridge.

I felt the best thing to do was start over - I reflashed the original (latest) firmware back to the board and started the process all over again. This time I still cant the GCS to see the BT module anymore - I fear I have bricked it in some way but not sure how to recover.

Its a taobao board - I believe it is the one most are using these days.


I'm not an engineer but I am pretty quick on the uptake. If anyone has any ideas on how to rectify please give me a shout. At least I can still fly weather permitting!

Could be worse, it could be raining!

Thanks,

Steve

Edited by scphoto, 26 February 2012 - 06:09 AM.


#15 D-Lite

D-Lite

    Core Team

  • Members
  • PipPipPip
  • 1912 posts
  • Country: flag of Germany Germany


Posted 26 February 2012 - 09:25 AM

Tried entering the 9600 command which brought up a new blank terminal window which would not show my typing which I was prepared for but neither did I get an OK in response from AT.


If I remember right, there are modules out there that doesn't accept "manual" typing maybe because of very short timeouts for commands. People use to copy&paste the commands into the terminal window to work around this. Not sure if this is the problem you are facing but it's worth trying.

#16 Felix Da Cat

Felix Da Cat

    ('-' ) (._. ) ( ._. ) ( '-' ) ( ._.)

  • Members
  • PipPipPip
  • 2043 posts
  • Country: flag of Germany Germany


Posted 26 February 2012 - 09:34 AM

my first thought too... you´ll need to enter the commands very quick if "you are inside the module" thats why copy & paste is the way you should try...

CC/3D                    Revo/OPLink


#17 azrin_aris

azrin_aris

    Advanced Member

  • Members
  • PipPipPip
  • 82 posts
  • Country: flag of Malaysia Malaysia


Posted 26 February 2012 - 11:23 AM

I'm having the same problem, got the BT module from OP store and manage to pair it with my Macbook. doing ls I found /dev/cu.OpenPilot_BT-DevB. Set my GCS telemetry speed to 9600, set the connection to /dev/cu.OpenPilot_BT-DevB, the red LED on the BT module light steady but no telemetry.

What did I missed? please advise.

Thank you

#18 Berkely

Berkely

    Core Team

  • Members
  • PipPipPip
  • 967 posts
  • Country: flag of Flemish Belgium Flemish Belgium


Posted 26 February 2012 - 11:36 AM

I'm having the same problem, got the BT module from OP store and manage to pair it with my Macbook. doing ls I found /dev/cu.OpenPilot_BT-DevB. Set my GCS telemetry speed to 9600, set the connection to /dev/cu.OpenPilot_BT-DevB, the red LED on the BT module light steady but no telemetry.

What did I missed? please advise.

Thank you


Aren't those modules pre configured for 57k baud? 9.6 will not work then. Did you try different baud rate settings?

#19 azrin_aris

azrin_aris

    Advanced Member

  • Members
  • PipPipPip
  • 82 posts
  • Country: flag of Malaysia Malaysia


Posted 26 February 2012 - 11:45 AM

Aren't those modules pre configured for 57k baud? 9.6 will not work then. Did you try different baud rate settings?


Found the reason I got 'no link' - I did not set the main port to telemetry...how embarassing :(

#20 scphoto

scphoto

    Advanced Member

  • Members
  • PipPipPip
  • 474 posts
  • LocationNorthern NJ USA
  • Country: flag of United States United States


Posted 26 February 2012 - 02:56 PM

my first thought too... you´ll need to enter the commands very quick if "you are inside the module" thats why copy & paste is the way you should try...


I had read that and did try as well for AT, etc.
Though now my issue seems to be one of not being able to access the module via the GCS anymore. It goes through set up, says it is paired - I have chosen no code to pair - and it did work before - but now it does not show up as a connection option in the GCS. I get"logfile replay" and "UDP Unconfigured".