go_away

Author Topic: Bluetooth R/C Car... But Adapter and Mini SSC II not talking  (Read 4591 times)

0 Members and 1 Guest are viewing this topic.

Offline GertlexTopic starter

  • Supreme Robot
  • *****
  • Posts: 744
  • Helpful? 23
  • Nuclear Engineer Roboticist
Hello people... this place seems awesome (I like the smilies too) 8)

First, if you'd like pictures of the project, see here:
http://www-personal.umich.edu/%7Eerelson/BluetoothCar.html
(I'm a few steps behind on the pictures... but not much)

I got the last part I needed for this project of mine today: the bluetooth adapter.  Specifically: IOGEAR Bluetooth to Serial Adapter GBS301 (class 1, Bluetooth 1.1)

I can successfully connect my laptop (built in bluetooth, Dell Wireless 355 Module; Bluetooth 2.0; don't know what class).  I get the windows just like on Sparkfun's guide. And of course, I've read the SOR guide.

I can control the car fine with a serial cable connection to my desktop.

I'm using Seetron's Mini SSC II, with three HS-422 servos.  9600 baud, 180? of motion.  Programming with visual basic 6, using the .DLL file provided by Seetron. (VB 2005 .NET didn't work with the DLL).

I've verified that the baud rate on the adapter is 9600... though I'll be testing 2400 this evening, out of desperation.

Same results both with supplied AC adapter, and with ~5.3-5.4V DC that will be used on the car.  Likewise, I verified polarity of the battery supply and AC adapter before plugging in to the battery supply...

I lack the experience to test the adapter with another device or computer.  If anyone can tell me/point me to how to connect my laptop and desktop, and just send a text message, i.e. via command prompt-style interface, using a bluetooth serial connection, that would be great.

One point of interest, for anyone familiar with the MiniSSC, is that for my adapter from telephone to serial cables, Green wire goes to Serial 2, Yellow to Serial 5.  This is different than what the product info from Seetron states: Green -> 3, Yellow ->5.  I had to do this to get the serial cable working.  Does anyone know why?  I expected that I'd have to do this with the bluetooth connection, after reading the following guide, though: http://alex.seewald.at/BlueCar/

Anyone have relevant experience with this? Anything else I can give you info about? (that's relevant to this problem :P )

Thanks,
-Gertlex
P.S. Yes, this is my first full-scale robot work... But i've got bits and pieces of experience from other stuff.  The bluetooth is the *only* thing holding me up right now :/
« Last Edit: July 30, 2007, 03:20:16 PM by Gertlex »
I

Offline dunk

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 1,086
  • Helpful? 21
Re: Bluetooth R/C Car... But Adapter and Mini SSC II not talking
« Reply #1 on: July 30, 2007, 05:06:12 PM »
hi Gertlex,
so the first thing i would do is verify your bluetooth link is operating as a serial link.
the easiest way to do this is with a loopback on the remote end.

to do this, power up your bluetooth to serial adapter. connect together pins 2 and 3 on the 9 pin DB9 connector.
now open up mincom (or another piece of terminal software) on your computer. make sure the baud rate is set to the same as your bluetooth to serial adapter and connect to whichever com port your computer's bluetooth is appearing as.
make sure no flow control is selected.

now, when you type in minicom, the characters should go over the bluetooth link to the bluetooth to serial adapter, out pin 3 on the DB9 connector and back into pin 2 (because you have pins 2 and 3 connected), back over the bluetooth link and appear on your screen.
if what you type is echoed back to the screen your blutooth link is working.

let us know how you get on.

dunk.

Offline GertlexTopic starter

  • Supreme Robot
  • *****
  • Posts: 744
  • Helpful? 23
  • Nuclear Engineer Roboticist
Re: Bluetooth R/C Car... But Adapter and Mini SSC II not talking
« Reply #2 on: July 30, 2007, 05:47:22 PM »
I can't find mincom on my computer, and am having ambiguous results with google (but still looking). EDIT: Ok, now I see you called it minicom the second time around. Looking for that now... EDIT2: OK. I'm having zero luck finding an executable i can use for this... :( Link please?

I've seen the thing about no flow control before (in the guide I linked).  For advanced configuration (using hyperterminal), the manual shows a screenshot for the setupup of the HT connection with the Flow Control: Hardware. Other options here are on and off, I think... but that shouldn't be what I'm looking for, since that spot doesn't change the adapter in any way.
Here's the manual... Page 26 has the screenshot I referred to.

Listed various places: "Supports RTS/CTS Hardware flow control"
« Last Edit: July 30, 2007, 06:18:00 PM by Gertlex »
I

Offline dunk

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 1,086
  • Helpful? 21
Re: Bluetooth R/C Car... But Adapter and Mini SSC II not talking
« Reply #3 on: July 30, 2007, 06:16:33 PM »
ooo, sorry.
you don't want minicom.
you want hyperterminal. hyperterminal is the windows one.
my bad.

dunk.

Offline dunk

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 1,086
  • Helpful? 21
Re: Bluetooth R/C Car... But Adapter and Mini SSC II not talking
« Reply #4 on: July 30, 2007, 06:21:01 PM »
Quote
Listed various places: "Supports RTS/CTS Hardware flow control"
the bluetooth to serial adapter may support flow control but the servo controller does not.
you do not want to use flow control.

dunk.

Offline GertlexTopic starter

  • Supreme Robot
  • *****
  • Posts: 744
  • Helpful? 23
  • Nuclear Engineer Roboticist
Re: Bluetooth R/C Car... But Adapter and Mini SSC II not talking
« Reply #5 on: July 30, 2007, 06:30:11 PM »
I'm getting nothing with hyperterminal.  I get to the actual terminal window, but nothing I type appears on the screen... (As in the window stays completely white, except for the blinking cursor)
« Last Edit: July 30, 2007, 06:32:42 PM by Gertlex »
I

Offline dunk

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 1,086
  • Helpful? 21
Re: Bluetooth R/C Car... But Adapter and Mini SSC II not talking
« Reply #6 on: July 30, 2007, 06:44:46 PM »
Quote
I'm getting nothing with hyperterminal.  I get to the actual terminal window, but nothing I type appears on the screen... (As in the window stays completely white, except for the blinking cursor)
this is with the loopback between pins 2 and 3 of the DB( on the bluetooth to serial adapter?
yup. you have problems with your bluetooth connection.

if you have a serial port on your computer you can demonstrate what i mean with that.
connect pins 2 and 3 on your serial port and run hyperterminal on that com port.
you should see what you type loped back when the pins are connected but not when they are open.
make sense?

as for troubleshooting your bluetooth connection, i'm afraid i haven't used a windows computer for years so you'll need to find someone else to help you there.

good luck!

dunk.


Offline GertlexTopic starter

  • Supreme Robot
  • *****
  • Posts: 744
  • Helpful? 23
  • Nuclear Engineer Roboticist
Re: Bluetooth R/C Car... But Adapter and Mini SSC II not talking
« Reply #7 on: July 30, 2007, 08:10:34 PM »
Ok. I got it working as it should with the connection between pins 2 and 3.  Dad got home from work and I mentioned what I was trying to do... he handed me a little thingamabob that's already setup for this type of test :)

So now that I know the bluetooth adapter can talk to itself...

Furthermore, I've tested with Flow Control set at all three options and garnered the same results. (I also put on echo of what I type, for convenience...)

Where should I proceed from here?

Oh, and is there any way to stop my computer from dropping the bluetooth connection after two minutes or so?

Edit: I tried swapping the green wire between serial points 2 and 3 to no avail.
« Last Edit: July 30, 2007, 10:50:42 PM by Gertlex »
I

Offline dunk

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 1,086
  • Helpful? 21
Re: Bluetooth R/C Car... But Adapter and Mini SSC II not talking
« Reply #8 on: July 31, 2007, 02:24:56 AM »
ok,
so your bluetooth connection works.
you also said your servo controller works when you connect it to the serial port on your computer.
but it doesn't work when you connect it to the bluetooth thing?

hmmm. i can think of no real reason for that.

are you sure you have the baud rate of the bluetooth to serial adapter set to the same rate as the servo controller?
you will need to set the baudrate in 3 places: bluetooth to serial, servo controller and on the controlling computer.
also make sure you are using the same flow controll settings you used when it worked with the serial cable. (i'm presuming this is flow controll = off.)

after that i'm out of ideas.

good luck.

dunk.

Offline GertlexTopic starter

  • Supreme Robot
  • *****
  • Posts: 744
  • Helpful? 23
  • Nuclear Engineer Roboticist
Re: Bluetooth R/C Car... But Adapter and Mini SSC II not talking
« Reply #9 on: July 31, 2007, 07:29:39 AM »
Baud rate is definitely consistent...

I can't find any way to deal with flow control...

I'm not sure how much serial stuff you know... Can I fake the bluetooth adapter into thinking it has flow control?
http://www.lammertbies.nl/comm/info/RS-232_null_modem.html#loop

That seems like a possibility.  I took the thingamabob my dad gave me apart, it's wired like the loop-back null modem.  It might explain why I wasn't having any success with just connecting terminals 2 & 3.  Time to do another test with the 2-3 connection and nothing else.

First though, I need to fix the 9v battery snap on the MiniSSC... three out of four wire connections for the 9v battery have broken. *sigh*

Edit: So far I've tested a bit more. I need to connect 2 & 3, and 7 & 8 in order to get an echo from the bluetooth adapter.  Such didn't extend to success with the MiniSSC.  Next up I have to test 7&8 and 1&4&6 connected

Is it possible to control the minissc with Hyperterminal? i.e. with bytes being typed <255><0><50>?  Admittedly, I doubt this would be any different from using Seetron's "Serial Sender."

Edit2: Still haven't done the afforementioned test...

Instead, I was comparing the settings available for the serial ports on the desktop and the bluetooth com ports on my laptop (laptop doesn't have an actual serial port).  I can specify flow control on the desktop, but it doesn't seem to matter whether it's none/hardware/xon-xoff when doing serial cable tests.  There's no such option on my laptop.

(Random note, for whatever reason, com1 is no longer working with my mini ssc on the desktop... though settings between the two are completely identical  ???)
« Last Edit: July 31, 2007, 08:47:52 AM by Gertlex »
I

Offline dunk

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 1,086
  • Helpful? 21
Re: Bluetooth R/C Car... But Adapter and Mini SSC II not talking
« Reply #10 on: July 31, 2007, 08:57:31 AM »
ideally you want to switch off all flow control as your servo controller does not use it.
are you saying it is not possible to switch off flow control on the bluetooth to serial adapter?

if you are getting a loop back with 2 & 3, and 7 & 8 connected, try leaving 7 & 8 connected (to keep looping the hardware flow controll) and wire up the servocontroller to pin 3 and gnd as normal.
note that this will not work for software flow control...

dunk.

Offline GertlexTopic starter

  • Supreme Robot
  • *****
  • Posts: 744
  • Helpful? 23
  • Nuclear Engineer Roboticist
Re: Bluetooth R/C Car... But Adapter and Mini SSC II not talking
« Reply #11 on: July 31, 2007, 09:16:28 AM »
ideally you want to switch off all flow control as your servo controller does not use it.
are you saying it is not possible to switch off flow control on the bluetooth to serial adapter?


Correct, I've seen nothing that lets me set flow control (so i don't even know if it's on or off) for the bluetooth serial connection.

Quote
if you are getting a loop back with 2 & 3, and 7 & 8 connected, try leaving 7 & 8 connected (to keep looping the hardware flow controll) and wire up the servocontroller to pin 3 and gnd as normal.
note that this will not work for software flow control...

dunk.


I already tried this. Or I think I did... testing it again as I speak. No result.  Though I did find this window when i click on the connection's icon after I've connected:
http://img.photobucket.com/albums/v215/ERelson/temp-17.png?t=1185895048
It's indeed sending three bytes every time servo position is changed.

It starts with 96 bytes when I run my program.  It's at this point, when doing serial cables, that the indicator light on the minissc goes off (indicating first byte received). Not happening with bluetooth.
« Last Edit: July 31, 2007, 09:21:33 AM by Gertlex »
I

Offline GertlexTopic starter

  • Supreme Robot
  • *****
  • Posts: 744
  • Helpful? 23
  • Nuclear Engineer Roboticist
Re: Bluetooth R/C Car... But Adapter and Mini SSC II not talking
« Reply #12 on: July 31, 2007, 09:22:29 AM »
Holy crap, i think it just worked :D

More to follow :)

Edit: My success varies with which connector I use.  I've got it working with a bluetoothadapter - fem/fem null modem adapter - male serial connector with 7&8 together, and 5 & 2 to the mini SSC.

I need to buy a special tool before I can fix the more compact female serial connector to work with the bluetooth adapter.

So dunk, my sincerest thanks and appreciation to you for sticking in here with me on this rather confusing run of trial and error and hair pulling.
« Last Edit: July 31, 2007, 10:10:55 AM by Gertlex »
I

Offline GertlexTopic starter

  • Supreme Robot
  • *****
  • Posts: 744
  • Helpful? 23
  • Nuclear Engineer Roboticist
Re: Bluetooth R/C Car... But Adapter and Mini SSC II not talking
« Reply #13 on: August 01, 2007, 10:32:07 AM »
(I hope a triple post isn't a crime here  ;D)

I've got my car working great now.  It's a mess of wires and a bit weak (it has some problems with my rather rough front yard). I'm confident I could pull this off with other bluetooth hardware now too.

For future reference with the Mini SSC: If you're wiring a female connector to be plugged into a computer or bluetooth adapter, you want Green -> 3, Yellow -> 5, and 7 and 8 to each other.  If you're wiring a male connector to be plugged into a null modem adapter (a cable or piece of hardware with two female serial connectors on it) or bluetooth adapter, then you want Green -> 2, Yellow -> 5, and 7 and 8 to each other.

Wiring 7 and 8 together might not be necessary in all cases.  It wasn't for this guy's attempt a few years ago.

Here's a pic of the finished car:
http://www-personal.umich.edu/%7Eerelson/FullCar02.png

Now I think I'll take a stab at using VB .NET 2005 instead of VB 6.  I'll have to write my own serial sending methods this time.
I

Offline dunk

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 1,086
  • Helpful? 21
Re: Bluetooth R/C Car... But Adapter and Mini SSC II not talking
« Reply #14 on: August 01, 2007, 11:24:20 AM »
hey, well done Gertlex.
serial comms aren't that tough once you work out what's going on.

have you considered writing your control program in a language that can be called by a web server?
(i don't know if you can use VB like this. i've never used it.)
that way you could control your car from any web brouser.
if you point a web cam at it (or better still put a wireless web cam on it) you could control it over the internet without having to install any software on the controlling PC.

dunk.

Offline GertlexTopic starter

  • Supreme Robot
  • *****
  • Posts: 744
  • Helpful? 23
  • Nuclear Engineer Roboticist
Re: Bluetooth R/C Car... But Adapter and Mini SSC II not talking
« Reply #15 on: August 01, 2007, 12:08:44 PM »
That's another interesting idea, dunk.  There's a lot I can experiment with now that I have the bluetooth working.  Another idea a friend of mine insisted on is controlling it with a Wiimote. 8)

Right now, I've got the ability to control it remotely using a bluetooth numpad (Logitech DiNovo Mediapad, not sold separately; I bid viciously on ebay for it).  Combining that with AutoHotkey to remap some of the keys, I now can wander around with my car too.
I

 


Get Your Ad Here

data_list