MEGAsquirt A place to collectively sort out this megasquirt gizmo

$20 Megasquirt Wifi

Thread Tools
 
Search this Thread
 
Old 01-28-2021, 07:18 AM
  #1  
Junior Member
Thread Starter
 
jonboy's Avatar
 
Join Date: Aug 2006
Location: UK
Posts: 191
Total Cats: 27
Default $20 Megasquirt Wifi

Hi All

I thought this might be of use to some on here - I've been looking for a cheap/easy way of getting a wireless connection to my MS3 - you can get off the shelf wifi and bluetooth adaptors but they tend to be pretty pricey - it turns out you can build your own for sub $20 fairly easily...

Hardware Needed:

Node MCU - circa $8 :
Amazon Amazon

You can buy these cheaper in bulk / ebay / china etc if you want...

RS232 TTL module - circa $9 :
Amazon Amazon

Again, probably available cheaper elsewhere, or if you can find the male half not a pair. This also comes with the patch leads which makes life simple.

Instructions:

https://mobisquirt.org/2018/07/wifi-hardware-update/

It's a pretty simple process - download some packages, flash the NodeMCU with the firmware (I used the alpha version) and it should power up. You can then connect to it's wifi connection and change the settings (wifi SSID / security etc) and change the baud rate to match your MS.
For the serial port, you will have to solder a connection to enable +5v to be passed through from the MS serial port. The instructions above show how to solder a jump cable, on my RS232 module there was a pair of solder pads that you could bridge to enable the connection easily.

After that it's a case of connecting power up - the instructions above show how to use resistors to drop the 5v from the MS to 3.3v, I didn't bother - according to the NodeMCU instructions the VCC pin is regulated anyway as the unit is designed to be powered from 5v USB..
For connecting TX / RX - depending on how your RS232 module is labelled you might need to swap them round to get it to work when connected to the MS. I did.

That's it - plug it onto the MS serial port, turn the key and it should power on. Connect to the wifi network, open Tunerstudio (or your app of choice), choose the IP you gave it earlier (or 192.168.4.1 if you kept the defaults), port 23 and you should be good to go If it powers up but Tunerstudio doesn't connect, try swapping TX/RX round.

Don't forget to put it in a case / insulate it to stop it from releasing the inner smoke if it shorts out.

A couple of points

If you try and connect via USB at the same time as the wifi module, you will get dropouts on both connections, so unplug one before using the other.

It's also possible to hardwire the NodeMCU module direct into the MS3, bypassing the TTL conversion stage and making everything sit inside the case - but this involves desoldering parts from the mainboard. I was happy enough to put up with some (minor?) speed loss compared to hardwired USB for convenience and less chance of me screwing something major up

This should work for other ECUs with serial ports, but may require a USB power source if there isn't 5v on the serial port. The NodeMCU firmware was made for presenting serial ports for routers / switches on the network, so you should be able to make it work with anything that has a serial port

I hope this is of use to someone else!
jonboy is offline  
Old 02-04-2021, 12:42 PM
  #2  
Senior Member
 
rwyatt365's Avatar
 
Join Date: Dec 2007
Location: ATL
Posts: 1,350
Total Cats: 128
Default

Okay, I was intrigued enough to buy the hardware but I'm having a helluva time trying to get the damned UART flashed! The instructions on the Mobisquirt site (after digging through multiple layers) show how easy it is using a Mac - with Windows, not so much. After downloading and installing multiple things from obscure sites (where I'm certain that I've permanently infected my laptop and now I'm being monitored by Kim Il Jong) I'm no closer to this thing working.

I'll continue chasing this down the multiple rabbit-holes I'm currently in, but if ANYONE has a clue on how to get this thing flashed using Windows I could use your help.
rwyatt365 is offline  
Old 02-04-2021, 02:43 PM
  #3  
Junior Member
Thread Starter
 
jonboy's Avatar
 
Join Date: Aug 2006
Location: UK
Posts: 191
Total Cats: 27
Default

I also flashed it on a mac as well..

But - you should be able to do the following to get it to work on windows:

