2017-06-26 05:41 AM
hi
I am using afor SPWF04Sx Wi-Fi module - and am trying to run the example python code provided in the user guide.
I have the SPWF04Sx configured as console 2 (UART and python)
I have created a file called wind.py and copied the code from the WIND example section 5.2 on page 17 of AN49
I have used the command 'AT+S.FSC=wind.py,479' to copy it to the RAM on the SPWF04Sx
I have tried running it by calling 'AT+S.PYTHON=wind.py' but only get the response:
File '2:wind.py', line 1
SyntaxError: invalid systax
I have also tried the basic code in 5.1 and, i have created a one line python file with only print('hello') in it.
This also gets the same SyntaxError error
Any suggestions?
I've also noticed that the CTRL short codes dont work on my system i.e. CTRL-D is not recognised to exit REPL, -and I am unable to use CTRL-E to enter Paste mode. Any ideas on that one?
Note: this post was migrated and contained many threaded conversations, some content may be missing.2017-06-26 05:56 AM
File '2:wind.py', line 1
I think you are facing a copy/paste error. Please paste script into an editor (e.g. notepad++), and check what you are sending to the module.
This is what I see:
at+s.python=wind.py
AT-S.Launching script:2:wind.pyAT-S.OK:17104:10Ciao
jerry
2017-06-26 06:48 AM
I am already using Notepad++ and there are no cut/paste errors from section 5.2
I have also tried the code from section 5.1, and this produces the same error.
Does the cut and pasted code work for you?
2017-06-26 07:30 AM
It still doesn't work for me. I tried editing to format the python with both spaces and TABs, neither works for me.
Even a 1 line .py file with
print('hello')
doesnt work for me
AT+S.FSC=hello.py,16
AT-S.OK received
AT+S.PYTHON=hello.py
Traceback (most recent call last):
File '2:hello.py', line 1
SyntaxError: invalid syntax
+WIND:0:Console active
2017-06-26 08:58 AM
pdf to module -> error
pdf to notepad (edit to use TABs) to module -> ok
2017-06-26 01:52 PM
I have a doubt...
Are you using STM32 Nucleo as USB2UART bridge?
2017-06-27 02:03 AM
yes I am...
Am i doing something wrong?
2017-06-27 03:31 AM
I know old versions need a delay on PC SW after every TX char. Should work better with latest version: STM32CubeExpansion_WIFI1_V3.0.2
Which version are you using?
2017-06-27 03:43 AM
I am using
STM32CubeExpansion_WIFI1_V3.0.2
2017-06-27 03:50 AM
I assume you are using VCOM application on STM32.
Use TeraTerm on PC. Setup -> Serial port -> set 1ms/char.
Before AT+S.PYTHON, try to run AT+S.FSP. Is the content ok? Any missing char?