Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NUCLEO_IDW01M1 gets stuck to error state #18

Open
juhaylinen opened this issue Aug 17, 2018 · 47 comments
Open

NUCLEO_IDW01M1 gets stuck to error state #18

juhaylinen opened this issue Aug 17, 2018 · 47 comments

Comments

@juhaylinen
Copy link
Contributor

juhaylinen commented Aug 17, 2018

This issue is related to #17

When I run Greentea netsocket and WiFi tests and the hardfault happens, IDW01M1 may end up to a non-functional state and return below errors

SPWF> ERROR: Should never happen!(_wait_console_active, 246)
-3012 -> NSAPI_ERROR_DEVICE_ERROR

Reset, re-flashing the binary or power cycle doesn't help.

Only solution found so far to recover the WiFi shield is to use WiFi_VCOM_F401RE binary and enter below AT commands:
“AT&F”
“AT+CFUN=1”

@betzw
Copy link
Collaborator

betzw commented Aug 27, 2018

Which FW version do you use on the expansion board (see here)?

@juhaylinen
Copy link
Contributor Author

Tested with FW versions 3.5.3 and 3.6.0

@ghost
Copy link

ghost commented Aug 29, 2018

I am also running into this when using an NUCLEO_L496ZG board, it says:
[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 using the NUCLEO_L476RG board it works correctly.

@ghost
Copy link

ghost commented Aug 29, 2018

@betzw
How to update the firmware via mbed?

@betzw
Copy link
Collaborator

betzw commented Aug 30, 2018

Is the SPWF> ERROR happening with both FW versions?

@juhaylinen
Copy link
Contributor Author

Yes, with both FW versions.

@betzw
Copy link
Collaborator

betzw commented Sep 7, 2018

Well, the error you are observing happens typically when the serial communication fails and is typically due to a wrong configuration of RX/TX pins. In your case it seems rather to be something like the module FW crashing, maybe due to the mess that happens when there is a stack overflow and maybe as a consequence you are sending corrupted AT commands to the module which are not handled correctly.

@juhaylinen
Copy link
Contributor Author

OK. Thanks for the explanation.

@betzw
Copy link
Collaborator

betzw commented Sep 10, 2018

Does your OK mean that we can close this issue?

@juhaylinen
Copy link
Contributor Author

Is it possible to update the driver SW so that it can recover the module from this state? Normal reset or power cycle doesn't help.

@betzw
Copy link
Collaborator

betzw commented Sep 13, 2018

Well, to me it's actually hard to understand that a HW reset or power cycling does not help, therefore I wouldn't what to do ... or better, I would like to understand what actually happens and not only make assumptions, which means I would need to reproduce the situation here in my office, but until today I wasn't able to do so :-(
How deterministic is this behavior on your side? Do you have an easy way to reproduce it?

@juhaylinen
Copy link
Contributor Author

Here is an example how to reproduce the issue.
NUCLEO_F401RE + IDW01M1
FW version 3.5.3 or 3.6.0
mbedgt version 1.4.0

Build the Greentea tests

mbed new test
cd test
git clone https://github.com/ARMmbed/wifi-x-nucleo-idw01m1.git
cd mbed-os
git checkout mbed-os-5.10.0-rc3
cd ..
mbed test --compile -m NUCLEO_F401RE -t GCC_ARM --app-config=mbed_app.json -n mbed-os-tests-netsocket-tcp,mbed-os-tests-network-wifi

Run the greentea tests until you see the error SPWF> ERROR: Should never happen! (_wait_console_active, 246)

mbedgt -m NUCLEO_F401RE -v --test-spec=./BUILD/tests/NUCLEO_F401RE/GCC_ARM/test_spec.json --report-fails

I need only 2-4 test runs to reproduce the issue.

@betzw
Copy link
Collaborator

betzw commented Sep 18, 2018

Would it be possible for you to send me the full execution trace of a very verbose test run?

@juhaylinen
Copy link
Contributor Author

Full trace from test run which reproduces the issue:

mbedgt -m NUCLEO_F401RE -vv --test-spec=./BUILD/tests/NUCLEO_F401RE/GCC_ARM/test_spec.json --report-fails -V
mbedgt: greentea test automation tool ver. 1.4.0
mbedgt: test specification file './BUILD/tests/NUCLEO_F401RE/GCC_ARM/test_spec.json' (specified with --test-spec option)
mbedgt: using './BUILD/tests/NUCLEO_F401RE/GCC_ARM/test_spec.json' from current directory!
mbedgt: detecting connected mbed-enabled devices...
mbedgt: detected 1 device
        +---------------+----------------------+-------------+-------------+--------------------------+
        | platform_name | platform_name_unique | serial_port | mount_point | target_id                |
        +---------------+----------------------+-------------+-------------+--------------------------+
        | NUCLEO_F401RE | NUCLEO_F401RE[0]     | COM16       | D:          | 07200221054364053A07F218 |
        +---------------+----------------------+-------------+-------------+--------------------------+
mbedgt: processing target 'NUCLEO_F401RE' toolchain 'GCC_ARM' compatible platforms... (note: switch set to --parallel 1)
        +---------------+----------------------+-------------+-------------+--------------------------+
        | platform_name | platform_name_unique | serial_port | mount_point | target_id                |
        +---------------+----------------------+-------------+-------------+--------------------------+
        | NUCLEO_F401RE | NUCLEO_F401RE[0]     | COM16:9600  | D:          | 07200221054364053A07F218 |
        +---------------+----------------------+-------------+-------------+--------------------------+
mbedgt: running 2 tests for platform 'NUCLEO_F401RE' and toolchain 'GCC_ARM'
        use 1 instance of execution threads for testing
mbedgt: checking for 'host_tests' directory above image directory structure
        found 'host_tests' directory in: 'mbed-os\TESTS\host_tests'
mbedgt: selecting test case observer...
        calling mbedhtrun: mbedhtrun -m NUCLEO_F401RE -p COM16:9600 -f "BUILD/tests/NUCLEO_F401RE/GCC_ARM/mbed-os/TESTS/netsocket/tcp/tcp.bin" -e "mbed-os\TESTS\host_tests" -d D: -c default -t 07200221054364053A07F218 -r default -C 4 --sync 5 -P 60
mbedgt: mbed-host-test-runner: started
[1537337049.85][HTST][INF] host test executor ver. 1.3.1
[1537337049.85][HTST][INF] copy image onto target...
[1537337049.85][COPY][INF] Waiting up to 60 sec for '07200221054364053A07F218' mount point (current is 'D:')...
        1 file(s) copied.
[1537337060.13][HTST][INF] starting host test process...
[1537337060.61][CONN][INF] starting connection process...
[1537337060.61][CONN][INF] notify event queue about extra 60 sec timeout for serial port pooling
[1537337060.61][CONN][INF] initializing serial port listener...
[1537337060.61][PLGN][INF] Waiting up to 60 sec for '07200221054364053A07F218' serial port (current is 'COM16')...
[1537337060.62][HTST][INF] setting timeout to: 60 sec
[1537337060.65][SERI][INF] serial(port=COM16, baudrate=9600, read_timeout=0.01, write_timeout=5)
[1537337060.65][SERI][INF] reset device using 'default' plugin...
[1537337060.90][SERI][INF] waiting 1.00 sec after reset
[1537337061.90][SERI][INF] wait for it...
[1537337061.94][SERI][TXD] mbedmbedmbedmbedmbedmbedmbedmbedmbedmbed
[1537337061.94][CONN][INF] sending up to 5 __sync packets (specified with --sync=5)
[1537337061.94][CONN][INF] sending preamble '12612764-4300-43a1-ad43-cce819136d43'
[1537337061.98][SERI][TXD] {{__sync;12612764-4300-43a1-ad43-cce819136d43}}
[1537337062.03][CONN][RXD] mbedmbedmbedmbedmbedmbedmbedmbed
[1537337062.08][CONN][INF] found SYNC in stream: {{__sync;12612764-4300-43a1-ad43-cce819136d43}} it is #0 sent, queued...
[1537337062.09][HTST][INF] sync KV found, uuid=12612764-4300-43a1-ad43-cce819136d43, timestamp=1537337062.084000
[1537337062.11][CONN][INF] found KV pair in stream: {{__version;1.3.0}}, queued...
[1537337062.11][HTST][INF] DUT greentea-client version: 1.3.0
[1537337062.13][CONN][INF] found KV pair in stream: {{__timeout;480}}, queued...
[1537337062.13][HTST][INF] setting timeout to: 480 sec
[1537337062.16][CONN][INF] found KV pair in stream: {{__host_test_name;default_auto}}, queued...
[1537337062.16][HTST][INF] host test class: '<class 'mbed_host_tests.host_tests.default_auto.DefaultAuto'>'
[1537337062.16][HTST][INF] host test setup() call...
[1537337062.16][HTST][INF] CALLBACKs updated
[1537337062.16][HTST][INF] host test detected: default_auto
[1537337076.30][CONN][RXD] MBED: TCPClient IP address is '192.168.100.16'
[1537337076.33][CONN][INF] found KV pair in stream: {{__testcase_count;14}}, queued...
[1537337076.36][CONN][RXD] >>> Running 14 test cases...
[1537337076.40][CONN][INF] found KV pair in stream: {{__testcase_name;TCPSOCKET_ECHOTEST}}, queued...
[1537337076.45][CONN][INF] found KV pair in stream: {{__testcase_name;TCPSOCKET_ECHOTEST_NONBLOCK}}, queued...
[1537337076.50][CONN][INF] found KV pair in stream: {{__testcase_name;TCPSOCKET_OPEN_CLOSE_REPEAT}}, queued...
[1537337076.54][CONN][INF] found KV pair in stream: {{__testcase_name;TCPSOCKET_OPEN_LIMIT}}, queued...
[1537337076.61][CONN][INF] found KV pair in stream: {{__testcase_name;TCPSOCKET_THREAD_PER_SOCKET_SAFETY}}, queued...
[1537337076.65][CONN][INF] found KV pair in stream: {{__testcase_name;TCPSOCKET_CONNECT_INVALID}}, queued...
[1537337076.70][CONN][INF] found KV pair in stream: {{__testcase_name;TCPSOCKET_ECHOTEST_BURST}}, queued...
[1537337076.76][CONN][INF] found KV pair in stream: {{__testcase_name;TCPSOCKET_ECHOTEST_BURST_NONBLOCK}}, queued...
[1537337076.80][CONN][INF] found KV pair in stream: {{__testcase_name;TCPSOCKET_RECV_100K}}, queued...
[1537337076.85][CONN][INF] found KV pair in stream: {{__testcase_name;TCPSOCKET_RECV_100K_NONBLOCK}}, queued...
[1537337076.90][CONN][INF] found KV pair in stream: {{__testcase_name;TCPSOCKET_RECV_TIMEOUT}}, queued...
[1537337076.94][CONN][INF] found KV pair in stream: {{__testcase_name;TCPSOCKET_SEND_REPEAT}}, queued...
[1537337076.99][CONN][INF] found KV pair in stream: {{__testcase_name;TCPSOCKET_SEND_TIMEOUT}}, queued...
[1537337077.04][CONN][RXD]
[1537337077.04][CONN][INF] found KV pair in stream: {{__testcase_name;TCPSOCKET_ENDPOINT_CLOSE}}, queued...
[1537337077.09][CONN][RXD] >>> Running case #1: 'TCPSOCKET_ECHOTEST'...
[1537337077.13][CONN][INF] found KV pair in stream: {{__testcase_start;TCPSOCKET_ECHOTEST}}, queued...
[1537337081.43][CONN][INF] found KV pair in stream: {{__testcase_finish;TCPSOCKET_ECHOTEST;1;0}}, queued...
[1537337081.47][CONN][RXD] >>> 'TCPSOCKET_ECHOTEST': 1 passed, 0 failed
[1537337081.48][CONN][RXD]
[1537337081.54][CONN][RXD] >>> Running case #2: 'TCPSOCKET_ECHOTEST_NONBLOCK'...
[1537337081.59][CONN][INF] found KV pair in stream: {{__testcase_start;TCPSOCKET_ECHOTEST_NONBLOCK}}, queued...
[1537337081.74][CONN][RXD] [Sender#00] bytes sent: 1
[1537337082.79][CONN][RXD] [Recevr#00] bytes received: 1
[1537337082.82][CONN][RXD] [Sender#01] bytes sent: 2
[1537337083.87][CONN][RXD] [Recevr#01] bytes received: 2
[1537337083.90][CONN][RXD] [Sender#02] bytes sent: 3
[1537337084.96][CONN][RXD] [Recevr#02] bytes received: 3
[1537337084.99][CONN][RXD] [Sender#03] bytes sent: 4
[1537337085.99][CONN][RXD]
[1537337085.99][CONN][RXD]
[1537337086.01][CONN][RXD] ++ MbedOS Error Info ++
[1537337086.06][CONN][RXD] Error Status: 0x80020125 Code: 293 Module: 2
[1537337086.11][CONN][RXD] Error Message: CMSIS-RTOS error: Stack overflow
[1537337086.13][CONN][RXD] Location: 0x8008831
[1537337086.15][CONN][RXD] Error Value: 0x1
[1537337086.25][CONN][RXD] Current Thread: Id: 0x20004EB8 Entry: 0x4F StackSize: 0x400 StackMem: 0x200050C8 SP: 0x20017F30
[1537337086.33][CONN][RXD] For more info, visit: https://armmbed.github.io/mbedos-error/?error=0x80020125
[1537337086.36][CONN][RXD] -- MbedOS Error Info --
[1537337542.38][HTST][INF] test suite run finished after 480.25 sec...
[1537337542.38][CONN][INF] received special event '__host_test_finished' value='True', finishing
[1537337542.39][HTST][INF] CONN exited with code: 0
[1537337542.39][HTST][INF] No events in queue
[1537337542.39][HTST][INF] stopped consuming events
[1537337542.39][HTST][INF] host test result(): None
[1537337542.39][HTST][WRN] missing __exit event from DUT
[1537337542.39][HTST][WRN] missing __exit_event_queue event from host test
[1537337542.39][HTST][ERR] missing __exit_event_queue event from host test and no result from host test, timeout...
[1537337542.39][HTST][INF] calling blocking teardown()
[1537337542.39][HTST][INF] teardown() finished
[1537337542.39][HTST][INF] {{result;timeout}}
mbedgt: retry mbedhtrun 1/1
mbedgt: ['mbedhtrun', '-m', u'NUCLEO_F401RE', '-p', u'COM16:9600', '-f', u'"BUILD/tests/NUCLEO_F401RE/GCC_ARM/mbed-os/TESTS/netsocket/tcp/tcp.bin"', '-e', u'"mbed-os\\TESTS\\host_tests"', '-d', 'D:', '-c', 'default', '-t', u'07200221054364053A07F218', '-r', 'default', '-C', '4', '--sync', '5', '-P', '60'] failed after 1 count
mbedgt: checking for GCOV data...
mbedgt: mbed-host-test-runner: stopped and returned 'TIMEOUT'
mbedgt: test on hardware with target id: 07200221054364053A07F218
mbedgt: test suite 'mbed-os-tests-netsocket-tcp' ..................................................... TIMEOUT in 493.24 sec
        test case: 'TCPSOCKET_CONNECT_INVALID' ....................................................... SKIPPED in 0.00 sec
        test case: 'TCPSOCKET_ECHOTEST' .............................................................. OK in 4.30 sec
        test case: 'TCPSOCKET_ECHOTEST_BURST' ........................................................ SKIPPED in 0.00 sec
        test case: 'TCPSOCKET_ECHOTEST_BURST_NONBLOCK' ............................................... SKIPPED in 0.00 sec
        test case: 'TCPSOCKET_ECHOTEST_NONBLOCK' ..................................................... ERROR in 0.00 sec
        test case: 'TCPSOCKET_ENDPOINT_CLOSE' ........................................................ SKIPPED in 0.00 sec
        test case: 'TCPSOCKET_OPEN_CLOSE_REPEAT' ..................................................... SKIPPED in 0.00 sec
        test case: 'TCPSOCKET_OPEN_LIMIT' ............................................................ SKIPPED in 0.00 sec
        test case: 'TCPSOCKET_RECV_100K' ............................................................. SKIPPED in 0.00 sec
        test case: 'TCPSOCKET_RECV_100K_NONBLOCK' .................................................... SKIPPED in 0.00 sec
        test case: 'TCPSOCKET_RECV_TIMEOUT' .......................................................... SKIPPED in 0.00 sec
        test case: 'TCPSOCKET_SEND_REPEAT' ........................................................... SKIPPED in 0.00 sec
        test case: 'TCPSOCKET_SEND_TIMEOUT' .......................................................... SKIPPED in 0.00 sec
        test case: 'TCPSOCKET_THREAD_PER_SOCKET_SAFETY' .............................................. SKIPPED in 0.00 sec
mbedgt: checking for 'host_tests' directory above image directory structure
        found 'host_tests' directory in: 'mbed-os\TESTS\host_tests'
mbedgt: selecting test case observer...
        calling mbedhtrun: mbedhtrun -m NUCLEO_F401RE -p COM16:9600 -f "BUILD/tests/NUCLEO_F401RE/GCC_ARM/mbed-os/TESTS/network/wifi/wifi.bin" -e "mbed-os\TESTS\host_tests" -d D: -c default -t 07200221054364053A07F218 -r default -C 4 --sync 5 -P 60
mbedgt: mbed-host-test-runner: started
[1537337542.95][HTST][INF] host test executor ver. 1.3.1
[1537337542.95][HTST][INF] copy image onto target...
[1537337542.95][COPY][INF] Waiting up to 60 sec for '07200221054364053A07F218' mount point (current is 'D:')...
        1 file(s) copied.
[1537337553.18][HTST][INF] starting host test process...
[1537337553.64][CONN][INF] starting connection process...
[1537337553.64][CONN][INF] notify event queue about extra 60 sec timeout for serial port pooling
[1537337553.64][CONN][INF] initializing serial port listener...
[1537337553.64][PLGN][INF] Waiting up to 60 sec for '07200221054364053A07F218' serial port (current is 'COM16')...
[1537337553.66][HTST][INF] setting timeout to: 60 sec
[1537337553.68][SERI][INF] serial(port=COM16, baudrate=9600, read_timeout=0.01, write_timeout=5)
[1537337553.68][SERI][INF] reset device using 'default' plugin...
[1537337553.93][SERI][INF] waiting 1.00 sec after reset
[1537337554.93][SERI][INF] wait for it...
[1537337554.96][SERI][TXD] mbedmbedmbedmbedmbedmbedmbedmbedmbedmbed
[1537337554.96][CONN][INF] sending up to 5 __sync packets (specified with --sync=5)
[1537337554.96][CONN][INF] sending preamble '84933fb5-6da2-42a7-95bd-d1fc2fc5da4a'
[1537337555.00][SERI][TXD] {{__sync;84933fb5-6da2-42a7-95bd-d1fc2fc5da4a}}
[1537337555.06][CONN][RXD] mbedmbedmbedmbedmbedmbedmbedmbed
[1537337555.11][CONN][INF] found SYNC in stream: {{__sync;84933fb5-6da2-42a7-95bd-d1fc2fc5da4a}} it is #0 sent, queued...
[1537337555.12][HTST][INF] sync KV found, uuid=84933fb5-6da2-42a7-95bd-d1fc2fc5da4a, timestamp=1537337555.112000
[1537337555.13][CONN][INF] found KV pair in stream: {{__version;1.3.0}}, queued...
[1537337555.14][HTST][INF] DUT greentea-client version: 1.3.0
[1537337555.16][CONN][INF] found KV pair in stream: {{__timeout;240}}, queued...
[1537337555.16][HTST][INF] setting timeout to: 240 sec
[1537337555.19][CONN][INF] found KV pair in stream: {{__host_test_name;default_auto}}, queued...
[1537337555.19][HTST][INF] host test class: '<class 'mbed_host_tests.host_tests.default_auto.DefaultAuto'>'
[1537337555.19][HTST][INF] host test setup() call...
[1537337555.19][HTST][INF] CALLBACKs updated
[1537337555.19][HTST][INF] host test detected: default_auto
[1537337555.22][CONN][RXD] >>> Running 16 test cases...
[1537337555.26][CONN][INF] found KV pair in stream: {{__testcase_name;WIFI-CONSTRUCTOR}}, queued...
[1537337555.32][CONN][INF] found KV pair in stream: {{__testcase_name;WIFI-CONNECT-NOCREDENTIALS}}, queued...
[1537337555.35][CONN][INF] found KV pair in stream: {{__testcase_name;WIFI-SET-CREDENTIAL}}, queued...
[1537337555.39][CONN][INF] found KV pair in stream: {{__testcase_name;WIFI-SET-CHANNEL}}, queued...
[1537337555.43][CONN][INF] found KV pair in stream: {{__testcase_name;WIFI-GET-RSSI}}, queued...
[1537337555.48][CONN][INF] found KV pair in stream: {{__testcase_name;WIFI-CONNECT-PARAMS-NULL}}, queued...
[1537337555.54][CONN][INF] found KV pair in stream: {{__testcase_name;WIFI-CONNECT-PARAMS-VALID-UNSECURE}}, queued...
[1537337555.60][CONN][INF] found KV pair in stream: {{__testcase_name;WIFI-CONNECT-PARAMS-VALID-SECURE}}, queued...
[1537337555.64][CONN][INF] found KV pair in stream: {{__testcase_name;WIFI-CONNECT-PARAMS-CHANNEL}}, queued...
[1537337555.70][CONN][INF] found KV pair in stream: {{__testcase_name;WIFI-CONNECT-PARAMS-CHANNEL-FAIL}}, queued...
[1537337555.74][CONN][INF] found KV pair in stream: {{__testcase_name;WIFI-CONNECT}}, queued...
[1537337555.78][CONN][INF] found KV pair in stream: {{__testcase_name;WIFI-CONNECT-SECURE}}, queued...
[1537337555.82][CONN][INF] found KV pair in stream: {{__testcase_name;WIFI-CONNECT-SECURE-FAIL}}, queued...
[1537337555.88][CONN][INF] found KV pair in stream: {{__testcase_name;WIFI-CONNECT-DISCONNECT-REPEAT}}, queued...
[1537337555.92][CONN][INF] found KV pair in stream: {{__testcase_name;WIFI-SCAN-NULL}}, queued...
[1537337555.95][CONN][RXD]
[1537337555.95][CONN][INF] found KV pair in stream: {{__testcase_name;WIFI-SCAN}}, queued...
[1537337555.99][CONN][RXD] >>> Running case #1: 'WIFI-CONSTRUCTOR'...
[1537337556.04][CONN][INF] found KV pair in stream: {{__testcase_start;WIFI-CONSTRUCTOR}}, queued...
[1537337556.09][CONN][INF] found KV pair in stream: {{__testcase_finish;WIFI-CONSTRUCTOR;1;0}}, queued...
[1537337556.13][CONN][RXD] >>> 'WIFI-CONSTRUCTOR': 1 passed, 0 failed
[1537337556.13][CONN][RXD]
[1537337556.18][CONN][RXD] >>> Running case #2: 'WIFI-CONNECT-NOCREDENTIALS'...
[1537337556.24][CONN][INF] found KV pair in stream: {{__testcase_start;WIFI-CONNECT-NOCREDENTIALS}}, queued...
[1537337646.33][CONN][RXD]
[1537337646.40][CONN][RXD] SPWF> ERROR: Should never happen! (_wait_wifi_hw_started, 262)
[1537337646.45][CONN][INF] found KV pair in stream: {{__testcase_finish;WIFI-CONNECT-NOCREDENTIALS;1;0}}, queued...
[1537337646.52][CONN][RXD] >>> 'WIFI-CONNECT-NOCREDENTIALS': 1 passed, 0 failed
[1537337646.52][CONN][RXD]
[1537337646.56][CONN][RXD] >>> Running case #3: 'WIFI-SET-CREDENTIAL'...
[1537337646.60][CONN][INF] found KV pair in stream: {{__testcase_start;WIFI-SET-CREDENTIAL}}, queued...
[1537337736.70][CONN][RXD]
[1537337736.77][CONN][RXD] SPWF> ERROR: Should never happen! (_wait_wifi_hw_started, 262)
[1537337736.82][CONN][INF] found KV pair in stream: {{__testcase_finish;WIFI-SET-CREDENTIAL;1;0}}, queued...
[1537337736.86][CONN][RXD] >>> 'WIFI-SET-CREDENTIAL': 1 passed, 0 failed
[1537337736.86][CONN][RXD]
[1537337736.92][CONN][RXD] >>> Running case #4: 'WIFI-SET-CHANNEL'...
[1537337736.95][CONN][INF] found KV pair in stream: {{__testcase_start;WIFI-SET-CHANNEL}}, queued...
[1537337795.86][HTST][INF] test suite run finished after 240.69 sec...
[1537337795.86][CONN][INF] received special event '__host_test_finished' value='True', finishing
[1537337795.87][HTST][INF] CONN exited with code: 0
[1537337795.87][HTST][INF] No events in queue
[1537337795.87][HTST][INF] stopped consuming events
[1537337795.87][HTST][INF] host test result(): None
[1537337795.87][HTST][WRN] missing __exit event from DUT
[1537337795.87][HTST][WRN] missing __exit_event_queue event from host test
[1537337795.87][HTST][ERR] missing __exit_event_queue event from host test and no result from host test, timeout...
[1537337795.87][HTST][INF] calling blocking teardown()
[1537337795.87][HTST][INF] teardown() finished
[1537337795.87][HTST][INF] {{result;timeout}}
mbedgt: retry mbedhtrun 1/1
mbedgt: ['mbedhtrun', '-m', u'NUCLEO_F401RE', '-p', u'COM16:9600', '-f', u'"BUILD/tests/NUCLEO_F401RE/GCC_ARM/mbed-os/TESTS/network/wifi/wifi.bin"', '-e', u'"mbed-os\\TESTS\\host_tests"', '-d', 'D:', '-c', 'default', '-t', u'07200221054364053A07F218', '-r', 'default', '-C', '4', '--sync', '5', '-P', '60'] failed after 1 count
mbedgt: checking for GCOV data...
mbedgt: mbed-host-test-runner: stopped and returned 'TIMEOUT'
mbedgt: test on hardware with target id: 07200221054364053A07F218
mbedgt: test suite 'mbed-os-tests-network-wifi' ...................................................... TIMEOUT in 253.48 sec
        test case: 'WIFI-CONNECT' .................................................................... SKIPPED in 0.00 sec
        test case: 'WIFI-CONNECT-DISCONNECT-REPEAT' .................................................. SKIPPED in 0.00 sec
        test case: 'WIFI-CONNECT-NOCREDENTIALS' ...................................................... OK in 90.21 sec
        test case: 'WIFI-CONNECT-PARAMS-CHANNEL' ..................................................... SKIPPED in 0.00 sec
        test case: 'WIFI-CONNECT-PARAMS-CHANNEL-FAIL' ................................................ SKIPPED in 0.00 sec
        test case: 'WIFI-CONNECT-PARAMS-NULL' ........................................................ SKIPPED in 0.00 sec
        test case: 'WIFI-CONNECT-PARAMS-VALID-SECURE' ................................................ SKIPPED in 0.00 sec
        test case: 'WIFI-CONNECT-PARAMS-VALID-UNSECURE' .............................................. SKIPPED in 0.00 sec
        test case: 'WIFI-CONNECT-SECURE' ............................................................. SKIPPED in 0.00 sec
        test case: 'WIFI-CONNECT-SECURE-FAIL' ........................................................ SKIPPED in 0.00 sec
        test case: 'WIFI-CONSTRUCTOR' ................................................................ OK in 0.05 sec
        test case: 'WIFI-GET-RSSI' ................................................................... SKIPPED in 0.00 sec
        test case: 'WIFI-SCAN' ....................................................................... SKIPPED in 0.00 sec
        test case: 'WIFI-SCAN-NULL' .................................................................. SKIPPED in 0.00 sec
        test case: 'WIFI-SET-CHANNEL' ................................................................ ERROR in 0.00 sec
        test case: 'WIFI-SET-CREDENTIAL' ............................................................. OK in 90.22 sec
mbedgt: all tests finished!
mbedgt: shuffle seed: 0.4479267053
mbedgt: test suite report:
+-----------------------+---------------+-----------------------------+---------+--------------------+-------------+
| target                | platform_name | test suite                  | result  | elapsed_time (sec) | copy_method |
+-----------------------+---------------+-----------------------------+---------+--------------------+-------------+
| NUCLEO_F401RE-GCC_ARM | NUCLEO_F401RE | mbed-os-tests-netsocket-tcp | TIMEOUT | 493.24             | default     |
| NUCLEO_F401RE-GCC_ARM | NUCLEO_F401RE | mbed-os-tests-network-wifi  | TIMEOUT | 253.48             | default     |
+-----------------------+---------------+-----------------------------+---------+--------------------+-------------+
mbedgt: test suite results: 2 TIMEOUT
mbedgt: test case report:
+-----------------------+---------------+-----------------------------+------------------------------------+--------+--------+---------+--------------------+
| target                | platform_name | test suite                  | test case                          | passed | failed | result  | elapsed_time (sec) |
+-----------------------+---------------+-----------------------------+------------------------------------+--------+--------+---------+--------------------+
| NUCLEO_F401RE-GCC_ARM | NUCLEO_F401RE | mbed-os-tests-netsocket-tcp | TCPSOCKET_CONNECT_INVALID          | 0      | 0      | SKIPPED | 0.0                |
| NUCLEO_F401RE-GCC_ARM | NUCLEO_F401RE | mbed-os-tests-netsocket-tcp | TCPSOCKET_ECHOTEST                 | 1      | 0      | OK      | 4.3                |
| NUCLEO_F401RE-GCC_ARM | NUCLEO_F401RE | mbed-os-tests-netsocket-tcp | TCPSOCKET_ECHOTEST_BURST           | 0      | 0      | SKIPPED | 0.0                |
| NUCLEO_F401RE-GCC_ARM | NUCLEO_F401RE | mbed-os-tests-netsocket-tcp | TCPSOCKET_ECHOTEST_BURST_NONBLOCK  | 0      | 0      | SKIPPED | 0.0                |
| NUCLEO_F401RE-GCC_ARM | NUCLEO_F401RE | mbed-os-tests-netsocket-tcp | TCPSOCKET_ECHOTEST_NONBLOCK        | 0      | 0      | ERROR   | 0.0                |
| NUCLEO_F401RE-GCC_ARM | NUCLEO_F401RE | mbed-os-tests-netsocket-tcp | TCPSOCKET_ENDPOINT_CLOSE           | 0      | 0      | SKIPPED | 0.0                |
| NUCLEO_F401RE-GCC_ARM | NUCLEO_F401RE | mbed-os-tests-netsocket-tcp | TCPSOCKET_OPEN_CLOSE_REPEAT        | 0      | 0      | SKIPPED | 0.0                |
| NUCLEO_F401RE-GCC_ARM | NUCLEO_F401RE | mbed-os-tests-netsocket-tcp | TCPSOCKET_OPEN_LIMIT               | 0      | 0      | SKIPPED | 0.0                |
| NUCLEO_F401RE-GCC_ARM | NUCLEO_F401RE | mbed-os-tests-netsocket-tcp | TCPSOCKET_RECV_100K                | 0      | 0      | SKIPPED | 0.0                |
| NUCLEO_F401RE-GCC_ARM | NUCLEO_F401RE | mbed-os-tests-netsocket-tcp | TCPSOCKET_RECV_100K_NONBLOCK       | 0      | 0      | SKIPPED | 0.0                |
| NUCLEO_F401RE-GCC_ARM | NUCLEO_F401RE | mbed-os-tests-netsocket-tcp | TCPSOCKET_RECV_TIMEOUT             | 0      | 0      | SKIPPED | 0.0                |
| NUCLEO_F401RE-GCC_ARM | NUCLEO_F401RE | mbed-os-tests-netsocket-tcp | TCPSOCKET_SEND_REPEAT              | 0      | 0      | SKIPPED | 0.0                |
| NUCLEO_F401RE-GCC_ARM | NUCLEO_F401RE | mbed-os-tests-netsocket-tcp | TCPSOCKET_SEND_TIMEOUT             | 0      | 0      | SKIPPED | 0.0                |
| NUCLEO_F401RE-GCC_ARM | NUCLEO_F401RE | mbed-os-tests-netsocket-tcp | TCPSOCKET_THREAD_PER_SOCKET_SAFETY | 0      | 0      | SKIPPED | 0.0                |
| NUCLEO_F401RE-GCC_ARM | NUCLEO_F401RE | mbed-os-tests-network-wifi  | WIFI-CONNECT                       | 0      | 0      | SKIPPED | 0.0                |
| NUCLEO_F401RE-GCC_ARM | NUCLEO_F401RE | mbed-os-tests-network-wifi  | WIFI-CONNECT-DISCONNECT-REPEAT     | 0      | 0      | SKIPPED | 0.0                |
| NUCLEO_F401RE-GCC_ARM | NUCLEO_F401RE | mbed-os-tests-network-wifi  | WIFI-CONNECT-NOCREDENTIALS         | 1      | 0      | OK      | 90.21              |
| NUCLEO_F401RE-GCC_ARM | NUCLEO_F401RE | mbed-os-tests-network-wifi  | WIFI-CONNECT-PARAMS-CHANNEL        | 0      | 0      | SKIPPED | 0.0                |
| NUCLEO_F401RE-GCC_ARM | NUCLEO_F401RE | mbed-os-tests-network-wifi  | WIFI-CONNECT-PARAMS-CHANNEL-FAIL   | 0      | 0      | SKIPPED | 0.0                |
| NUCLEO_F401RE-GCC_ARM | NUCLEO_F401RE | mbed-os-tests-network-wifi  | WIFI-CONNECT-PARAMS-NULL           | 0      | 0      | SKIPPED | 0.0                |
| NUCLEO_F401RE-GCC_ARM | NUCLEO_F401RE | mbed-os-tests-network-wifi  | WIFI-CONNECT-PARAMS-VALID-SECURE   | 0      | 0      | SKIPPED | 0.0                |
| NUCLEO_F401RE-GCC_ARM | NUCLEO_F401RE | mbed-os-tests-network-wifi  | WIFI-CONNECT-PARAMS-VALID-UNSECURE | 0      | 0      | SKIPPED | 0.0                |
| NUCLEO_F401RE-GCC_ARM | NUCLEO_F401RE | mbed-os-tests-network-wifi  | WIFI-CONNECT-SECURE                | 0      | 0      | SKIPPED | 0.0                |
| NUCLEO_F401RE-GCC_ARM | NUCLEO_F401RE | mbed-os-tests-network-wifi  | WIFI-CONNECT-SECURE-FAIL           | 0      | 0      | SKIPPED | 0.0                |
| NUCLEO_F401RE-GCC_ARM | NUCLEO_F401RE | mbed-os-tests-network-wifi  | WIFI-CONSTRUCTOR                   | 1      | 0      | OK      | 0.05               |
| NUCLEO_F401RE-GCC_ARM | NUCLEO_F401RE | mbed-os-tests-network-wifi  | WIFI-GET-RSSI                      | 0      | 0      | SKIPPED | 0.0                |
| NUCLEO_F401RE-GCC_ARM | NUCLEO_F401RE | mbed-os-tests-network-wifi  | WIFI-SCAN                          | 0      | 0      | SKIPPED | 0.0                |
| NUCLEO_F401RE-GCC_ARM | NUCLEO_F401RE | mbed-os-tests-network-wifi  | WIFI-SCAN-NULL                     | 0      | 0      | SKIPPED | 0.0                |
| NUCLEO_F401RE-GCC_ARM | NUCLEO_F401RE | mbed-os-tests-network-wifi  | WIFI-SET-CHANNEL                   | 0      | 0      | ERROR   | 0.0                |
| NUCLEO_F401RE-GCC_ARM | NUCLEO_F401RE | mbed-os-tests-network-wifi  | WIFI-SET-CREDENTIAL                | 1      | 0      | OK      | 90.22              |
+-----------------------+---------------+-----------------------------+------------------------------------+--------+--------+---------+--------------------+
mbedgt: test case results: 24 SKIPPED / 4 OK / 2 ERROR
mbedgt: completed in 749.52 sec
mbedgt: exited with code 2

@betzw
Copy link
Collaborator

betzw commented Sep 21, 2018

I just can't see the

Run the greentea tests until you see the error SPWF> ERROR: Should never happen! (_wait_console_active, 246)

@betzw
Copy link
Collaborator

betzw commented Sep 24, 2018

Found it ... sorry!

@betzw
Copy link
Collaborator

betzw commented Sep 24, 2018

Could you pls. check if you have applied the following modifications on the tests:

----------------------- TESTS/netsocket/tcp/tcp_tests.h -----------------------
index 871eab9c9..ab9362a35 100644
@@ -31,7 +31,7 @@ int split2half_rmng_tcp_test_time(); // [s]
 
 namespace tcp_global {
 static const int TESTS_TIMEOUT = 480;
-static const int TCP_OS_STACK_SIZE = 1024;
+static const int TCP_OS_STACK_SIZE = (4*1024);
 
 static const int RX_BUFF_SIZE = 1220;
 static const int TX_BUFF_SIZE = 1220;

---------- TESTS/netsocket/tcp/tcpsocket_thread_per_socket_safety.cpp ----------
index 04172ef3d..b50894917 100644
@@ -29,7 +29,7 @@ static const int SIGNAL_SIGIO1 = 0x1;
 static const int SIGNAL_SIGIO2 = 0x2;
 static const int SIGIO_TIMEOUT = 5000; //[ms]
 
-Thread thread;
+Thread thread(osPriorityNormal, tcp_global::TCP_OS_STACK_SIZE);
 volatile bool running = true;
 }
 
@@ -50,8 +50,8 @@ static void check_const_len_rand_sequence()
     sock.sigio(callback(_sigio_handler1, Thread::gettid()));
 
     static const int BUFF_SIZE = 10;
-    char rx_buff[BUFF_SIZE] = {0};
-    char tx_buff[BUFF_SIZE] = {0};
+    static char rx_buff[BUFF_SIZE] = {0};
+    static char tx_buff[BUFF_SIZE] = {0};
 
 
     int bytes2process;
@@ -107,8 +107,8 @@ static void check_var_len_rand_sequence()
     sock.sigio(callback(_sigio_handler2, Thread::gettid()));
 
     static const int BUFF_SIZE = 1001;
-    char rx_buff[BUFF_SIZE];
-    char tx_buff[BUFF_SIZE];
+    static char rx_buff[BUFF_SIZE];
+    static char tx_buff[BUFF_SIZE];
     static const int pkt_size_diff = 100;
 
     int bytes2process;

@juhaylinen
Copy link
Contributor Author

Above changes seem to fix the issue #17 but I'm worried that there might be other cases where the WiFi shield ends up to non-functional state. So it would be better if the driver is able to recover from the error SPWF> ERROR: Should never happen! (_wait_console_active, 246).

@betzw
Copy link
Collaborator

betzw commented Sep 25, 2018

Well, from what you wrote some time ago

Reset, re-flashing the binary or power cycle doesn't help.

I can hardly imagine how you can recover from such a fault by SW/driver.
The best a driver can do is - in my opinion - making sure that the shield not ending up in such an error. As most likely the error is a consequence of a stack overflow a/o memory corruption even the driver cannot be made responsible for this behavior. Maybe the module FW might provide some more fault tolerance over the serial line communication channel, but this is just an assumption of mine as I do not know the FW implementation at all.

@VeijoPesonen
Copy link

@betzw so no firmware fix to be expected for this issue.

@betzw
Copy link
Collaborator

betzw commented Oct 1, 2018

Very unlikely.
But pls. note, we are not sure that it is actually related to FW, it is just an assumption for a potential cause!!!

@betzw
Copy link
Collaborator

betzw commented Oct 10, 2018

Can we close this issue?

@VeijoPesonen
Copy link

@SeppoTakalo should this be handled in a way that it is marked as a known restriction to README.md and once it's done this ticket is closed?

@SeppoTakalo
Copy link
Contributor

Why not just leave this open, if the root cause is not fixed.

@betzw
Copy link
Collaborator

betzw commented Oct 10, 2018

Simply because the root cause is not the driver.

@SeppoTakalo
Copy link
Contributor

What it is then?

If this is not reported here, where would it be reported?

@betzw
Copy link
Collaborator

betzw commented Oct 10, 2018

I do not know as I never managed to reproduce the issue.

@betzw
Copy link
Collaborator

betzw commented Oct 10, 2018

Above changes seem to fix the issue #17 but I'm worried that there might be other cases where the WiFi shield ends up to non-functional state. So it would be better if the driver is able to recover from the error SPWF> ERROR: Should never happen! (_wait_console_active, 246).

And it seems to be just a worry of @juhaylinen

@VeijoPesonen
Copy link

@jflynn129 seems to have the same issue, to be exact.

@ghost
Copy link

ghost commented Oct 10, 2018

@VeijoPesonen I ended up using a different WiFi board because this st WiFi board will not work with the nucleo l496zg which is what I was targeting. Seems that this WiFi board has a limited selection of compatible nucleo boards.

@betzw
Copy link
Collaborator

betzw commented Oct 11, 2018

Regarding @jflynn129 comment pls. refer to discussion #19.

@SeppoTakalo
Copy link
Contributor

@betzw Did you ever run the tests?

This happens every night in our CI.
screenshot 2018-10-11 at 10 42 18

Just run Mbed OS socket tests.

@betzw
Copy link
Collaborator

betzw commented Oct 11, 2018

@betzw Did you ever run the tests?

On my side theses tests were passing.
Which revision of the driver, the test-suite, and the module FW are you using?
Do you have a detailed execution trace of each of your test runs?

@betzw
Copy link
Collaborator

betzw commented Oct 12, 2018

Btw, I needed to modify the main.cpp files of all your netsocket tests in the functions which bring-up the network in the following way:

static void bringup_function()
{
    net = NetworkInterface::get_default_instance();

+    if(WiFiInterface *wifi = net->wifiInterface()) {
+	nsapi_error_t err = wifi->set_credentials(MBED_CONF_APP_WIFI_SECURE_SSID,
+						  MBED_CONF_APP_WIFI_PASSWORD,
+						  NSAPI_SECURITY_WPA_WPA2);
+	TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, err);
+    }
    
    nsapi_error_t err = net->connect();
    TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, err);
    printf("MBED: TCPClient IP address is '%s'\n", net->get_ip_address());
}

@betzw
Copy link
Collaborator

betzw commented Oct 22, 2018

Any update on this from ARM side?

@SeppoTakalo
Copy link
Contributor

No changes should be required, or are allowed on test cases.

We run same testcases on all boards without modification and there are many that pass TCP and UDP tests.

@betzw
Copy link
Collaborator

betzw commented Nov 5, 2018

Well, I am just wondering how WiFi boards in general should connect to the WiFi network/service without credentials (including SSID)?

@betzw
Copy link
Collaborator

betzw commented Nov 5, 2018

Furthermore, I believe that the mbed-os-tests-network-interface tests have not been designed in a way which would allow them to work with AT-command based WiFi shields.

@VeijoPesonen
Copy link

Furthermore, I believe that the mbed-os-tests-network-interface tests have not been designed in a way which would allow them to work with AT-command based WiFi shields.

If you mean the model where data is only processed when sending/receiving that is the case. But if you use separate thread/global event queue like with esp8266-driver(PR ARMmbed/esp8266-driver#106) then it's possible to pass the test cases in question.

As an example test cases results when using ESP8266 Wi-Fi module.

+--------------+---------------+-------------------------+---------------------------------------+--------+--------+---------+--------------------+
| target       | platform_name | test suite              | test case                             | passed | failed | result  | elapsed_time (sec) |
+--------------+---------------+-------------------------+---------------------------------------+--------+--------+---------+--------------------+
| K64F-GCC_ARM | K64F          | tests-netsocket-dns     | ASYNCHRONOUS_DNS                      | 1      | 0      | OK      | 0.26               |
| K64F-GCC_ARM | K64F          | tests-netsocket-dns     | ASYNCHRONOUS_DNS_CACHE                | 1      | 0      | OK      | 0.61               |
| K64F-GCC_ARM | K64F          | tests-netsocket-dns     | ASYNCHRONOUS_DNS_CANCEL               | 0      | 0      | SKIPPED | 0.0                |
| K64F-GCC_ARM | K64F          | tests-netsocket-dns     | ASYNCHRONOUS_DNS_EXTERNAL_EVENT_QUEUE | 0      | 0      | SKIPPED | 0.0                |
| K64F-GCC_ARM | K64F          | tests-netsocket-dns     | ASYNCHRONOUS_DNS_INVALID_HOST         | 0      | 0      | SKIPPED | 0.0                |
| K64F-GCC_ARM | K64F          | tests-netsocket-dns     | ASYNCHRONOUS_DNS_NON_ASYNC_AND_ASYNC  | 0      | 0      | ERROR   | 0.0                |
| K64F-GCC_ARM | K64F          | tests-netsocket-dns     | ASYNCHRONOUS_DNS_SIMULTANEOUS         | 1      | 0      | OK      | 0.8                |
| K64F-GCC_ARM | K64F          | tests-netsocket-dns     | ASYNCHRONOUS_DNS_SIMULTANEOUS_CACHE   | 1      | 0      | OK      | 0.68               |
| K64F-GCC_ARM | K64F          | tests-netsocket-dns     | ASYNCHRONOUS_DNS_SIMULTANEOUS_REPEAT  | 0      | 0      | SKIPPED | 0.0                |
| K64F-GCC_ARM | K64F          | tests-netsocket-dns     | ASYNCHRONOUS_DNS_TIMEOUTS             | 0      | 0      | SKIPPED | 0.0                |
| K64F-GCC_ARM | K64F          | tests-netsocket-dns     | SYNCHRONOUS_DNS                       | 0      | 0      | SKIPPED | 0.0                |
| K64F-GCC_ARM | K64F          | tests-netsocket-dns     | SYNCHRONOUS_DNS_INVALID               | 0      | 0      | SKIPPED | 0.0                |
| K64F-GCC_ARM | K64F          | tests-netsocket-dns     | SYNCHRONOUS_DNS_MULTIPLE              | 0      | 0      | SKIPPED | 0.0                |
| K64F-GCC_ARM | K64F          | tests-netsocket-tcp     | TCPSOCKET_CONNECT_INVALID             | 1      | 0      | OK      | 0.22               |
| K64F-GCC_ARM | K64F          | tests-netsocket-tcp     | TCPSOCKET_ECHOTEST                    | 1      | 0      | OK      | 3.47               |
| K64F-GCC_ARM | K64F          | tests-netsocket-tcp     | TCPSOCKET_ECHOTEST_BURST              | 1      | 0      | OK      | 33.03              |
| K64F-GCC_ARM | K64F          | tests-netsocket-tcp     | TCPSOCKET_ECHOTEST_BURST_NONBLOCK     | 1      | 0      | OK      | 32.54              |
| K64F-GCC_ARM | K64F          | tests-netsocket-tcp     | TCPSOCKET_ECHOTEST_NONBLOCK           | 1      | 0      | OK      | 5.5                |
| K64F-GCC_ARM | K64F          | tests-netsocket-tcp     | TCPSOCKET_ENDPOINT_CLOSE              | 1      | 0      | OK      | 0.92               |
| K64F-GCC_ARM | K64F          | tests-netsocket-tcp     | TCPSOCKET_OPEN_CLOSE_REPEAT           | 1      | 0      | OK      | 0.06               |
| K64F-GCC_ARM | K64F          | tests-netsocket-tcp     | TCPSOCKET_OPEN_LIMIT                  | 1      | 0      | OK      | 0.2                |
| K64F-GCC_ARM | K64F          | tests-netsocket-tcp     | TCPSOCKET_RECV_100K                   | 1      | 0      | OK      | 11.79              |
| K64F-GCC_ARM | K64F          | tests-netsocket-tcp     | TCPSOCKET_RECV_100K_NONBLOCK          | 1      | 0      | OK      | 11.74              |
| K64F-GCC_ARM | K64F          | tests-netsocket-tcp     | TCPSOCKET_RECV_TIMEOUT                | 1      | 0      | OK      | 1.33               |
| K64F-GCC_ARM | K64F          | tests-netsocket-tcp     | TCPSOCKET_SEND_REPEAT                 | 1      | 0      | OK      | 77.29              |
| K64F-GCC_ARM | K64F          | tests-netsocket-tcp     | TCPSOCKET_SEND_TIMEOUT                | 1      | 0      | OK      | 0.92               |
| K64F-GCC_ARM | K64F          | tests-netsocket-tcp     | TCPSOCKET_THREAD_PER_SOCKET_SAFETY    | 1      | 0      | OK      | 3.46               |
| K64F-GCC_ARM | K64F          | tests-netsocket-udp     | UDPSOCKET_ECHOTEST                    | 1      | 0      | OK      | 3.32               |
| K64F-GCC_ARM | K64F          | tests-netsocket-udp     | UDPSOCKET_ECHOTEST_BURST              | 1      | 0      | OK      | 28.8               |
| K64F-GCC_ARM | K64F          | tests-netsocket-udp     | UDPSOCKET_ECHOTEST_BURST_NONBLOCK     | 1      | 0      | OK      | 27.99              |
| K64F-GCC_ARM | K64F          | tests-netsocket-udp     | UDPSOCKET_ECHOTEST_NONBLOCK           | 1      | 0      | OK      | 5.58               |
| K64F-GCC_ARM | K64F          | tests-netsocket-udp     | UDPSOCKET_OPEN_CLOSE_REPEAT           | 1      | 0      | OK      | 0.06               |
| K64F-GCC_ARM | K64F          | tests-netsocket-udp     | UDPSOCKET_OPEN_LIMIT                  | 1      | 0      | OK      | 0.22               |
| K64F-GCC_ARM | K64F          | tests-netsocket-udp     | UDPSOCKET_SENDTO_INVALID              | 1      | 0      | OK      | 0.09               |
| K64F-GCC_ARM | K64F          | tests-netsocket-udp     | UDPSOCKET_SENDTO_REPEAT               | 1      | 0      | OK      | 0.82               |
| K64F-GCC_ARM | K64F          | tests-netsocket-udp     | UDPSOCKET_SENDTO_TIMEOUT              | 1      | 0      | OK      | 0.15               |
| K64F-GCC_ARM | K64F          | tests-network-interface | NETWORKINTERFACE_CONN_DISC_REPEAT     | 1      | 0      | OK      | 22.25              |
| K64F-GCC_ARM | K64F          | tests-network-interface | NETWORKINTERFACE_STATUS               | 1      | 0      | OK      | 23.43              |
| K64F-GCC_ARM | K64F          | tests-network-interface | NETWORKINTERFACE_STATUS_GET           | 1      | 0      | OK      | 24.22              |
| K64F-GCC_ARM | K64F          | tests-network-interface | NETWORKINTERFACE_STATUS_NONBLOCK      | 1      | 0      | OK      | 26.23              |
| K64F-GCC_ARM | K64F          | tests-network-wifi      | WIFI-CONNECT                          | 0      | 1      | FAIL    | 22.16              |
| K64F-GCC_ARM | K64F          | tests-network-wifi      | WIFI-CONNECT-DISCONNECT-REPEAT        | 0      | 1      | FAIL    | 62.42              |
| K64F-GCC_ARM | K64F          | tests-network-wifi      | WIFI-CONNECT-NOCREDENTIALS            | 1      | 0      | OK      | 0.05               |
| K64F-GCC_ARM | K64F          | tests-network-wifi      | WIFI-CONNECT-PARAMS-CHANNEL           | 1      | 0      | OK      | 0.11               |
| K64F-GCC_ARM | K64F          | tests-network-wifi      | WIFI-CONNECT-PARAMS-CHANNEL-FAIL      | 1      | 0      | OK      | 0.11               |
| K64F-GCC_ARM | K64F          | tests-network-wifi      | WIFI-CONNECT-PARAMS-NULL              | 1      | 0      | OK      | 0.05               |
| K64F-GCC_ARM | K64F          | tests-network-wifi      | WIFI-CONNECT-PARAMS-VALID-SECURE      | 1      | 0      | OK      | 4.18               |
| K64F-GCC_ARM | K64F          | tests-network-wifi      | WIFI-CONNECT-PARAMS-VALID-UNSECURE    | 1      | 0      | OK      | 7.12               |
| K64F-GCC_ARM | K64F          | tests-network-wifi      | WIFI-CONNECT-SECURE                   | 1      | 0      | OK      | 4.17               |
| K64F-GCC_ARM | K64F          | tests-network-wifi      | WIFI-CONNECT-SECURE-FAIL              | 1      | 0      | OK      | 14.17              |
| K64F-GCC_ARM | K64F          | tests-network-wifi      | WIFI-CONSTRUCTOR                      | 1      | 0      | OK      | 0.05               |
| K64F-GCC_ARM | K64F          | tests-network-wifi      | WIFI-GET-RSSI                         | 1      | 0      | OK      | 6.98               |
| K64F-GCC_ARM | K64F          | tests-network-wifi      | WIFI-SCAN                             | 0      | 2      | FAIL    | 17.5               |
| K64F-GCC_ARM | K64F          | tests-network-wifi      | WIFI-SCAN-NULL                        | 0      | 1      | FAIL    | 17.45              |
| K64F-GCC_ARM | K64F          | tests-network-wifi      | WIFI-SET-CHANNEL                      | 1      | 0      | OK      | 0.09               |
| K64F-GCC_ARM | K64F          | tests-network-wifi      | WIFI-SET-CREDENTIAL                   | 1      | 0      | OK      | 0.05               |
+--------------+---------------+-------------------------+---------------------------------------+--------+--------+---------+--------------------+
mbedgt: test case results: 4 FAIL / 8 SKIPPED / 43 OK / 1 ERROR
mbedgt: completed in 726.84 sec

@betzw
Copy link
Collaborator

betzw commented Nov 5, 2018

Well, I think its more about that the following methods are new to me and therefore not (yet) supported:

virtual nsapi_error_t NetworkStack::setsockopt(nsapi_socket_t handle, int level, int optname, const void *optval, unsigned optlen);

virtual nsapi_error_t NetworkStack::getsockopt(nsapi_socket_t handle, int level, int optname, void *optval, unsigned *optlen);

virtual void NetworkInterface::attach(mbed::Callback<void(nsapi_event_t, intptr_t)> status_cb);

virtual nsapi_connection_status_t NetworkInterface::get_connection_status() const;

@betzw
Copy link
Collaborator

betzw commented Nov 13, 2018

@VeijoPesonen,
with respect to the tests you were executing on top of the ESP8266 WiFi-Model, how did you connect to the WiFi network without specifying and setting the SSID etc. in the code?

@SeppoTakalo
Copy link
Contributor

Have mbed_app.json like this:

{
    "config": {
        "wifi-secure-ssid": {
            "help": "WiFi SSID for WPA2 secured network",
            "value": "\"systest\""
        },
        "wifi-unsecure-ssid": {
            "help": "WiFi SSID for unsecure netwrok",
            "value": "\"echonet\""
        },
        "wifi-password": {
            "help": "WiFi Password",
            "value": "\"RaaSysT35T\""
        },
        "wifi-secure-protocol": {
            "help": "WiFi security protocol, valid values are WEP, WPA, WPA2, WPA/WPA2",
            "value": "\"WPA2\""
        },
        "wifi-ch-secure": {
            "help": "Channel number of secure SSID",
            "value": 6
        },
        "wifi-ch-unsecure": {
            "help": "Channel number of unsecure SSID",
            "value": 6
        },
        "wifi-tx": {
            "help": "TX pin for serial connection to external device",
            "value": "D1"
        },
        "wifi-rx": {
            "help": "RX pin for serial connection to external device",
            "value": "D0"
        },
        "ap-mac-secure": {
            "help": "BSSID of secure AP in form of AA:BB:CC:DD:EE:FF",
            "value": "\"80:2a:a8:8a:e9:13\""
        },
        "ap-mac-unsecure": {
            "help": "BSSID of unsecure AP in form of \"AA:BB:CC:DD:EE:FF\"",
            "value": "\"58:8b:f3:99:c2:08\""
        },
        "max-scan-size": {
            "help": "How many networks may appear in Wifi scan result",
            "value": 30
        },
        "echo-server-addr" : {
            "help" : "IP address of echo server",
            "value" : "\"echo.mbedcloudtesting.com\""
        },
        "echo-server-port" : {
            "help" : "Port of echo server",
            "value" : "7"
        }
    },
    "target_overrides": {
        "*": {
            "lwip.ipv4-enabled": true,
            "lwip.ipv6-enabled": false,
            "target.network-default-interface-type": "WIFI",
            "nsapi.default-wifi-ssid": "MBED_CONF_APP_WIFI_SECURE_SSID",
            "nsapi.default-wifi-password": "MBED_CONF_APP_WIFI_PASSWORD",
            "nsapi.default-wifi-security": "WPA_WPA2"
        },
        "K64F": {
            "esp8266.provide-default": true
        },
        "NUCLEO_F401RE": {
            "idw0xx1.provide-default": true,
            "idw0xx1.tx": "D8",
            "idw0xx1.rx": "D2",
            "drivers.uart-serial-txbuf-size": 512,
            "drivers.uart-serial-rxbuf-size": 512
        },
        "DISCO_L475VG_IOT01A": {
        	"ism43362.provide-default": true
        }
    },
    "macros": ["MBED_EXTENDED_TESTS"]
}

@betzw
Copy link
Collaborator

betzw commented Nov 13, 2018

Seems as if I am completely stupid or expressing myself terribly badly ...

Anyway, I am looking for the place in the test sources where the above config values for WiFi (above all SSID, pwd, and protocol) get used in order to make the tests work also for WiFi modules.

@SeppoTakalo
Copy link
Contributor

Socket tests are relying on those nsapi.default-xxx things as they only call NetworkInterface::get_default_instance()

That class is instantiated here: https://github.com/ARMmbed/mbed-os/blob/master/features/netsocket/NetworkInterfaceDefaults.cpp#L86..L104 so the Socket test cases do not touch the configuration anymore.

Then the WIFI tests use those MBED_APP_XXX macros for doing more specific things https://github.com/ARMmbed/mbed-os/blob/master/TESTS/network/wifi/wifi_connect.cpp#L34

So some configuration values appear twice in your app-json, because they satisfy different API levels.

@betzw
Copy link
Collaborator

betzw commented Nov 14, 2018

OK, got it! Will try.
If this works remains that the things here get added, right?

@SeppoTakalo
Copy link
Contributor

Well

virtual void NetworkInterface::attach(mbed::Callback<void(nsapi_event_t, intptr_t)> status_cb);
virtual nsapi_connection_status_t NetworkInterface::get_connection_status() const;

are part of API so should be added.

Socket options are basically always implementation specific, so it is fine to return NSAPI_ERROR_UNSUPPORTED from those calls.

@betzw
Copy link
Collaborator

betzw commented Nov 15, 2018

Well

virtual void NetworkInterface::attach(mbed::Callback<void(nsapi_event_t, intptr_t)> status_cb);
virtual nsapi_connection_status_t NetworkInterface::get_connection_status() const;

are part of API so should be added.

@avilei, can you pls. provide some information to @SeppoTakalo if and when ST might implement these additional API functionality?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants