Commit Graph

39 Commits

Author SHA1 Message Date
Masatoshi Ueno
0f4ad7dc5f gs2200m: Add function to get IWNWID / IWFREQ / IWSENS information
Summary:
- This commit enables gs2200m application to get IWNWID/IWFREQ/IWSENS information

Impact:
- Affects gs2200m only

Testing:
- Tested with spresense:wifi
2020-11-02 19:59:09 +09:00
Masayuki Ishikawa
909eff540d wireless: gs2200m: Add support for ioctl(fd, SIOCGIFADDR, ...)
Summary:
- This commit adds support for ioctl(fd, SIOCGIFADDR, ...) to gs2200m_main.c

Impact:
- Only affects ioctl(fd, SIOCGIFADDR, ...) with gs2200m
- Need to update nuttx as well

Testing:
- Tested with spresense:wifi
- Tested with dhcpc

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-10-26 12:42:03 +01:00
Masayuki Ishikawa
b71c5f8cb1 wireless: gs2200m: Implement getpeername_request()
Summary:
- This commit adds getperrname_request() to gs2200m_main.c

Impact:
- Affects gs2200m only
- Need to update nuttx as well

Testing:
- Tested with spresense:wifi
- Modify telnetd and add getpeername() to show a client address

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-10-26 12:42:03 +01:00
Masayuki Ishikawa
0e9594e107 wireless: gs2200m: Fix to handle address info in accept()
Summary:
- This commit fixes to handle address info in accept()

Impact:
- All use cases which use accept() with gs2200m
- Need to update nuttx as well

Testing:
- Tested with spresene:wifi
- Tested with telnet daemon

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-10-26 12:42:03 +01:00
Masayuki Ishikawa
196b1f06df wireless: gs2200m: Fix to handle UDP connect() with bind()
Summary:
- This commit fixes to handle UDP connect() with bind() to local port
- NOTE: GS2200M does not support TCP connect() with bind to local port

Impact:
- All UDP cases which use connect() with gs2200m
- Need to update nuttx as well

Testing:
- Tested with spresense:wifi
- Create a UDP socket and bind() to local port.
- Then connect() to remote address with port and send()

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-10-26 12:42:03 +01:00
Masayuki Ishikawa
f4b0f9e290 wireless: gs2200m: Fix recvfrom_reques() in gs2200m_main.c
Summary:
- During Wi-Fi stress test, I noticed ASSERT happens in gs2200m_main.c
- Actually, req->max_buflen was 0 but the case was not handled correctly
- This commit fixes this issue

Impact:
- Affects read/recvfrom with len=0 cases

Testing:
- Tested with spresense:wifi_smp
- Run nxplayer for audio streaming
- Run ps/free/ifconfig commands via telnet
- Run smp command via telnet

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-10-09 08:47:14 +02:00
SPRESENSE
4e1a22428a wireless/gs2200m/gs2200m_main.c: Add passing MSG flags
Add passing MSG_* flags for gs2200m driver.
2020-08-06 20:52:09 +09:00
Masayuki Ishikawa
faec1f8614 wireless: gs2200m: Replace license header with Apache License 2.0
Summary:
- This commit replaces license headers under wireleass/gs2200m.

Impact:
- No impact

Testing:
- Buid check only

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-07-29 01:05:31 -05:00
SPRESENSE
f8354b0c03 wireless/gs2200m: Fix freeing uninitialized memory
Add initialize local variable and check the buffer is allocated before free().
2020-07-28 09:46:09 +02:00
Xiang Xiao
deaa6c5b7b build: Replace $(TOPDIR)/Make.defs with $(APPDIR)/Make.defs
and move NUTTXLIB defintion to the common place

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-07-09 15:17:37 -03:00
Xiang Xiao
69f013e74e build: Remve the unnecessary .gitignore
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-23 15:56:35 +01:00
Masayuki Ishikawa
13479e0a8c wireless: gs2200m: Update help messages in gs2200m_main.c
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-05-22 10:30:16 +02:00
Xiang Xiao
ead498a788 build: Remove the workaround for the inexistence of .config/Make.defs
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-21 17:43:42 +01:00
Masayuki Ishikawa
e2414cd731 wireless: gs2200m: Fix to receive a big packet
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-05-18 09:44:37 +02:00
Masayuki Ishikawa
f3934ec6d8 wireless: gs2200m: Add support for getsockname() to gs2200m
NOTE: need to update nuttx repo as well

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-05-14 07:50:16 -06:00
Masayuki Ishikawa
06e74202b5 wireless: gs2200m: Fix to release a bound socket
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-04-30 20:17:26 +08:00
Masayuki Ishikawa
efcbd2d842 wireless: gs2200m: Fix nxstyle warnings in gs2200m_main.c
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-04-14 11:22:10 +02:00
Masayuki Ishikawa
c126732799 wireless: gs2200m: Add support for UDP connect in gs2200m_main.c
NOTE: gs2200m driver needs to be updated as well

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-04-14 11:22:10 +02:00
YAMAMOTO Takashi
e7156be066 Change the defaults of stack size configs to DEFAULT_TASK_STACKSIZE
This commit changes only ones with the default 2048 and
leaves the others.
E.g. this leaves SYSTEM_RAMTEST_STACKSIZE, whose default is 1024.
I guess those need to be inspected one-by-one.
2020-03-27 02:43:11 -05:00
Xiang Xiao
1511403fdf Revert "Don't generate .depend anymore"
This reverts commit cc5ad09caa.
2020-03-22 23:09:40 -05:00
Xiang Xiao
cc5ad09caa
Don't generate .depend anymore 2020-03-22 18:15:21 +00:00
Xiang Xiao
41d88f06e7 Run codespell -w with the latest dictonary again 2020-02-23 07:10:14 -06:00
Masayuki Ishikawa
de4d52d465 wireless: gs2200m: Add support for setsockopt_request()
NOTE: Just check parameters and do nothing special

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-02-14 15:01:28 +08:00
Gregory Nutt
d2e1c8a4f3 apps/wireless/gs2200m/gs2200m_main.c: Eliminate a warning
Eliminate warning:

    gs2200m_main.c:  In function 'gs2200m_loop':
    gs2200m_main.c:1416:1:  warning: label 'errout' defined but not used [-Wunused-label]
2020-02-09 00:32:25 +01:00
Miguel Herranz
a5dff52a71 Change unimplemented requests behaviour in gs2200m
The ASSERT is too strong, as it cannot be disabled, so changing to
DEBUGASSERT, as calling these functions should not be a problem as
long as the application logic handle the error correctly.

The error code is changed to ENOSYS, as it seems to better reflect
the fact that the call itself would be valid, but the functionality
is not implemented (see [1] or `man errno`).

[1] https://www.gnu.org/software/libc/manual/html_node/Error-Codes.html
2020-02-06 23:43:37 +01:00
YAMAMOTO Takashi
2f4b309b1b gs2200m: Retry indefinately on GS2200M_IOC_ASSOC failure
Author: Alan Carvalho de Assis <engenharia03@siam.ind.br>

    Run nxstyle again gs2200m_main.c file and fix issues

Author: YAMAMOTO Takashi <yamamoto@midokura.com>

    gs2200m: Retry indefinately on GS2200M_IOC_ASSOC failure

    The ioctl doesn't return why it failed.
    It might or might not be a transient failure.

    In my environment, gs2200m often returns the following for AT+WA.
    It usually works after a few retries.

    [   12.110000] _parse_pkt_in_s1: +++++ 0:(msize=19, msg=WLAN CONNECT ERROR|)
    [   12.110000] _parse_pkt_in_s1: +++++ 1:(msize=6, msg=ERROR|)
2020-02-05 18:45:43 -03:00
Masayuki Ishikawa
e4af73ec56 wireless: gs2200m: Fix sendto_request() in gs2200m_main.c
Signed-off-by: Masayuki Ishikawa <<Masayuki.Ishikawa@jp.sony.com>
2020-01-28 10:35:50 +01:00
Masayuki Ishikawa
ebf666100a apps: gs2200m: Remove unnecessary usleep() to improve throughput
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-01-21 16:03:41 +09:00
Xiang Xiao
857158451b Unify the void cast usage
1.Remove void cast for function because many place ignore the returned value witout cast
2.Replace void cast for variable with UNUSED macro

Change-Id: Ie644129a563244a6397036789c4c3ea83c4e9b09
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-01-02 23:21:01 +08:00
Xiang Xiao
7808eb62d2 apps/: In all Make.def files, append to CONFIGURED_APPS patch with the absolute path. 2019-10-17 11:33:59 -06:00
Gregory Nutt
3a23523147 Makefiles: This reverts part of commit cf0365ea9. It restores 'conditional' inclusion of TOPDIR/Make.defs. Otherwise all make targets fail if the board has not been configured. That is okay most of the time, but not for things like clean and distclean which should not depend on being configured. 2019-10-15 09:25:48 +08:00
Xiang Xiao
e806097c70 Application.mk and main.c files: Change builtin's entry point from main to xxx_main by macro expansion. This change make the entry point fully compliant with POSIX/ANSI standard. 2019-10-06 06:14:56 -06:00
Xiang Xiao
cf0365ea92 Clean up Makefile under apps folder no functional changes. 2019-10-04 08:35:46 -06:00
Masayuki Ishikawa
104d7f3716 Merged in masayuki2009/nuttx.apps/gs2200m_supports_SIOCGIFHWADDR (pull request #199)
wireless/gs2200m/gs2200m_main.c: ioctl_request() supports SIOCGIFHWADDR

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-09-02 01:53:29 +00:00
Masayuki Ishikawa
1980c30738 Merged in masayuki2009/nuttx.apps/gs2200m_with_dhcp (pull request #189)
wireless/gs2200m: Add dhcp client handlings in ioctl_request()

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-07-30 10:51:07 +00:00
Masayuki Ishikawa
ff8d6aeed0 Merged in masayuki2009/nuttx.apps/gs2200m_with_udp (pull request #186)
wireless/gs2200m: Add udp support to gs2200m_main.c

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-07-25 05:41:16 +00:00
Masayuki Ishikawa
2cd84d713c Merged in masayuki2009/nuttx.apps/add_ch_setting (pull request #185)
wireless/gs2200m: Add channel parameter for AP mode

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-07-10 11:34:09 +00:00
Gregory Nutt
334b450452 wireless/gs2200m/gs2200m_main.c: Fix a warning about an uninitialized return value found in build testing. 2019-06-29 18:50:20 -06:00
Masayuki Ishikawa
d2f3ad91e2 Merged in masayuki2009/nuttx.apps/wireless_gs2200m (pull request #177)
apps/wireless/gs2200m: Moved from apps/system/gs2200m

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-06-27 00:54:19 +00:00