Bluetooth troubleshooting with TunerStudio/ShadowDash MS

For discussion of Phil Tobin's Tuner Studio software (Only about the tuning software itself, not about how to tune or firmware features)

Moderator: LT401Vette

sabretooth
MS/Extra Newbie
Posts: 14
Joined: Thu Mar 01, 2012 4:55 am

Re: Bluetooth troubleshooting with TunerStudio/ShadowDash MS

Post by sabretooth »

I can't find anything about loopback or local echo in the actual datasheet. Honestly I don't think that's the problem. I'll explain my steps here, and what happened at each point. Bear with me - I'm not ignoring your advice, just explaining what I think is going on. I used to call BBS systems back in the day, so I'm aware of what local echo is for - I just don't think that's what's going on here. Nor can I find a way to turn such a function off.

It's a Linvor1.8 bluetooth device (I'm just going to refer to it as BT from here). Presumably a HC-06. It's configured at 9600,8,N,1, no flow control. I've set the PIN, name and baud rate successfully myself. I can pair to it just fine and issue programming commands.

So I started with the BT hooked up to the MegaSquirt, and nothing on the female side of the BT. I have the wire on the BT which allows pin 9 to supply power. COM13 is the paired bluetooth serial port. I connect to that with Tuner Studio's mini terminal. Everything is clear. Setup is: MegaSquirt->BT. Typed: "S"
Response:
M[¯m[¯M[¯m[¯M[¯m[¯M[¯MS¯M[¯m[¯M[¯m[¯M[¯mS¯M[¯mS¯MS/M[¯M[¯mS¯M[¯m[¯M[¯m[¯M[¯m[¯m[¯m[¯M[/M[¯MS¯mS¯M[¯mS¯m[¯mS¯m[¯mS¯m[¯mS¯mS¯mS¯m[¯MS¯m[¯mS¯mS¯M[¯M[/mS¯m[¯mS¯M[¯mS¯m[¯mS¯m[¯mS¯m[¯mS¯m[¯mS¯mS¯MS¯m[¯mS¯m[¯m[¯m[¯mS¯m[¯m[¯mS¯mS¯mS¯m[¯mS¯m[¯m[¯m[¯m[¯m[¯mS¯m[¯mS¯m[¯m[¯M[¯MS¯m[¯m[¯m[¯m[¯m[¯m[¯M[¯m[¯MS¯MS¯M[¯M[¯M[¯m[¯M[¯m[¯M[¯m[¯M[¯m[¯MS¯M[¯MS¯MS¯M[¯mS¯M[¯m[¯M[¯m[¯m[¯m[¯MS¯M[¯m[/mS¯m[¯mS¯M[¯mS¯m[¯m[¯m
This continues until I press S again, or even P.

So, for the next test, I leave everything as-is, but I connect the USB->serial adaptor into the female side of the BT, and into that I plug my laptop. Again, I connect to COM13 using Mini Terminal. Setup is: MegaSquirt->BT->USB/Serial->laptop. I type "S". Response:
MS/Extra format hr_10 **********
For each press of S, another signature appears. Great!. TunerStudio connects fine. Pairing with my phone and tablet work fine. All is good.

So then I tried disconnecting my laptop. Setup: MegaSquirt->BT->USB/serial. I hook up to the terminal again, and enter "S". Response:
MS/MS/MS/MS/MS/MS/MS/MS/MS/MS/MS/MS/MS/MS/MS/MS/MS/MS/MS/MS/MS/MS/MS/MS/MS/MS/MS/MS/MS/MS/MS/MS/MS/MS/MS/MS/MS
Then while this is being spat out, I pull the USB->serial from the end of the bluetooth completely. Setup: MegaSquirt->BT. Output:
M[¯m[¯M[¯m[¯M[¯m[¯M[¯M[¯m[¯M[¯m[¯M[¯m[¯M[¯
So, baffled. I decided to try one more thing: MegaSquirt->BT->USB to serial->car charger. Yep, I plugged the USB->serial adaptor into the USB car charger which I used to charge my mobile phone when I'm in the car. I pressed "S". Response:
"MS/Extra format hr_10 **********"

So, my take. I think there's something that the USB->serial adaptor is doing - supplying power, setting a line high, low, whatever - I don't know. But whatever it is, the Adaptronic alread does or does not require done.

And the posters that say they have it working do not appear to be using an MS1 - they seem to be using a MS2/MS3 - except for the one thread where a guy wired it directly to the MAX232/MegaSquirt CPU pins.

A picture of the working setup:
Image

EDIT: from MegaManual:
This "socket" adapter needs to have the serial handshake lines operational, so you can use the common trick of tying the handshake lines together on the connector. To do this, you need to short together pins 7-8 and 1-4-6 on the DB-9 for handshaking. You jumper pins 1, 4, and 6 on the DB-9 (on the underside of the PCB), then another jumper between 7 and 8.
I think it might be worth giving that a try.
Trev16v
Master MS/Extra'er
Posts: 420
Joined: Tue Apr 08, 2008 1:30 pm
Location: Oxfordshire, UK

Re: Bluetooth troubleshooting with TunerStudio/ShadowDash MS

Post by Trev16v »

I reckon what you've identified here is that the interface isn't getting a clean enough power supply from the ECU, and that the presence of the USB - serial adapter is compensating for this; either perhaps because the USB - serial adapter intentionally provides power via the DB9 pin 9, or alternatively because of current being fed into one of the IO lines is finding its way onto the supply rail.

The reason the Bluetooth adapter may not be getting a clean enough supply is because you have it on the end of a cable to the ECU. Try plugging it into the ECU directly, and / or put an additional electrolytic capacitor across the supply on the Bluetooth interface. The issue with these Bluetooth adatpers is that they need a particularly stiff power supply due to the transmitter part of the radio which can draw many hundreds of mA in pulses. The inductance of the long cable means the power at the module ends up being incredibly noisy. This tens to result in corrupted data (garbage characters). In your case perhaps it's just sending it into a state where it keeps sending a stream of garbage characters.

I would recommend that these interfaces are NEVER used on a cable. Plug directly into the ECU. Otherwise you simply will get data corruption with certain interfaces.

If you have actually already tried plugging it directly into the ECU then hmm, back to drawing board!
Golf MK2 G60 Syncro with 16VG60 on MSNS-E

MSDroid :: MegaSquirt tuning on Android

Image
sabretooth
MS/Extra Newbie
Posts: 14
Joined: Thu Mar 01, 2012 4:55 am

Re: Bluetooth troubleshooting with TunerStudio/ShadowDash MS

Post by sabretooth »

I've tried plugging it directly in - when i was doing that last post I got lazy and just used the serial extension cable . But the symptoms were the same.

Also, some of the previous testing I had done actually used my laptop as a power source - I have a USB cable which I used to plug into two of the pins on the device.
sabretooth
MS/Extra Newbie
Posts: 14
Joined: Thu Mar 01, 2012 4:55 am

Re: Bluetooth troubleshooting with TunerStudio/ShadowDash MS

Post by sabretooth »

Right, soldering all those pins together - all that seems to have done is stop it outputting garbage and make it output "MS/MS/MS" without needing the unplugged USB-serial adaptor hanging off of the end (with nothing plugged into the USB end).

Then I hooked up my USB-serial adaptor when plugged into my cigarette lighter USB charger and it behaved itself. So no real progress. Something I found interesting was that if I typed "S" into that, then in the sea of "MS/MS", occasionally the signature would appear. I don't know what the powered USB-serial adaptor is doing to the adaptor, but it likes it.


I suspect that I should just throw in the towel and get one of the overpriced ready-to-go ones.
landmer
MS/Extra Newbie
Posts: 7
Joined: Sun Mar 30, 2014 11:30 am

Re: Bluetooth troubleshooting with TunerStudio/ShadowDash MS

Post by landmer »

I guess you gave up finally. But have to ask anyway :) Did you get it to work any time?

I have not made the handshake mod yet but it only responds MS/MS/MS/MS/.... to me instead of giving the firmware id. (like yours did after making the handshake mod?)
Post Reply