Author Topic: Bluetooth patch over RS232 connection  (Read 6078 times)

0 Members and 1 Guest are viewing this topic.

Offline LeuvenTopic starter

  • Regular Contributor
  • *
  • Posts: 108
Bluetooth patch over RS232 connection
« on: March 18, 2012, 06:59:36 pm »
New project here and looking for some input. I have this cable for car diagnostics with OBDII at one end and serial RS232 at the other. Are there any off the shelf parts that take my 6 RS232 pins and feed some sort of bluetooth transceiver? There is still some room in the plug so hoping for something miniaturized.

There are some standalone Bluetooth adaptors which plug directly into RS232 and as far as I can tell they're taking power supply from pins 9 and 5. Checked that and my device puts out 12-14V, so whatever transceiver I get it doesn't look like it's gonna be plug and play.

In any case, is this what I want?

http://www.ebay.co.uk/itm/2-Wireless-Bluetooth-Transceiver-Module-RS232-TTL-Nw-/180690200006?pt=LH_DefaultDomain_3&hash=item2a11f9a5c6#ht_1680wt_952

http://www.ebay.co.uk/itm/Bluetooth-RS232-serial-Converter-Module-Adapter-Board-/190508188703?pt=LH_DefaultDomain_0&hash=item2c5b2c441f
« Last Edit: March 18, 2012, 07:27:03 pm by Leuven »
 

Offline metalphreak

  • Frequent Contributor
  • **
  • Posts: 815
  • Country: au
  • http://d.av.id.au
    • D.av.id.AU
Re: Bluetooth patch over RS232 connection
« Reply #1 on: March 19, 2012, 09:36:23 am »
Just keep in mind most of those "RS232" bluetooth adapters are actually TTL level signal voltages. You could power the BT module using a 3.3V LDO regulator off the 12v with no need for external components.

