To see if I understand correctly:
You have a device and a Bluetooth modem that each connect to the same PC?
The Bluetooth modem connects to an industrial device, which is HART programmable. The reason why I chose to use Bluetooth is because in one area of our plant we dip the car bodies in electroplating "goo". Really, really, sticky stuff, and this allows me to put the modem in a baggies to prevent it (and the laptop, which is several feet away) from getting sticky.
And you want to receive data from the device and send the data to the modem?
I already do for every HART programmable device except the one for the DrexelBrook level transmitter. The industry standard is to create your own DTM (a fancy driver created by the manufacturer of the device that gets called from PACTWare) and integrate it into PACTWare.
And you want to use software from the device's vendor to do so?
I pretty much have to. They naturally control the format of the data going to and fro from their device, and short of reversing it, I have to use their software.
Some things I would check:
Can the vendor program find the Bluetooth modem's COM port?
Nope. But they aren't looking for them either. Their program strictly accesses a COM port. What you have connected to it is your concern.
And this is the crux of the matter, all they ask for is a COM port. Baud rate, parity, data bits, and stop bits are all predefined in the HART protocol spec (1200 baud, 8 data bits, odd parity, and one stop bit). Any changes to these parameters in Windows Device Manager will be ignored. You can set them up in any way that you like. Parameters changed outside of this group (i.e. Handshaking) will have an effect (for example, setting handshaking to "Hardware" will always make the connection fail)
But somehow the software knows that this isn't quite a normal COM port. Using a serial port monitor, I can see that it doesn't even try to send anything out the COM port if COM port selected is the one that the Bluetooth is connected to. Using my "loopback" setup and connecting the software to a normal port, and then using my program to do the talking to the Bluetooth modem will get me most of the parameters. So there is something at some level that is different on the modem than there is on a standard COM port. Weird...
And I keep referring to the Bluetooth modem as a modem because it uses the DCD (or CD, Carrier Detect) line the way that a modem would (but doesn't use the AT command set). CD is brought high when the Bluetooth modem is turned on. And I believe that this is the proper behavior. One of the tests that I would like to make is to see if the CD line is dropped or its operation is somewhat modified due to the additional RS232 devices in the link.
Are the parameters correct - flow control, data bits, etc.?
Yup. The end user doesn't have much say in the matter either. The modifiable parameter is flow control, and it must be set to "None"
Thanks Jan for looking into this!
John