Megasquirt Forum Area is for discussing Megasquirt EMS

Megasquirt $14 Bluetooth now working on MS2

Thread Tools
 
Search this Thread
 
Old 02-25-12, 08:17 PM
  #76  
Senior Member

 
.::evil inside::.'s Avatar
 
Join Date: Jun 2004
Location: Australia
Posts: 263
Received 2 Likes on 2 Posts
I wish it was the former, unfortunately it is the latter.
Old 03-07-12, 08:52 PM
  #77  
Senior Member

 
.::evil inside::.'s Avatar
 
Join Date: Jun 2004
Location: Australia
Posts: 263
Received 2 Likes on 2 Posts
Ok, I was feeling too sane today. So I decided to have another play around with this bluetooth adapter so I could drive myself crazy.

I had the opportunity to try to update my MS firmware with another laptop, it all went smoothly this time. I'm now running 3.2.1 without a problem.
I tried to connect to the MS via bluetooth using Tunerstudio Beta 1.21 and I received this error



I tried stuffing around with a few of the communication settings but nothing worked. It does still seem as though there is a problem of some sort with the bluetooth adapter.

So I tried to connect using my phone, the following is the sequence of messages I get when I try to connect.






This error I'm getting from my phone makes it seem more certain that there is a problem with the adapter of some sort. However it could be wrong I guess.

The bluetooth adapter tests just fine with Hyperterminal, all the commands come back ok so I have no idea where to go from here.
Old 03-08-12, 10:47 AM
  #78  
Junior Member
 
ErnestChristley's Avatar
 
Join Date: May 2011
Posts: 29
Likes: 0
Received 0 Likes on 0 Posts
Evil, your post reflects what I've seen. If you turn on logging, both TS and SL have the option, I bet that you'll see that queries are getting through to the MS, and that the data starts coming back through but is then interrupted after "MS" which is the start of the version string from the firmware.

Communication from the computer to the adapter is fine. The computer has captured the adapter's name, so that leg of the path is fine. The MS is getting the data query from the adapter (else, it wouldn't be trying to respond); therefore, we know that leg of the path is fine. The computer sees SOME of the data from MS. The only leg of the path that is not verified is the MS to adapter link.

I submit that the serial link is not "healthy". The link is good enough for the query from the computer to get the one or two query characters it needs through. It is good enough to get the first few characters of a reply out. After that, the link breaks down and throughput goes to zero. It's almost as if one side or the other is ignoring flow-control, even though it has been explicitly set.
Old 03-08-12, 10:53 AM
  #79  
S5 powered Lotus 7 clone

Thread Starter
 
rx7locost's Avatar
 
Join Date: Aug 2008
Location: Illinois
Posts: 115
Likes: 0
Received 0 Likes on 0 Posts
Hey Evil, I'm glad you have momentary bouts of sane-ness. Everybody should now and again.

Regarding the TunerStudio Settings Error Message. I am a bit confused with the terminology of that message. IF there is no communication between TS and the MS, then how can MS send an intelligent error message back to TS? Is this not a Catch 22? I think what is happening is that TS sees no, or poor, communication and then says that the MS sent that message. I think the wording of the message is misleading and the message is actually created by TS.

Regarding the Shadow logger, your 1st photo shows it is connected to the Megasquirt at time 1:27. The last 2 photos show the time as 1:25. It makes me wonder which photo is first, 2nd, 3rd etc. Do you mean that you sometimes get communication and sometimes not? But I don't know anything about Android or such devices. I'm beginning to doubt my knowledge about Computer communications stuff

If I do a search of Megasquirt + “framing error” I get the indication that this means the baud rates are not matched. If I do a search of RS232 + “framing error” I get results of start/stop bits not matching and ….. best described by the following:

"Framing Error" in an RS-232 context means a very specific thing - when the receiver was expecting a stop bit, the line was not in SPACE condition. This can be the result of:
1... Baud rate mismatch (although other problems would likely crop up first).
2... Data Length problem, If I send 8 data bits and you expect 7, the stop bit is in the wrong place.
3... Parity setting mismatch - If I send 7 data bits + parity and you expect 7 data bits and no parity, the stop bit is in the wrong place.
4... Mismatch in # Stop bits - If I send you 7 Data bits + parity + one stop bit, and you expect 7 data bits + parity + TWO stop bits, the second one might not be correct, although most devices do not complain about this.