Install Python: If you are on Win10 you can get it from the MS App store, if not go for the stable release - https://www.python.org/downloads/windows/

That should get you up and going - open up a command prompt and follow the mobisquirt instructions from 'pip install esptool' - (you can ignore any references to 'sudo' on windows) that should download a load of stuff - which windows helpfully hides from you, it will probably be somewhere like:

C:\Users\<your login name>\AppData\Local\Packages\PythonSoftwareFoundat ion.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages

or something similar - that's for the app store version, for the manually installed one it'll probably be in something like

C:\Users\<user>\AppData\Local\Programs\Python\Pyth on<version>/site-packages

Change to that directory in your CMD prompt then type :

python esptool.py version

should give you some output and show you that it's installed...

Carry on with the instructions - you will need to substitute the --port for whatever port windows detects the NodeMCU as (check device manager), or it looks like you may be able to skip --port entirely and it will try and auto detect. You will probably need to put the firmware in the same directory as the esptool.py executable, or prefix boot_v.1.6.bin and the rest of the .bin files with a directory that they are stored in :

eg. c:\firmware\python esptool.py --port COM1 --baud 230400 write_flash -fs 32m -ff 80m 0x00000 c:\firmware\boot_v1.6.bin 0x1000 c:\firmware\user1.bin 0x3fc000 c:\firmware\esp_init_data_default.bin 0x3fe000 c:\firmware\blank.bin

Hope that helps!
jonboy is offline  
Old 02-04-2021, 06:23 PM
  #4  
Senior Member
 
rwyatt365's Avatar
 
Join Date: Dec 2007
Location: ATL
Posts: 1,350
Total Cats: 128
Default

It helps...to a point.

Everything seems all well and good until I get to this point;
python esptool.py version
should give you some output and show you that it's installed...
Then you cay "Carry on with the instructions", which say "Download and unzip the latest esp-link package" so I go to "https://github.com/jeelabs/esp-link/releases/tag/v3.2.47.alpha" and download the zip file, and unzip it to the esptool directory, and that's where I get stuck. Because when I put in the python command line to flash the device, it says that there is no boot_v1.6.bin file. And that's true, no boot file is in the esptool directory. However, there IS a boot_v1.4(b1).bin file in the test\images\esp8266_sdk directory. (along with blank.bin and 4096_user1.bin). And if I copy those into the esptools directory (renaming them appropriately), then the python command runs just fine. However, then I try to open a browser to 192.168.4.1, I get a "connection refused" error. My suspicion is that those binaries are NOT the right ones.

I'm obviously doing SOMETHING wrong, but I don't know what.
rwyatt365 is offline  
Old 02-05-2021, 04:47 AM
  #5  
Junior Member
Thread Starter
 
jonboy's Avatar
 
Join Date: Aug 2006
Location: UK
Posts: 191
Total Cats: 27
Default

OK - if the python command to flash the files is working fine, then it sounds like the filenames / paths were wrong..

If you have the thing plugged in, and you search for wifi networks do you seen a new open wifi network - may start with ESP_<something>? If so, disconnect from your normal wifi and connect to that, then try going to 192.168.4.1
jonboy is offline  
Old 02-05-2021, 03:23 PM
  #6  
Senior Member
 
rwyatt365's Avatar
 
Join Date: Dec 2007
Location: ATL
Posts: 1,350
Total Cats: 128
Default

No such luck. I have "Wifi Analyzer" on my phone, and there are no new networks showing up, and definitely nothing named "ESP_xxx".

Climbing down the rabbit-hole I've even tried to "make" the new binaries by compiling the code, but have run into a whole raft of problems that I'm not prepared to deal with. So, I think I might just scrap this whole idea and go back to being hard-wired with my laptop and bluetooth with my tablet.

Shame...
rwyatt365 is offline  
Old 02-05-2021, 03:32 PM
  #7  
Junior Member
Thread Starter
 
jonboy's Avatar
 
Join Date: Aug 2006
Location: UK
Posts: 191
Total Cats: 27
Default

Mmmmkay.. You shouldn't need to compile anything, it sounds like it's just the firmware that isn't flashing right, the tools to flash them are working OK..