The add-on board in the second link has a voltage regulator (XC6206P332) on it, but it has an absolute max input of 7V (it's meant for 5V input).

Offline LeuvenTopic starter

  • Regular Contributor
  • *
  • Posts: 108
Re: Bluetooth patch over RS232 connection
« Reply #2 on: March 20, 2012, 11:59:40 pm »
Just keep in mind most of those "RS232" bluetooth adapters are actually TTL level signal voltages. You could power the BT module using a 3.3V LDO regulator off the 12v with no need for external components.

The add-on board in the second link has a voltage regulator (XC6206P332) on it, but it has an absolute max input of 7V (it's meant for 5V input).

Thanks, got over that part by buying a ready made one. Now another problem, com port is assigned appropriately and pc software connects fine but will not start the session and I think I know why.

The manual of this bluetooth adapter says that for its own power supply I can either plug in an external USB cable on the side, or a small 2 pin plug connected to a 5V power source like a battery, or the serial device itself feeding 5V through the pin no.9. There is a little button on the side which switches between the above methods of power supplying.

Seems to me the bluetooth adapter rendered pin no. 9 blank and simply hijacked it for power supply purposes - when in fact this pin is actually needed by the software. If it doesn't see 12V on it, it won't start the session! The funny thing is, a wired Serial-to-USB adaptor is working absolutely fine. The old wired Serial-to-USB adaptor is looking at pin 9 in the correct way and acknoledges voltage or whatever else sees on it. Is there anyway I can modify this bluetooth adaptor to mimic the Serial-to-USB adaptor as far as pin 9? At the end of the day the Serial-to-USB still has only 2 data pins on the USB end, I can't understand why the bluetooth adaptor is different.

p.s. the size of the bluetooth adaptor and a power supply for it is a non-issue, I will mount it on the other side of the socket (inside the dashboard) and feed the serial wires through some of the blank pins of the OBD2, plenty of them unused.
« Last Edit: March 21, 2012, 12:04:17 am by Leuven »
 

Offline Rufus

  • Super Contributor
  • ***
  • Posts: 2095
Re: Bluetooth patch over RS232 connection
« Reply #3 on: March 21, 2012, 12:43:10 am »
Thanks, got over that part by buying a ready made one.

Is that the inside of an LM058?

Now another problem, com port is assigned appropriately and pc software connects fine but will not start the session and I think I know why.

Doubt it. Pin 9 is RI (ring indication) and hardly ever used for anything (but ring indication on real modems). Did you configure the adapter? The baud rate and bits that you set on a bluetooth connection pretending to be a COM port on a computer has nothing to do with the baud rate and bits that come out the other end when that end actually happens to be a serial port.

If it is an LM058 it has a modem like AT command set which amongst other things will let you set power up defaults that need to match what you are plugging it into.
 

Offline LeuvenTopic starter

  • Regular Contributor
  • *
  • Posts: 108
Re: Bluetooth patch over RS232 connection
« Reply #4 on: March 21, 2012, 01:18:53 am »
Thanks, got over that part by buying a ready made one.

Is that the inside of an LM058?

Now another problem, com port is assigned appropriately and pc software connects fine but will not start the session and I think I know why.

Doubt it. Pin 9 is RI (ring indication) and hardly ever used for anything (but ring indication on real modems). Did you configure the adapter? The baud rate and bits that you set on a bluetooth connection pretending to be a COM port on a computer has nothing to do with the baud rate and bits that come out the other end when that end actually happens to be a serial port.

If it is an LM058 it has a modem like AT command set which amongst other things will let you set power up defaults that need to match what you are plugging it into.


Yes, the adaptor supports AT commands and I will try to find out the specs of the OBD2 cable. Haven't done that yet.

However, how do you explain that with the wired Serial-to-USB adaptor - when I take out pin no. 9 it gives me the exact same error? I left that pin connection loose so I can touch to close and I can actually see the change in real time at the software side - lights go from red to green (well, so to speak).
« Last Edit: March 21, 2012, 01:26:09 am by Leuven »
 

Offline Rufus

  • Super Contributor
  • ***
  • Posts: 2095
Re: Bluetooth patch over RS232 connection
« Reply #5 on: March 21, 2012, 02:00:35 am »
However, how do you explain that with the wired Serial-to-USB adaptor - when I take out pin no. 9 it gives me the exact same error? I left that pin connection loose so I can touch to close and I can actually see the change in real time at the software side - lights go from red to green (well, so to speak).

Then it looks like your ODBC thing and its software is using RI for its own purpose and you might be screwed because I doubt you will find a bluetooth serial adapter which transports the RI signal.
 

Offline vk6zgo

  • Super Contributor
  • ***
  • Posts: 7723
  • Country: au
Re: Bluetooth patch over RS232 connection
« Reply #6 on: March 21, 2012, 02:53:12 am »
It may be worth having a look at this site.
These guys do have a lot of info on weird stuff to do with RS232 & the like.

 http://www.bb-elec.com/technical_library.asp
 

Offline LeuvenTopic starter

  • Regular Contributor
  • *
  • Posts: 108
Re: Bluetooth patch over RS232 connection
« Reply #7 on: March 21, 2012, 03:15:38 am »
However, how do you explain that with the wired Serial-to-USB adaptor - when I take out pin no. 9 it gives me the exact same error? I left that pin connection loose so I can touch to close and I can actually see the change in real time at the software side - lights go from red to green (well, so to speak).

Then it looks like your ODBC thing and its software is using RI for its own purpose and you might be screwed because I doubt you will find a bluetooth serial adapter which transports the RI signal.

Not screwed yet, managed to dodge that bullet :)

I was able to add a line in the config file in order for the program to disregard voltage on pin 9 and take it as good.

Still not connecting but gives a 'data transmission disturbed' error which is kind of 'almost working but not really'. I think at this stage is just a matter of setting up the bluetooth adaptor properly.
 

Offline LeuvenTopic starter

  • Regular Contributor
  • *
  • Posts: 108
Re: Bluetooth patch over RS232 connection
« Reply #8 on: March 21, 2012, 03:34:31 am »
It may be worth having a look at this site.
These guys do have a lot of info on weird stuff to do with RS232 & the like.

 http://www.bb-elec.com/technical_library.asp

Thank you for the link!
 

Offline metalphreak

  • Frequent Contributor
  • **
  • Posts: 815
  • Country: au
  • http://d.av.id.au
    • D.av.id.AU
Re: Bluetooth patch over RS232 connection
« Reply #9 on: March 21, 2012, 10:48:30 am »
Is it the software (PC side) that's expecting that pin to be high? If so, you could use one of the many "pass through" virtual com port programs. Basically BT Com port -> software sets pin9 high always -> virtual com port <- software connects to virt com

Offline LeuvenTopic starter

  • Regular Contributor
  • *
  • Posts: 108
Re: Bluetooth patch over RS232 connection
« Reply #10 on: March 21, 2012, 04:52:46 pm »
Is it the software (PC side) that's expecting that pin to be high? If so, you could use one of the many "pass through" virtual com port programs. Basically BT Com port -> software sets pin9 high always -> virtual com port <- software connects to virt com

Thanks for the suggestion, that bit is sorted. Whoever programmed that soft realized there are PCs out there with serial ports that don't look at pin 9 at all (DELL has a few models) and gave us the option to default on that setting and I tested the wired connection with the new configuration so I know it works.

But I still can't get the bluetooth to work properly. It definitely connects, blue LED stays solid for 1 second or 2 and then it throws a 'data transmission error'. The 2 devices are seeing each other but it's almost like they're not speaking the same language.

The baud rate for the OBD2 seal connector is 9600 and used HyperTerminal to set the same on the bluetooth adaptor. Also both software and bluetooth adapter are setup for COM1 and again I kind of know it's good cause if I change the port to something else I lose those 2 seconds of solid blue.

Are there any other setting I should watch for? I feel I'm so close but just don't know what to do with it anymore, I kept working with it into the small hours of the morning without any success.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf