<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://bitwizard.nl/wiki/index.php?action=history&amp;feed=atom&amp;title=Firmware_upgrade_STM32Wifi</id>
	<title>Firmware upgrade STM32Wifi - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://bitwizard.nl/wiki/index.php?action=history&amp;feed=atom&amp;title=Firmware_upgrade_STM32Wifi"/>
	<link rel="alternate" type="text/html" href="https://bitwizard.nl/wiki/index.php?title=Firmware_upgrade_STM32Wifi&amp;action=history"/>
	<updated>2026-04-05T19:59:20Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.6</generator>
	<entry>
		<id>https://bitwizard.nl/wiki/index.php?title=Firmware_upgrade_STM32Wifi&amp;diff=3038&amp;oldid=prev</id>
		<title>Rew: /* performing the upgrade */</title>
		<link rel="alternate" type="text/html" href="https://bitwizard.nl/wiki/index.php?title=Firmware_upgrade_STM32Wifi&amp;diff=3038&amp;oldid=prev"/>
		<updated>2015-01-19T09:29:20Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;performing the upgrade&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 09:29, 19 January 2015&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 70:&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 70:&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;div&gt; dfu-util -a 0 -d 0483:df11 -s 0x801fc00 -D config.bin&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;div&gt; dfu-util -a 0 -d 0483:df11 -s 0x801fc00 -D config.bin&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-deletedline diff-side-deleted&quot;&gt;&lt;div&gt;will flash it into permanent storage of the stm32wifi. &lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-addedline diff-side-added&quot;&gt;&lt;div&gt;will flash it into permanent storage of the stm32wifi&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;.  Now you can move the jumper back and restart the device&lt;/ins&gt;. &lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;br /&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-deleted&quot;&gt;&lt;div&gt;Note that if you change the wifi credentials, the device will continue to attempt to use the old wifi. Only when that fails will it switch to the new credentials.&lt;/div&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-context diff-side-added&quot;&gt;&lt;div&gt;Note that if you change the wifi credentials, the device will continue to attempt to use the old wifi. Only when that fails will it switch to the new credentials.&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-addedline diff-side-added&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-addedline diff-side-added&quot;&gt;&lt;div&gt;== future ==&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-addedline diff-side-added&quot;&gt;&lt;br /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td colspan=&quot;2&quot; class=&quot;diff-empty diff-side-deleted&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;
  &lt;td class=&quot;diff-addedline diff-side-added&quot;&gt;&lt;div&gt;In the future the device will support USB so using dfu-util to flash the config will no longer be necessary.&lt;/div&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;!-- diff cache key wikidb:diff:wikidiff2:1.12:old-3037:rev-3038:1.13.0 --&gt;
&lt;/table&gt;</summary>
		<author><name>Rew</name></author>
	</entry>
	<entry>
		<id>https://bitwizard.nl/wiki/index.php?title=Firmware_upgrade_STM32Wifi&amp;diff=3037&amp;oldid=prev</id>
		<title>Rew: Created page with &quot;This upgrade procedure currently requires Linux. I&#039;m sure ST has a tool for windows, but I haven&#039;t come across it. If you know the procedure under windows, let me know, or exp...&quot;</title>
		<link rel="alternate" type="text/html" href="https://bitwizard.nl/wiki/index.php?title=Firmware_upgrade_STM32Wifi&amp;diff=3037&amp;oldid=prev"/>
		<updated>2015-01-19T09:27:30Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;This upgrade procedure currently requires Linux. I&amp;#039;m sure ST has a tool for windows, but I haven&amp;#039;t come across it. If you know the procedure under windows, let me know, or exp...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;This upgrade procedure currently requires Linux. I&amp;#039;m sure ST has a tool for windows, but I haven&amp;#039;t come across it. If you know the procedure under windows, let me know, or expand this page. &lt;br /&gt;
&lt;br /&gt;
== tools required ==&lt;br /&gt;
&lt;br /&gt;
* A Linux PC. &lt;br /&gt;
* dfu-util installed. &lt;br /&gt;
* Optionally: A config file. &lt;br /&gt;
&lt;br /&gt;
=== Installing dfu-util ===&lt;br /&gt;
&lt;br /&gt;
dfu-util is part of the Ubuntu distribution: &lt;br /&gt;
 apt-get install dfu-util &lt;br /&gt;