--- I would double-check ALL the com s
ettings, including the # STOP BITS - that's not shown on your screenshot.



Since MS communication port is setup by default in a certain way, the virtual COM port related to the BT connection in your PC and the BT module itself MUST match those parameters. The only settings in the BT Module setup are Baud rate and Parity. 115,200 and None, respectively

Have you tried a loopback test to verify the adapter is working? If you haven’t, it might be a good thing to try about now. It will eliminate any configuration issues between the MS and the adapter and just test the BT adapter itself. If that works, then the problems are either a configuration issue or a MS issue. You will have to power the adapter separate from the Megasquirt and also short pins 2 and 3 on the adapter’s DB9 connector. Open TunerStudio while connected to nothing. Go to offline (probably not an issue right about now) if not already done by default. Then using TS’s drop-down application Communications/Miniterminal you can open the appropriate COM port (the BT COM port supporting SSP protocol) and verify communication at any baud rate from 9600 to 115K by just changing the baud rate in the lower menu. Anything you type in the upper window should be reflected in the lower window (only vertically). This should tell you if you have a working BT Adapter and if the problems are just due to setting up the adapter communication properties such as baud rate or flow control etc.

I just tried the loopback test and it works on my module.
Old 03-08-12, 11:02 AM
  #80  
S5 powered Lotus 7 clone

Thread Starter
 
rx7locost's Avatar
 
Join Date: Aug 2008
Location: Illinois
Posts: 115
Likes: 0
Received 0 Likes on 0 Posts
Ernest, Last I heard from you was you were going to try a different laptop. Was that a bust?

I read somewhere else that they followed my instructions and had some problems too. They solved it by bypassing the 2 MAX232 chips in the MS and the module. This required wires out of the MS box and plugging into the 4-wire header on the adapter. I read where this may not be good unless you remove the chip from the MS: something about corrupt signals, which makes sense to me. This is something I didn't want to do so I could still upgrade the MS firmware by wire if needed. I wonder if 2 MAX232 chips talking to each other might be an unreliable contact. I'll have to do some thinking/investigation about that.

Would you run a loopback test too?
Old 03-08-12, 11:44 AM
  #81  
S5 powered Lotus 7 clone

Thread Starter
 
rx7locost's Avatar
 
Join Date: Aug 2008
Location: Illinois
Posts: 115
Likes: 0
Received 0 Likes on 0 Posts
OK I got some thinking done. It seems that some mfgr's of the rs232 level shifter IC need different capacitors. Since Ernest's module worked on my MS system, I wonder if it has to do with the mfgr of the MAX chip in your builds? perhaps my build (a DIY model) used different mfgrs and IC's. I seem to recall mine was maybe a MAX3232 IC r maybe I'm rembering the adpater modules converter.My MS is difficult to get to. I'd have to remove my windshield and entire scuttle panel to access it; a few hour's work each way. I'm not in an RX-7 chassis of course. I will do this if necessary though.

After you get a successful loopback test and IF it is easy, could both of you look at your MS boards and give me all the numbers and any logos on U6? A clear photo of this IC would suffice if that is easier. This may help me narrow down the mfgr and their recommendations. MAXIM, the original mfgr of the MAX232, recommended 1uF not 0.1uF . If it is a MAX232A ,then it should have the lower values. There have been some reportsof flakey MAX232 IC's although I'm not sure of the mfgr or sugffix. The lower value is in my bill of material/schematics. Also, what are the values of C26, C27,C28 and C29? They may have a "104" or a "105" on them.
Old 03-10-12, 09:57 PM
  #82  
Senior Member

 
.::evil inside::.'s Avatar
 
Join Date: Jun 2004
Location: Australia
Posts: 263
Received 2 Likes on 2 Posts
Thanks for the tips, I'll do the loopback test when I get a chance.

My U6 chip is this one. Manufactured by ST.
http://au.mouser.com/ProductDetail/S...feQri24w%3d%3d

I'm unsure about the capacitors as my MS is a bit hard to get to, I'll see what I can do about checking that out.
Old 03-10-12, 11:36 PM
  #83  
Senior Member

 
.::evil inside::.'s Avatar
 
