Commit Graph

4110 Commits

Author SHA1 Message Date
Ken Pettit ‎
b285dd9b68 Perform a bounds check to fix a random Termcurses crash that I haven't been able to track down. The result of of the subtraction for priv->keycount should never be negative, but I think sometimes it is, so better to catch it and avoid a crash until I can track it down. 2019-01-16 18:22:16 -06:00
Gregory Nutt
93de0c232b apps/system/readline_common.c: Correct spelling, matches vs maches. 2019-01-16 10:15:18 -06:00
Anthony Merlino
7cde7e921d Merged in antmerlino/apps/addroute-default-gw (pull request #166)
addroute: Adds command for setting default gateway. addroute default <ipaddr> <interface>

Approved-by: GregoryN <gnutt@nuttx.org>
2019-01-13 14:20:15 +00:00
Anthony Merlino
c895593fc1 Merged in antmerlino/apps/i8sak-daemon-fixea (pull request #165)
wireless/ieee802154/i8sak: Fixes issues related to re-running daemon. Releases lock when releasing daemon. Re-sets daemon_shutdown so that a subsequent daemon launch does not immediately return.

Approved-by: GregoryN <gnutt@nuttx.org>
2019-01-13 14:19:43 +00:00
Ken Pettit
e08d100919 apps/nshlib/nsh_parse.c: Fixes an error in the NSH parser. There was a bug when executing an nsh shell script which contains a redirection. When the command in the script is executed, it sets the vtbl->np.np_redirect flag (as it should), but then doesn't restore it, leaving it set at the end of the script execution. Then the vtbl->np.np_redirect flag is set when the 'sh' command completes, causing a restore from un-initialized variables, thus leading to a crash. See the code snippet below for an example test case.
Test case:

NuttShell (NSH)
nsh> mkrd -s 1024 40
nsh> mkfatfs /dev/ram0
nsh> mount -t vfat /dev/ram0 /tmp
nsh> echo "echo 1 > /dev/null" > /tmp/test.sh
nsh> cat /tmp/test.sh
echo 1 > /dev/null
nsh> sh /tmp/test.sh
...

The nsh prompt doesn't get printed.  You can type a couple of commands, but then the system will crash because of bad pointers.
2019-01-12 10:56:48 -06:00
Gregory Nutt
eaec674e7b apps/nshlib/nsh_command.c: In all multi-column help output, make the number of rows presented dependent upon the maximum width of the widest column. 2019-01-11 09:21:59 -06:00
Gregory Nutt
d789194836 apps/nshlib/nsh_command.c: In all multi-column help output, calculate an optimal column width rather than using a hard-coded width that may or may not be appropriate. 2019-01-11 08:59:36 -06:00
Ken Pettit
cb4974cee8 apps/system/termcurses/tcurses_vt100.c: Fix an issue where the first curses 'getch()' call sometimes (usually) hangs waiting for a keypress. This bug was introduced when I fixed the keyboard 'paste' overflow error. 2019-01-11 07:41:04 -06:00
Gregory Nutt
806ba4ee83 apps/nshlib/nsh_command.c: Fix a few long lines 2019-01-11 07:39:23 -06:00
Ken Pettit
a6d056cf76 apps/nshlib/nsh_command.c: display built-in apps using multi-column mode like the nsh commands 2019-01-11 07:35:04 -06:00
Ken Pettit
8132c38064 graphics/pdcurs34: This commit adds a configuration option to pdcurses to enable line-drawing character (ALTCHARSET) when using the short 16-bit chtype. This is done by limiting the characters to 7-bit ASCII values and using the 8-th bit as the A_ALTCHARSET bit. This allows a significant RAM savings 4K - 20K depending on terminal size) while still allowing the nicer line-graphic characters for border drawing. 2019-01-08 08:28:27 -06:00
Ken Pettit
e1237bfefd apps/graphics/pdcurs34/nuttx and system/termcurses: This commit fixes two issues:
1. A memory corruption issue that occurs from a paste operation that would overflow the fixed buffer size for keyboard processing.

2. A stall in getch() processing when there are cached keycodes in the termcurses emulation (tcurses_vt100.c).
2019-01-08 08:28:27 -06:00
Masayuki Ishikawa
3cdb6ec4ba &Merged in masayuki2009/nuttx.apps/nxplayer_mainthread_stacksize (pull request #164)
apps/system/nxplayer: Introduce CONFIG_NXPLAYER_MAINTHREAD_STACKSIZE

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

Approved-by: GregoryN <gnutt@nuttx.org>
2019-01-07 01:51:36 +00:00
Gregory Nutt
3257ea42d5 apps/nshlib/nsh_parrse.c: Correct some coding standard problems in last PR. 2019-01-06 10:00:19 -06:00
Daniel Agar
c700bf9739 Merged in dagar/nuttx-apps/pr-nshlib (pull request #163)
[WIP] nshlib add var expansion in nsh parse

Approved-by: GregoryN <gnutt@nuttx.org>
2019-01-06 15:52:18 +00:00
Gregory Nutt
298c76e611 apps/system/termcurses/tcurses_vt100.c: Fix an error introduced during review of recent patch. 2019-01-05 13:52:51 -06:00
Ken Pettit
c776901ac2 apps/examples/pdcurses: Minor fixes to examples/pdcurses apps to support multi-threading, cleanup RAM, etc. 2019-01-05 13:28:06 -06:00
Ken Pettit
73fc5eb199 apps/graphics/pdcurs34: Integration of termcurses into pdcurses, plus pdcurses updates for multi-thread support 2019-01-05 13:25:12 -06:00
Ken Pettit
fcd15d8786 apps/system/termcurses: Addition of termcurses libraries in apps/system/termcurses 2019-01-05 12:40:26 -06:00
Alan Carvalho de Assis
25c0387c44 apps/examples/battery: Add Battery Charger Monitor Example 2019-01-04 12:15:05 -06:00
Gregory Nutt
5182dbc4b1 apps/testing/ostest: Add test for pthread-specific data. 2018-12-28 14:17:40 -06:00
Gregory Nutt
0c615ed586 Fix a few typos. 2018-12-27 08:48:52 -06:00
Masayuki Ishikawa
9b548e8ea2 Merged in masayuki2009/nuttx.apps/add_dep_to_smp (pull request #162)
apps/examples/smp: Add dependency on SMP in Kconfig

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

Approved-by: GregoryN <gnutt@nuttx.org>
2018-12-25 14:15:16 +00:00
Ken Pettit
88c78b6a0c apps/system/configdata: Adds an "cfgdata" command which allows manipulation of the /dev/config items via the command line. One such use for this utility would be to set a "macaddr" configdata item, etc. The utility is sort-of like a u-boot env variable edit function:
For instance, to set a "macaddr" when the new CONFIG_MTD_CONFIG_NAMED option is selected, you would do:

nsh> cfgdata set macaddr [0xfc 0x01 0x0b 0x45 0xa1 0x12] <-- brackets denotes an array of bytes
nsh> cfgdata set hostname myboard

or using the old ID,INSTANCE numeric method:

nsh> cfgdata set 0,0 [0xfc 0x01 0x0b 0x45 0xa1 0x12]      <-- brackets denotes an array of bytes
nsh> cfgdata set 1,0 myboard

You can also display all config items:

nsh> cfgdata print all
Name                    Len   Data
macaddr                 6     0xFC 0x01 0x0B 0x45 0xA1 0x12
hostname                8     myboard
2018-12-20 14:24:51 -06:00
Gregory Nutt
40874bbe8b apps/system/nsh/nsh_main.c: Set NSH priorirty if the NSH task was scheduled at a different priority than the configured priority. 2018-12-20 10:50:29 -06:00
Lwazi Dube
a3c8f17522 apps/wireless/bluetooth/btsak/btsak_scan.c: Fix reversed address 2018-12-17 11:20:16 -06:00
Gregory Nutt
1bb723d60c Trivial update to README. 2018-12-12 17:57:37 -06:00
Gregory Nutt
1ea316b46c apps/testing: Move apps/examples/ostest to apps/testing/ostest. 2018-12-12 16:37:38 -06:00
GregoryN
3bf4b6d245 Merged altconsole into master 2018-12-08 18:53:54 -06:00
Lwazi Dube
c8a252d4ed apps/wireless/bluetooth/btsak: Remove unnecessary gatt get commands 2018-12-08 13:02:19 -06:00
David Sidrane
8eb249eea5 apps/nshlib/nsh_romfsetc.c: Add support for CROMFS start-up script 2018-12-06 15:41:18 -06:00
Lwazi Dube
09a108b507 apps/wireless/bluetooth/btsak: Add connect and disconnect commands to btsak 2018-12-02 11:01:28 -06:00
Alan Carvalho de Assis
368f14852e apps/nshlib: Change the way SLCD is supported. Works better 2018-11-30 18:05:18 -06:00
Lwazi Dube
2b8685b63f wireless/bluetooth/btsak/btsak_main.c: Fix address parsing 2018-11-30 06:28:36 -06:00
Gregory Nutt
c0f64622e4 nshlib/nsh_slcd.c: Use file descriptor zero for the NSH console. 2018-11-30 06:18:44 -06:00
Alan Carvalho de Assis
c21d640eaf apps/nshlib: Add support to use SLCD as NSH Console 2018-11-29 18:42:02 -06:00
Daniel Pereira Carvalho
521052ae1f apps/system/critmon/Makefile: Stack size and priority reversed. 2018-11-29 11:06:31 -06:00
Anthony Merlino
1c7d0303e8 Merged in antmerlino/apps/system-fix (pull request #161)
system: Fixes build error; There is no result variable, use errcode instead.

Approved-by: GregoryN <gnutt@nuttx.org>
2018-11-28 17:25:13 +00:00
Lwazi Dube
6af45bdee0 wireless/bluetooth/btsak: Fix some errors in btsak 2018-11-27 08:02:43 -06:00
Gregory Nutt
3adf8af266 netutils/webserver/httpd.c: Eliminate some warnings found in build testing. 2018-11-25 18:43:09 -06:00
Alan Carvalho de Assis
7ddbe8c235 Various initialization functions in configs/: Change /dev/slcd to /dev/slcd0 for consistency 2018-11-25 14:01:37 -06:00
Lwazi
d927f50e79 apps/wireless/bluetooth/btsak: 'bt bnep0 info' outputs a reversed addr. It should print BDAddr: aa:bb:cc:dd:ee:ff instead of BDAddr: ff:ee:dd:cc:bb:aa 2018-11-25 09:54:09 -06:00
Gregory Nutt
2b53c50552 system/critmon/critmon.c: Another improvement to output format. 2018-11-25 09:50:21 -06:00
Gregory Nutt
411a047f9c apps/system/critmon: Make output more compact and usable. 2018-11-25 07:42:47 -06:00
Gregory Nutt
92d8243153 apps/system/critmon: Fix some bugs found in initial testing. Stack size must be configurable to avoid issues with the simulator. 2018-11-24 17:56:23 -06:00
Gregory Nutt
943abb19d2 apps/system/critmon: Add a daemon on monitor critical sections. 2018-11-24 13:35:53 -06:00
Gregory Nutt
e88a529010 From patch attached to nuttx/ Bitbucket Issue #136 from Vlado Vidovic:
The patch provided in issue 135, which adds support for HTTP Chunked Encoding, covers all paths in the webserver app except CGI callbacks. As a result, if a page being served happens to use CGI, it could generate stream content that does not comply with HTTP Chunked Encoding.

The patch attached amends the webserver app's CGI callbacks to use the HTTP Chunked Encoding sender function instead of using send() directly.
2018-11-23 17:29:07 -06:00
Gregory Nutt
d3c36663d0 netutils/webserver: Contributed by "Anonymous" via attachment to Bitbucket issue #135: "webserver broken when scripting support enabled - support for chunked encoding fixes it"
The webserver/httpd app is currently broken when script support is enabled (CONFIG_NETUTILS_HTTPD_SCRIPT_DISABLE). The root cause has been tracked down to the "Content-length" not being available ahead of time in this case (length of -1 passed to send_headers() ). On the other hand, the server closing the socket does not result in FIN being sent to the browser either (FIN not supported by NuttX yet).

Simple solution: Add support for HTTP Chunked Encoding to webserver/httpd (attached patch).

The attached patch is simple. It adds a configuration option to enable chunked encoding. When enabled, the implementation will auto-detect the cases where content length is not available ahead of time, and will automatically engage chunked encoding transfers.

Without this patch, the browser/client hangs forever, as it is expecting more data. With this patch, the browser displays the content.
2018-11-23 10:13:34 -06:00
Gregory Nutt
b52aed8878 ChangeLog.txt: Change release date to Nov 11. 2018-11-14 14:44:36 -06:00
Gregory Nutt
5de90d8fd8 ChangeLog: Update ChangeLog in preparation for 7.27 release. 2018-11-13 17:22:01 -06:00