should do the job for users of recent ubuntu distributions. &lt;br /&gt;
&lt;br /&gt;
Otherwise, cloning the git repository and compiling that should work:&lt;br /&gt;
 git clone https://gitorious.org/dfu-util/dfu-util.git&lt;br /&gt;
 cd dfu-util&lt;br /&gt;
 ./autogen.sh&lt;br /&gt;
 ./configure&lt;br /&gt;
 make&lt;br /&gt;
 make install &lt;br /&gt;
(I did this a while ago, this was typed from memory. If you do it, let me know if it works). &lt;br /&gt;
&lt;br /&gt;
== performing the upgrade ==&lt;br /&gt;
&lt;br /&gt;
You need a binary. It&amp;#039;s currently called chwifi.bin. &lt;br /&gt;
&lt;br /&gt;
Put the device in DFU firmware upgrade mode: Move the jumper to the position towards the crystal. Then insert the USB cable. The device should enumerate as an STM-DFU device: &amp;quot;Product: STM32  BOOTLOADER&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Then issue: &lt;br /&gt;
 dfu-util -a 0 -d 0483:df11 -s 0x8000000 -D chwifi.bin&lt;br /&gt;
&lt;br /&gt;
If you want to configure your stm32wifi over a ttl-level serial port, then you&amp;#039;re done: move the jumper back and reboot the device (powercycle or hit the reset button). &lt;br /&gt;
&lt;br /&gt;
Otherwise you need to generate a config file:&lt;br /&gt;
&lt;br /&gt;
create the script makeconfigbin:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 if [ $# -ne 4 ] ; then&lt;br /&gt;
   echo usage $0 ssid password host url&lt;br /&gt;
   exit 1&lt;br /&gt;
 fi&lt;br /&gt;
 #makechar 255 255 255 255&lt;br /&gt;
 makeconfigstring 32 &amp;quot;$1&amp;quot;&lt;br /&gt;
 makeconfigstring 32 &amp;quot;$2&amp;quot;&lt;br /&gt;
 makeconfigstring 64 &amp;quot;$3&amp;quot;&lt;br /&gt;
 makeconfigstring 64 &amp;quot;$4&amp;quot;&lt;br /&gt;
&lt;br /&gt;
and makeconfigstring:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 len=$1&lt;br /&gt;
 str=$2&lt;br /&gt;
 tmp=`tempfile`&lt;br /&gt;
 #for i in `seq $len` ; do&lt;br /&gt;
 #  makechar 255 &amp;gt;&amp;gt; $tmp&lt;br /&gt;
 #done&lt;br /&gt;
 dd if=/dev/zero bs=$len count=1 | tr &amp;#039;\0&amp;#039; &amp;#039;\377&amp;#039; &amp;gt; $tmp&lt;br /&gt;
 (echo -n $str ; dd if=/dev/zero bs=1 count=1 ) | dd of=$tmp conv=notrunc&lt;br /&gt;
 cat $tmp&lt;br /&gt;
 rm $tmp&lt;br /&gt;
&lt;br /&gt;
Now you can run the makeconfigbin script and provide it with your wifi credentials and the server host and URL: &lt;br /&gt;
&lt;br /&gt;
 ./makeconfigbin &amp;lt;wifissid&amp;gt; &amp;lt;wifipassword&amp;gt; www.bitwizard.nl /esp/logit.php\?  &amp;gt; config.bin&lt;br /&gt;
&lt;br /&gt;
Put in your own wifi ssid and password. Then: &lt;br /&gt;
&lt;br /&gt;
 dfu-util -a 0 -d 0483:df11 -s 0x801fc00 -D config.bin&lt;br /&gt;
&lt;br /&gt;
will flash it into permanent storage of the stm32wifi. &lt;br /&gt;
&lt;br /&gt;
Note that if you change the wifi credentials, the device will continue to attempt to use the old wifi. Only when that fails will it switch to the new credentials.&lt;/div&gt;</summary>
		<author><name>Rew</name></author>
	</entry>
</feed>