ARMmbed / wifi-x-nucleo-idw01m1

X-NUCLEO-IDW0xx1 Wi-Fi Driver
3 stars 8 forks source link

Firmware upgrade procedure #19

Closed ghost closed 6 years ago

ghost commented 6 years ago

I have an IDW01M1 shield board connected to a NUCLEO_L496ZG board. It is not connected correctly and reports:

[EasyConnect] IPv4 mode [EasyConnect] Using WiFi (IDW01M1) [EasyConnect] Connecting to WiFi J5725F

SPWF> ERROR: Should never happen! (_wait_console_active, 246) [EasyConnect] ERROR - No MAC address [EasyConnect] Connection to Network Failed -3012! software. Unable to connect to network!

When this same board is connected to a NUCLEO_L476RG board, it works correctly. I saw that there was a firmware upgrade available, but the instructions for performing an upgrade are inadequate for upgrading the board. Do you upgrade the board while it is connected to the NUCLEO_L496ZG board? It refers to a UART connection but there is no UART/USB plug on the board so it is unclear how you connect to the UART. It also says the BOOTO pin needs to be pulled high. I see that there is a jumper that is connected to BOOTO, is this the jumper that needs to be moved?

Is there a newer/more complete firmware upgrade procedure available somewhere? I suspect that a firmware upgrade will resolve this issue but at this time, using the information that is provided, it is not possible to complete the upgrade.

BTW, the configuration is:

ghost commented 6 years ago

After 4 downloads and >4 hours of work, I have managed to get the firmware updated (I think), but when you get to the last step and flash the Project.bin file, it looks like the baudrate IS NOT 115200-N81 like the document says it is, what is the correct baud rate. This is keeping from executing the last two steps: 1) enter AT&F 2) enter AT+CFUN=1

At this point, the IDW01M1 will not work on any board I have so it looks like the upgrade procedure may have effectively "Broke" the board.

This has to be the most painful firmware upgrade procedure I have ever undertaken in 30+ years of firmware experience.

ghost commented 6 years ago

Baud Rate should be 921600 in the documentation. NOT nice to make a user have to search through the source code to find a non-standard baud rate.

ghost commented 6 years ago

And After a day of pain, the results are the same as when I started. This board works with the NUCLEO_L476RG but does not work with the NUCLEO_L496ZG, still says:

Test HTTP and HTTPS interface [EasyConnect] IPv4 mode [EasyConnect] Using WiFi (IDW01M1) [EasyConnect] Connecting to WiFi J5725F

SPWF> ERROR: Should never happen! (_wait_console_active, 246) [EasyConnect] ERROR - No MAC address [EasyConnect] Connection to Network Failed -3012! software. Unable to connect to network!

The configuration is:

NUCLEO_L496ZG (firmware version: V2.J31.M21 STM32 Debug+Mass storage) NUCLEO_IDW01M1 (firmware version 3.6) MBED OS 5.9

betzw commented 6 years ago

Not sure, but flashing the firmware for a X-NUCLEO-IDW01M1 might only be possible together with the following Nucleo base boards:

ghost commented 6 years ago

@betzw I used a STM32L476RG-Nucleo to upgrade the firmware on the X-NUCLEO-IDW01M1 to v3.6. I then installed the X-NUCLEO-IDW01M1 onto a STM32L496ZG and it results in:

SPWF> ERROR: Should never happen! (_wait_console_active, 246) [EasyConnect] ERROR - No MAC address [EasyConnect] Connection to Network Failed -3012! software. Unable to connect to network!

betzw commented 6 years ago

Ciao @jflynn129, sorry for the inconveniences you experiencing with the expansion board. I am really puzzled about what you are reporting, above all about the baud rate, which makes me fear that there is something wrong with your X-NUCLEO-IDW01M1, even if at that point it should not work with the NUCLEO_L476RG either ...

ghost commented 6 years ago

@betzw on page 11 of'X-NUCLEO-IDS0xx1-FW upgrading over UART_v1.2.pdf, it says 'Open a terminal emulator (Baud rate:115200; Data: 8 bits / Parity: None /Stop: 1 bit / Flow control: none)'. This doesn't work. I went and dug around and found the source code and the com port is opening with 'USART_PRINT_MSG_Configuration(&UART_MsgHandle, 921600);'

when I switched to 921600, the final setps in the upgrade procedure worked as described. So the document statement "(Baud rate:115200; Data: 8 bits / Parity: None)" is incorrect. It is "Baud rate: 921600; Data: 8 bits / Parity: None"

Using the correct baud rate, I was able to complete the firmware upgrade. After the upgrade, the board works on the L476RG but still does not work on the L496ZG as I said above..

betzw commented 6 years ago

@betzw on page 11 of'X-NUCLEO-IDS0xx1-FW upgrading over UART_v1.2.pdf, it says 'Open a terminal emulator (Baud rate:115200; Data: 8 bits / Parity: None /Stop: 1 bit / Flow control: none)'. This doesn't work. I went and dug around and found the source code and the com port is opening with 'USART_PRINT_MSG_Configuration(&UART_MsgHandle, 921600);'