Join Date: Jun 2004
Location: Australia
Posts: 263
Received 2 Likes on 2 Posts
So I did a loopback test, unless I'm doing something wrong it failed.

I jumpered pins 2 and 3 together, powered up the BT adaptor and connected to the laptop with no problems (solid LED). But when I type commands into mini-term it isn't reflected in the bottom of mini-term in TS.

As Ernest said, it seems to be communicating but truncated as I can get MS parameters showing on my phone via bluetooth but it is quite glitchy.

Any suggestions? I did think the loopback would work, unless I have overlooked something. I am 100% certain the bluetooth adapter has been set up correctly in hyperterm using the AT commands, I just re-tested it for the thousandth time.
Old 03-12-12, 03:34 PM
  #84  
S5 powered Lotus 7 clone

Thread Starter
 
rx7locost's Avatar
 
Join Date: Aug 2008
Location: Illinois
Posts: 115
Likes: 0
Received 0 Likes on 0 Posts
If the loopback test didn't work, then you will have no chance of it working while connected to the MegaSquirt. Did you manually assign the COM port to the BT during initial BT pairing? or just let it be? The only reason I asked is that a PC sometimes uses hidden COM ports that cannot easily be viewed. If you manually selected the COM port, you may have accidentally assigned the COM port number to one already being used. This might cause erratic communications even in Miniterminal. If the COM port was self-assigned during the
installation, then that should not be an issue. Windows somehow remembers the highest COM port EVER used and increments that during the BT setup.

The reason I keep coming back to setup is that Ernest's unit seems to be malfunctioning in a similar manner to yours. I know he manually assigned a low COM port for his own reasons. When I got his unit and let it pair with my machine and automatically assign the COM port, it worked fine. I wish I had the thought to try a loopback test on his, although i didn't need to since it worked fine.

The ST conversion chip should be fine in your MS with the 0.1uF caps. Since you can communicate via a wired connection, the chip should not be damaged. It was just a thought.

I would try to uninstall the BT pairing and reinstall/repair using all default values. Then try the loopback test using all the available COM ports shown in Miniterminal one by one. note the Com port number assigned with SPP service and start at that COM port number for the Loopback test.

Else...... Ummmm, I have no further suggestions. Sorry.

Chuck
Old 03-12-12, 10:20 PM
  #85  
Senior Member

 
.::evil inside::.'s Avatar
 
Join Date: Jun 2004
Location: Australia
Posts: 263
Received 2 Likes on 2 Posts
I've just done some more testing and I got the loopback test to work. It was just my bluetooth being an ******* by the looks of it. I tried some different com ports while I was at it and got the same results.

The com port I was using had been assigned automatically during the set up.

When the loopback test worked, I thought great! This will work now. I connected it to the MS and got the same lovely error message.

I'm lost as to what it may be, the BT adapter passes all the tests, the MS we know works fine, the laptop is communicating like it should...

Old 06-10-12, 08:47 PM
  #86  
Senior Member

 
Verneuil's Avatar
 
Join Date: Sep 2008
Location: Glen Burnie, Maryland
Posts: 543
Likes: 0
Received 0 Likes on 0 Posts
Just got mine working. Wow took a while at that. Data seems to be stable. This is not in my car yet. But seems to be working well!
Old 07-10-13, 11:42 AM
  #87  
Full Member

 
camman's Avatar
 
Join Date: Dec 2005
Location: utah
Posts: 189
Likes: 0
Received 0 Likes on 0 Posts
I'm having the same problems! my buddy and i both got one of these and set them up. they both work great on his mspnp, bet neither of them work on my ms2 3.0. i have only tried with my phone, but I have tried 4 different android phones with 3 different apps to no avail. I originally got it to communicate for about a min but nothing after that. I keep getting error messages that it can't read the firmware in the ms
Old 07-12-13, 02:51 AM
  #88  
Senior Member

 
.::evil inside::.'s Avatar
 
Join Date: Jun 2004
Location: Australia
Posts: 263
Received 2 Likes on 2 Posts
I gave up and bought the one from EFI analytics - works great. I've been using it with MSdroid which is awesome!
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
maikelc
3rd Generation Specific (1993-2002)
8
08-24-15 11:04 AM



Quick Reply: Megasquirt $14 Bluetooth now working on MS2



All times are GMT -5. The time now is 05:50 PM.