EMW3165 - a ESP8266 WiFi killer?

Anything not related to STM32
User avatar
RogerClark
Posts: 5931
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: EMW3165 - a ESP8266 WiFi killer?

Post by RogerClark » Tue Aug 11, 2015 8:51 am

I just took another look at the contents of the flash, and the STlink was being a bit too clever and has decided that as there were a load of memory locations with 0xff in them, that it must be the end of the program in flash

However when I manually changed the amount of flash to read, to 0x200000, ile all the flash, I can see that there is some code at 0x800000 for about 6k, then a gap up to 0x800C000 i.e 48k,
Then there is around 300k of data. This seems like a lot of data for just code, so I suspect it also contains images that the wifi admin system uses.

Taking a quick look at the bin file, the HTML for the admin system seems to be in the F4's flash rather than in the wifi sub system

e.g. there is text like this

Code: Select all

<HTML>
<HEAD>
<TITLE>Error</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
</HEAD>
<BODY><H1>401 Unauthorized.</H1></BODY>
</HTML>
and its null terminated.

I'm going to save out the code section separately from the bootloader, and I'm going to make a small change to the text and see if I can upload it via the web interface.

I suppose it could completely break the wifi is the upload code is runs on the wifi rather than the F4, but I suspect it runs on the F4, so its worth a shot !

Edit. Well, I have not uploaded anything, but the wifi access point no longer appears :-(

All I did was tack a few wires to Hardware serial 1 and also to PA7, which currently don't go anywhere apart from the beadboard via my home made veroboard breakout.

I'm a bit loathed to unsolder it. So I may just have a go with flashing a sketch onto it, afterall I have saved the original firmware so I could restore it.

User avatar
martinayotte
Posts: 1171
Joined: Mon Apr 27, 2015 1:45 pm

Re: EMW3165 - a ESP8266 WiFi killer?

Post by martinayotte » Tue Aug 11, 2015 6:05 pm

mrburnette wrote:
martinayotte wrote: <...>
I think I will jump in soon by ordering one module. Pricing is so attractive.
I'm not there yet. Pricing is only 1 piece of a 3 or 4 part puzzle. Keep posting: I'm listening to the noise and like SETI I hope to hear something intelligent 8-)

Ray
Hi Ray, I've said "attractive" because the price is almost the same as the price of the F411 itself ;)

User avatar
martinayotte
Posts: 1171
Joined: Mon Apr 27, 2015 1:45 pm

Re: EMW3165 - a ESP8266 WiFi killer?

Post by martinayotte » Tue Aug 11, 2015 6:35 pm

Hi Roger,

So much informations you've provided, thanks, I decided to jump into : I've just placed my order ! (but, normal postage shipping to save the cost)
I can email the firmware bin to you if you want to look at it
I don't need it for now, I do my own backup when I get my module ... ;)
I may also see what the minimum is required to connect USB. I think its just 2 x 22ohm resistors, the 1.5 k pullup, and some small capacitors, but I'll need to see if I can find a very simple circuit for usb on a F4, because upload via DFU on USB is built into the hardware isnt it ?
Yes, inspires yourself with the stm32f4stamp schematic from Frank Zhao (see attachment), he didn't even bother with the 1K5, but I suggest to add it.

Code: Select all

Then there is around 300k of data
Maybe they have done some kind of filesystem like SPIFFS, as you said, for all Web content.

I'm already anxious to play with this new puppy ! :)
Attachments
stm32f4stamp-SCH-20131027.zip
(42.54 KiB) Downloaded 49 times

User avatar
RogerClark
Posts: 5931
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: EMW3165 - a ESP8266 WiFi killer?

Post by RogerClark » Tue Aug 11, 2015 9:12 pm

Hi Martin

Thanks for the information.

I think I will need to wire up my spare EMW3165, as the first one has given up on running its wifi. I think the F4 is OK, as STLink talks to it and i can read the flash and even look at the cpu registers etc.

Actually, I will try running it off an external usb psu first, as the voltages i get from my PC are well below 5v, so I suppose that may be the problem.
I will also unsolder the wires I attached to the USB and one of the SPI pins, on the offchance i have shorted something.

I did take a quick look at making another variant last night, and reacquaint myself with the F4 folder, and i was surprised that there is only one Variant folder.
I will need to look at the code in the folder, as the F405 stuff must be very similar to the 407 for it to be able to share the same code.

I'm not at all familiar with the F4 family, and how the F411 differs from the 407. I know the clock is only 100mhz, instead of the 168mhz on the 407, but I will need to see where the PLL stuff etc is setup, to see if anything needs to be changed for 411.

User avatar
martinayotte
Posts: 1171
Joined: Mon Apr 27, 2015 1:45 pm

Re: EMW3165 - a ESP8266 WiFi killer?

Post by martinayotte » Tue Aug 11, 2015 10:11 pm