when I switched to 921600, the final setps in the upgrade procedure worked as described. So the document statement "(Baud rate:115200; Data: 8 bits / Parity: None)" is incorrect. It is "Baud rate: 921600; Data: 8 bits / Parity: None"

First of all I have noticed that there has been an upgrade of X-CUBE-WIFI1 to version V3.1.1 for which the documentation seems not to have been updated :disappointed:. This might explain your observations!

Using the correct baud rate, I was able to complete the firmware upgrade. After the upgrade, the board works on the L476RG but still does not work on the L496ZG as I said above.

Could you pls. send files mbed_app.json & .mbed together with the command line you are using for compilation. Thx!

ghost commented 6 years ago

the example program I am using is at: https://os.mbed.com/users/JMF/code/wifi_Example/

When i run this on the L476RG board, it works correctly. when I run it on the L496ZG board it fails.

betzw commented 6 years ago

Ok, but the above mentioned files would really be helpful in order to analyze your issue. What do you use to compile Online Compiler or mbed-cli?

ghost commented 6 years ago

Yes I use the online compiler with the nucleo_L496zG as the Target. Have you successfully built and run the code on that target? I can send you the files but they are either in the repository or are the default ones the online compiler uses.

ghost commented 6 years ago

Btw I usually use the cli but wanted to simply verify operation so I used the online compiler and get the same results.

betzw commented 6 years ago

I never use the online compiler, therefore I don't know if and how you can modify the configuration parameters, which in case of using mbed-cli would be contained within file mbed_app.json. For sure, using the default parameters might be a problem as the X-NUCLEO-IDW01M1 expansion board has no Arduino form factor connectors but has only Morpho connectors. How difficult would it be for you to try with mbed-cli?

ghost commented 6 years ago

@betzw you really should familiarize yourself with the available tools, I know that ST tends to focus exclusively on their own tools but the online tools ARM provides is a good way to quickly prototype/test interfaces and things like this problem.

If you look at the repository link I sent you, you will find that it contains the mbed_app.json file you are looking for, this is why I posted and sent you the repository link--you can see the entire environment. You should also be able to build and test it to confirm the results I am getting with both the L476RG and L496ZG by simply changing the target of the build.

I think the crux of the problem is that the X-NUCLEO-IDW01M1 will not work on the Arduino connector that is on the L496ZG board. It may be due to a non-standard placement (on the L496ZG the Arduino connector is on the bottom of the board) or non-compliant Arduino connector on the L496ZG? I suspect this because the IDW01M1 works correctly with the L476RG board which is using Morpho connectors but failing on the L496ZG which is using Arduino--but I want confirmation of this from ST and I would like to know what is the problem with the Arduino connection so I could determine if the 496ZG board will ever be compatible or if I should look for a different WiFi board to use..

ghost commented 6 years ago

the example program I am using is at:https://os.mbed.com/users/JMF/code/wifi_Example/

On 09/06/2018 08:32 AM, Wolfgang Betz wrote:

Wherever you have sent this link, I can't find it ...

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ARMmbed/wifi-x-nucleo-idw01m1/issues/19#issuecomment-419076018, or mute the thread https://github.com/notifications/unsubscribe-auth/AR0LLrqN71nyNawy98N1SdlrBieumwlHks5uYRXYgaJpZM4WSDmz.

betzw commented 6 years ago

I think the crux of the problem is that the X-NUCLEO-IDW01M1 will not work on the Arduino connector that is on the L496ZG board. It may be due to a non-standard placement (on the L496ZG the Arduino connector is on the bottom of the board) or non-compliant Arduino connector on the L496ZG? I suspect this because the IDW01M1 works correctly with the L476RG board which is using Morpho connectors but failing on the L496ZG which is using Arduino

In which way are you currently connecting a X-NUCLEO-IDW01M1 with a NUCLEO-L496ZG?

ghost commented 6 years ago

The only way to mount it (that I can determine) is via the Arduino connector on the bottom of the L496ZG. If there is an alternative way to mount the boards, please let me know what it is.

betzw commented 6 years ago

Well, the NUCLEO-L496ZG doesn't feature a Morpho connector but a connector called Zio. It should anyway be possible to modify slightly the X-NUCLEO-IDW01M1 to make it work also over the Zio connectors by:

In order to configure the mbed WiFi example SW correctly you need then to add to your configuration (i.e. file mbed_app.json) the information which tells mbed to use pin D0 for easy-connect.wifi-idw01m1-txand pin D1 for easy-connect.wifi-idw01m1-rx.

ghost commented 6 years ago

Ok, I take it from your description above, that the IDW01M1 is not designed to work with the L496ZG out of the box, Correct? This is because the L496ZG isn't implementing the Arduino connectors correctly OR the IDW01M1 doesn't implement the Arduino connectors correctly, OR the IDW01M1 is only designed out of the box to work with the Morpho connectors?

I suspect it is the last statement that is true since the IDW01M1 will only work with ST boards that implement Morpho connectors unless modifications are made to the hardware.

betzw commented 6 years ago

Correct. Even the X-NUCLEO-IDW04A1 WiFi expansion board which features an Arduino connector would not work without similar patches as described above. In general, this is due to historic conceptional reasons which I do unfortunately not know the details of.

cc @siorpaes

ghost commented 6 years ago

Thank you for the confirmation.