Are you downloading the firmware from: http://s3.voneicken.com/esp-link/esp...7-g9c6530d.tgz

If I download and unzip that, I have:

avrflash
megaflash
blank.bin
user1.bin
boot_v1.7.bin
user2.bin
esp_init_data_default.bin
wiflash

Maybe try downloading from that link, unzip to c:\firmware and then run:

python esptool.py --port COM1 --baud 230400 write_flash -fs 32m -ff 80m 0x00000 c:\firmware\boot_v1.7.bin 0x1000 c:\firmware\user1.bin 0x3fc000 c:\firmware\esp_init_data_default.bin 0x3fe000 c:\firmware\blank.bin
jonboy is offline  
Old 02-07-2021, 09:22 AM
  #8  
Senior Member
 
rwyatt365's Avatar
 
Join Date: Dec 2007
Location: ATL
Posts: 1,350
Total Cats: 128
Default

I had a flash of inspiration yesterday! I thought, "Why am I screwing around with Windows, when I have a Ubuntu boot on my crappy old desktop system?" So I put the tarball on a thumbdrive, copied it onto Ubuntu, un-packaged it, and then copied the files back to the thumbdrive. Once I had those bac onto the Windows system it was easy-peasy from there! I got the device flashed just fine so now I'm putting together a small project box to hold the MCU, with a short cable to the serial adapter. That's my project for today. I should have it ready to test tomorrow.

Thanks for sticking with me through this experiment!
rwyatt365 is offline  
Old 02-14-2021, 10:05 AM
  #9  
Senior Member
 
rwyatt365's Avatar
 
Join Date: Dec 2007
Location: ATL
Posts: 1,350
Total Cats: 128
Default

Just a follow-up. I got the MS to connect to my laptop via the WiFi and it seems to be working just fine! My challenge now is to get it to talk to my tablet so that I can use that as a dashboard long-term. I can get the tablet to connect to the ESP WiFi, but when I try to connect MSDroid to the WiFi it just sits and spins. I'm sure there's a setting or something that I'm overlooking, but for now I'm just happy that it talks to the laptop.
rwyatt365 is offline  
Old 02-14-2021, 10:36 AM
  #10  
Junior Member
Thread Starter
 
jonboy's Avatar
 
Join Date: Aug 2006
Location: UK
Posts: 191
Total Cats: 27
Default

In MSDroid -

App Settings, Connection Type, Wifi.
App Settings, IP Address -> Your ESP IP Address (192.168.1.4 is the default)
App Settings, IP Port -> 23
jonboy is offline  
Old 02-14-2021, 10:51 AM
  #11  
Senior Member
 
rwyatt365's Avatar
 
Join Date: Dec 2007
Location: ATL
Posts: 1,350
Total Cats: 128
Default

Originally Posted by jonboy
In MSDroid -

App Settings, Connection Type, Wifi.
App Settings, IP Address -> Your ESP IP Address (192.168.1.4 is the default)
App Settings, IP Port -> 23
Did that on the laptop - works like a charm!

Did that on the tablet - sits and spins. It's a knock-off, tablet so I'm not surprised. It's probably some obscure setting on the tablet that needs tweaking.
rwyatt365 is offline  
Old 02-15-2021, 08:02 AM
  #12  
Senior Member
 
rwyatt365's Avatar
 
Join Date: Dec 2007
Location: ATL
Posts: 1,350
Total Cats: 128
Default

It's just the tablet...MSDroid on my phone works just fine.

FWIW, the tablet will read the MS, upload and update the project, but the indicators just seem not to work. I think I'll pop over to MSExtra.com and see what they say over there.
rwyatt365 is offline  
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
f1-mx-5
MEGAsquirt
4
12-18-2013 06:28 PM
krissetsfire
MEGAsquirt
0
09-28-2011 12:28 AM
skidude
MEGAsquirt
9
03-16-2011 04:55 AM
sihinch
MSPNP
4
10-04-2009 03:42 PM
Sam Amporful
WTB
19
10-18-2008 03:34 AM



Quick Reply: $20 Megasquirt Wifi



All times are GMT -4. The time now is 05:39 AM.