RogerClark wrote: I did take a quick look at making another variant last night, and reacquaint myself with the F4 folder, and i was surprised that there is only one Variant folder.
I will need to look at the code in the folder, as the F405 stuff must be very similar to the 407 for it to be able to share the same code.
Yes, I know that a lot of stuff in F4 still ugly, legacy from libmaple, there are even files with F1 or F2 suffixes but they handle F4 code ... :o
I was thinking to get a "spring cleanup", but I think it will take many springs ... ;)
RogerClark wrote: I'm not at all familiar with the F4 family, and how the F411 differs from the 407. I know the clock is only 100mhz, instead of the 168mhz on the 407, but I will need to see where the PLL stuff etc is setup, to see if anything needs to be changed for 411.
When I work to make the PLL working on Netduino, I found the code in arduino-1.6.1/hardware/Arduino_STM32/STM32F4/cores/maple/libmaple/rccF2.c
(again F2 suffix).
The code is completely different from the one of F1. But we have to live with it...

User avatar
RogerClark
Posts: 5931
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: EMW3165 - a ESP8266 WiFi killer?

Post by RogerClark » Tue Aug 11, 2015 10:21 pm

Hi Martin

There is loads of stuff in the F1 as well, where the naming could be drastically improved, but as its working and most people don't care about the internals, its seems pointless wasting time changing it.

I just powered my module off a USB supply, but its still not appearing as Wifi any more :-(

I'm just downloading a wifi scanner, to see if its broadcasting at all, e.g. in some sort of unitialised mode.

But it looks like I'll need to wire up my spare on as well.

User avatar
RogerClark
Posts: 5931
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: EMW3165 - a ESP8266 WiFi killer?

Post by RogerClark » Wed Aug 12, 2015 9:41 am

I've wired up my spare EMW3165, and its Wifi is working, but the original one I was using, no longer has wifi :-(

I can still use STLink to read the firmware in the original module, but no matter what I do the wifi is not visible at all.

I can only think of a few reasons why the original module is no longer working correctly.

Firstly I used a hot glue gun to glue module onto my home made breakout board, and I then used a hot air gun (solder reflow gun) set to 100 deg to melt the glue a bit, so I could reposition the module. I looked at the reflow soldering temperature characteristics curve, and the whole module can't be heated at more than 3 deg per second. However I was not heating the whole board, just blowing 100 deg C air under it from a distance.
So although this is one possible cause, it would mean that these modules are very liable to failure when if put in a reflow oven to solder them to a PCB.

The other possibility is that I somehow shorted out an adjacent contact, that had some impact on the boards comms with the Wifi module.
However I strongly suspect that whatever the connections are to the Broadcom wifi module, that they are not on pins that are broken out to the edge of the module.

Perhaps somehow I managed to accidently do something using STLink which has change some sort of battery backed or EEPROM setting, but this also seems unlikely

Or perhaps its some sort of electrical static damage to the wifi via its antenna - which is on a pin on the breakout.

Who knows.

All I know is I now have one board that no longer functions on Wifi :-(

Erni
Posts: 7
Joined: Thu Jun 18, 2015 12:25 pm

Re: EMW3165 - a ESP8266 WiFi killer?

Post by Erni » Wed Aug 12, 2015 11:42 am

I got my emw3165 in the mail today, and managed to solder on some thin wire to the gnd and VDD pads (pew that realy put some strain on my old eyes, they are very small).

When I connected it to a 3.3V supply it turned up as MX-Chip_50A781 in the available wifi list. I used admin, admin (thanks RogerClarke) to login.
There are all kinds of information available from the module, which I only partly understand, but one page shows that it is possible to upload new firmware see below:
Attachments
emw.jpg
emw.jpg (26.47 KiB) Viewed 1687 times

jmg5150
Posts: 1
Joined: Wed Aug 12, 2015 8:13 pm

Re: EMW3165 - a ESP8266 WiFi killer?

Post by jmg5150 » Wed Aug 12, 2015 8:24 pm

Hi Roger + all,

Just thought I'd chime in on this topic - thanks to emilfr, there's now a patch for the WICED SDK which can be used to compile code for this module using GCC. http://www.emw3165.com/viewtopic.php?f=10&t=11
github repo here: https://github.com/MXCHIP-EMW/WICED-for-EMW

I also checked back in with MXCHIP yesterday and their estimate for GCC porting to be completed is still another 3 to 4 weeks.

The guys behind the WiFiMCU project (http://www.wifimcu.com/en.html) seem to have made an awesome breakout board for this module however I cannot find anywhere to purchase it, and my emails to them have gone unanswered. I'm thinking to bite the bullet and whip up my own in the coming days.

I'd love to see this project working on the EMW3165, let me know if there's anything in particular I can do to help.

Cheers,
-Jonathan

User avatar
RogerClark
Posts: 5931
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: EMW3165 - a ESP8266 WiFi killer?

Post by RogerClark » Wed Aug 12, 2015 9:15 pm

I have soldered Vcc,Gnd and 2 wires for Stlink.

I use a pair of cheap x3 magnifying reading glasses, but really i need something with more magnification. I think Vassilis linked to a pair of x10 binocular magnifiers on AliExpress, I should really buy some of those ;-)


I also saw all those settings, and that you can upload firmware, ( also see Martins post).


Be very careful if you only have one module. I have somehow broken the wifi in one of my modules.

I have not had time to try compiling and uploading via STLink yet.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest