Commit Graph

306 Commits

Author SHA1 Message Date
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
7488a65e17 Updates from coding style review of PR 160 2018-11-09 10:21:42 -06:00
Petteri Aimonen
66d4ed9912 Merged in paimonen/apps/pullreq_nxwidgets (pull request #160)
NxWidgets improvements

* NxWidgets: fix garbage returned when CCycleButton::getValue() is called after removeAllOptions().

    It's a bit questionable whether returning 0 here is reasonable or
    if it would be better to assert(). But either is better than reading
    into random memory and returning a garbage value.

* NXWidgets CScrollingPanel: Don't draw outside the widget area.

    The port->move() function doesn't support clipping the
    copied area to the client area, so we have to manually
    calculate the part that can be moved without going outside
    the widget.

* CNxString: Add string + operator and ::format() function

* CNumericEdit: Add option to include unit name after the value

* NxWidgets: CNxWidget: Make useWidgetStyle() public

    Makes it easier to update styles when multiple controls are nested.

* NxWidgets: Add CLabelGrid control for displaying text in grid format.

Approved-by: GregoryN <gnutt@nuttx.org>
2018-11-09 16:00:50 +00:00
ligd
f954b15cac pps/system/ping and pings and apps/netutils/ping: Extract icmp ping and icmpv6 ping6 logic from system/ to C-callable library in netutils/. 2018-11-08 09:32:05 -06:00
Xiang Xiao
cddfda99f0 apps/netutils/pppd: Refine and fix pppd code.
Reviewers note:  Reviewing the changes I also see that these file did not follow the NuttX codings standard.  I ran all files through nuttx/tools/indent.sh, manually reviewed all files for coding style issues.  I also changed occurrences of non-standard types u8_t, u16_t, and u32_t to the standard uint8_t, uint16_t, and uint32_t.
2018-11-07 12:43:42 -06:00
Xiang Xiao
c1f0653c85 apps/netutils/chat and apps/examples/chat: 'constify' chat variables and parameters 2018-11-07 11:55:09 -06:00
Gregory Nutt
7b56c9c336 apps/include/netutils/ipmsfilter.h: Eliminate error generated by bad pre-processor logic. 2018-11-02 08:32:18 -06:00
Gregory Nutt
a26a7f9767 apps/netutils/netlib and apps/examples/igmp: Adapt to use the corrected, semi-standard version of struct ip_msfilter. 2018-10-29 06:51:56 -06:00
Gregory Nutt
c558fce8ad This commit moves the NxWidgets include directories into the correct position in the apps/ source tree.
Squashed commit of the following:

    Clean-up some include path problems introduced with the previous set of changes.

    app/include/graphics, apps/NxWidgets/UnitTests:  Update include paths for file in new location.

    apps/NxWidgets/nxwidgets and nxwm:  Update include paths for file in new location.

    apps/graphics/NxWidgets:  Move nxwidgets and nxwm include/ directories to apps/include/graphics
2018-09-16 17:23:45 -06:00
ZhongAn
392943a0a0 apps/system/nxrecorder: Add nxrecorder application 2018-08-27 08:20:11 -06:00
ZhongAn
09a3bc44b4 system/nxplayer/nxplayer.c: Add playraw command 2018-08-27 08:04:48 -06:00
Xiang Xiao
8116d10da3 apps/fsutils/mksmartfs: Add a check to see if the SmartFS is already formatted. apps/nshlib: Add a force flag (-f) to mksmartfs. SmartFS will be formatted only if (1) the FLASH does not already hold a SmartFS, or (2) the force flag is set 2018-08-23 07:14:30 -06:00
Xiang Xiao
ddd86d31ca apps/system/zmodem:
- fix error "sz_main.o: No such file or directory"
  - support -p <path> for rz to change the folder for the recevied file
  - switch debug output from printf to syslog
  - send the next packet for ZME_ACK in ZMS_SENDING to avoid rz on the host side stuck
  - make send work reliable even without hardware flow control
2018-08-23 06:33:39 -06:00
Gregory Nutt
a57610c2c4 Remove trailing spaces at the end of lines. 2018-08-13 07:47:26 -06:00
Gregory Nutt
3e81973cd5 include/netutils/netlib.h: Eliminate a warning about AF_UNSPEC and AF_INET not defined. 2018-08-03 10:50:24 -06:00
Mateusz Szafoni
0abe34183b Merged in raiden00/apps (pull request #142)
testing/unity: add configuration options for exclude setjmp and output color

Approved-by: GregoryN <gnutt@nuttx.org>
2018-06-23 14:58:25 +00:00
Mateusz Szafoni
133f239763 Merged in raiden00/apps (pull request #141)
testing: add Unity - unit testing library from ThrowTheSwitch.org

* examples/powerled: add arch initialization; examples/smps: fixes in some printf and in Kconfig

* testing: add Unity - unit testing library from ThrowTheSwitch.org

Approved-by: GregoryN <gnutt@nuttx.org>
2018-06-15 12:44:22 +00:00
Gregory Nutt
0094b411da apps/netutils/netlib: Various fixes needed to get a clean netlib build with Bluetooth only. 2018-04-03 10:01:55 -06:00
Gregory Nutt
28ce015fbb Remove canutils/libuavcan and examples/uavcan. libuavcan has not built for a year or so. The basic problem is that as NuttX advances, the old frozen versino of libuavcan has become absolute because it violates the portable POSIX OS interface. No one is maintaining the port so there is no alternative but to remove it. 2018-03-23 07:29:06 -06:00
Gregory Nutt
b0a0a39f7a Squashed commit of the following:
apps/examples/ft80x:  Fix some size calculations.  Add option to disable primitive tests... just too boring to have to watch over and over again.
    apps/graphics/ft80x:  Fix a typo in backlight fade logic; Fix error in formmatted display light debug dump output.
    apps/graphics/ft80x:  Fix some warnings when debug features are enabled.
2018-03-09 12:31:29 -06:00
Sebastien Lorquet
3211ab9069 apps/netutils/tftpc: This commit modifies the TFTP client functions to use a data read/write callback instead of a file.This allows TFTP to write to arbitrary destination (in my case, a MTD device - for firmware update). Two new functions are introduced for this, named tftpget_cb and tftpput_cb. They are just made of most of the existing code. The previously existing tftpget/tftpput functions are now wrappers on the new ones, with callbacks that read/write from files, so my modifications are backwards compatible with existing applications, eg the associated nsh commands dont need to be changed. 2018-03-09 07:08:06 -06:00
Gregory Nutt
305e470a90 apps/graphics/ft80x: Add controls for enabling/disabling the audio amplifier; Add general interfaces for controlling FT80x GPIOs. 2018-02-27 08:48:15 -06:00
Gregory Nutt
9f6338566f apps/graphics/ft80x: Add basic support for GPIO and configuration for eventual support of FT80x GPIO audio shutdown controls 2018-02-26 19:08:24 -06:00
Gregory Nutt
685d379542 apps/graphics/ft80x: Add interface to play midi sounds; apps/examples/ft80x: Add an example using stencils. 2018-02-26 15:26:11 -06:00
Gregory Nutt
9d2b92d75d apps/graphics/ft80x: Audio buffer size/offset is now configurable. 2018-02-26 09:58:52 -06:00
Gregory Nutt
e734ab1b36 apps/graphics/ft80x: Add 'prototype' quality logic for playing audio files. 2018-02-25 17:14:07 -06:00
Gregory Nutt
4eeadd7b5d apps/graphics/ft80x: Ooops 5 touch points, not 4. apps/examples/ft80x: Re-order to some tests. 2018-02-25 11:45:56 -06:00
Gregory Nutt
e15526f683 apps/graphics/ft80x: Add more touchscreen interfaces. apps/examples/ft80x: Add an interactive example using buttons, keys, and touchscreen input. 2018-02-25 11:20:39 -06:00
Gregory Nutt
9095bd4f1b apps/graphics/ft80x: Add interfaces to control the backlight. apps/examples/ft80x: Fade the display on and off between each example. 2018-02-23 10:49:38 -06:00
Gregory Nutt
4f6984d714 apps/graphics/ft80x: Add capabilitilies to send commands to the co-processor outside of the context of a display list. apps/examples/ft80x: Add another copressor example.. spinner animation. 2018-02-22 10:01:50 -06:00
Gregory Nutt
2436e3f85a apps/graphics/ft80x: Add routine to wait for logo animation to complete. apps/examples/ft80x: Add more graphic demonstrations. 2018-02-21 19:17:28 -06:00
Gregory Nutt
157da4f1ab apps/graphics/ft80x: Add support for reading/writing multiple registers. Add interface to obtain the touchscreen transform matrix. apps/examples/ft80x: Add more co-processor demos. 2018-02-21 11:50:06 -06:00
Gregory Nutt
ecfdf073fc Squashed commit of the following:
apps/graphics/ft80x:  Replace polling logic with gentler signal logic when waitinf for the CMD FIFO to become empty.
    apps/examples/ft80x:  Add first co-processor example.
    apps/graphics:  Extend library to manage display lists either in display memory (RAM DL) or provided directly to th co-processor FIFO (RAM CMD).
    apps/examples/ft80x:  Some minor clean-up.  Trivial changes for coprocessor support.
2018-02-20 15:23:05 -06:00
Gregory Nutt
7c9f8ef9eb Squashed commit of the following:
apps/graphics/ft80x:  Add support for accessing graphics ram.  apps/examples/ft80x:  Add more primitive graphics demos.
    apps/examples/ft80x:  Add a couple more demos of primitives.  Use new ft80x_dl_create() to simplify.
    apps/graphics/ft80x:  Add ft80x_dl_create() which simplies writing of very simple display lists.
2018-02-19 13:14:16 -06:00
Gregory Nutt
5dd5908d86 apps/graphics/ft80x: Add register access helpers. 2018-02-18 13:36:08 -06:00
Gregory Nutt
62d6843cb3 apps/graphics/ft80x: Add the beginning of FT80x support library. So far consists only of some display list helpers. 2018-02-18 10:12:53 -06:00
Alan Carvalho de Assis
f2028411bf Squashed commit of the following:
apps/examples/lvgldemo:  Fix up some include paths
    apps/examples/lvgldemo:  The last final now conforms to the NuttX coding style.
    apps/graphics/littlevgl:  Two more files are closer to the NuttX coding style.
    apps/graphics/littlevgl:  Two more files are closer to the NuttX coding style.
    apps/examples/lvgldemo:  Three more files are closer to the NuttX coding style.
    apps/examples/lvgldemo:  Two more files are closer to the NuttX coding style.
    apps/examples/lvgldemo:  Two more files are closer to the NuttX coding style.
    Add include/graphics/.gitignore
    apps/include/graphics:  Remove lvgl.h.  graphics/littlevgl/Makefile now copies the file into position.
    apps/graphics/littlevgl:  Add .gitignore file
    apps/graphics/littlevgl:  Most of these files follow the coding style now.
    apps/graphics/littlevgl:  This gets a couple of files closer to the NuttX coding style.
    apps/examples/lvgldemo:  Add lvgldemo example
    apps/graphics/littlevgl:  Add littlevgl library
2018-01-16 15:35:55 -06:00
Masayuki Ishikawa
021839224f nxplayer: Add support for http streaming in nxplayer
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2017-12-19 15:08:29 +09:00
Masayuki Ishikawa
77ac05c383 nxplayer: Fix warnings by nxstyle
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2017-12-19 15:08:26 +09:00
Gregory Nutt
cab8363d44 apps/graphics/pdcurses: Fix some miscellaneous, harmless typos and standard violations. 2017-11-27 17:31:22 -06:00
Gregory Nutt
ad54b77f33 apps/graphics/pdcurs34: Add NuttX framebuffer color managment and beginning of some rendering logic. 2017-11-18 19:30:19 -06:00
Gregory Nutt
69bea27b20 Remove some dangling whitespace at the end of lines. 2017-11-17 13:23:02 -06:00
Gregory Nutt
7ba2110c83 apps/graphics/pdcurs34: This commit brings the basic public domain pdcurses library into NuttX. This library is complete but not yet usuable because it still requires the NuttX interfacing code needed hook pdcurses into the NuttX graphics drivers. Also test cases are needed to verify the pdcurses integration. 2017-11-17 13:12:59 -06:00
Anthony Merlino
f489bcd6f9 Merged in antmerlino/apps/ftp-ipv6 (pull request #122)
FTP: Adds support for IPv6 and fixes various transfer issues

* netutils/ftpd: Fix support for IPv6 FTP server

* netutils/ftpc:Adds support for IPv6 sockets

* ftpc: Must convert port received by EPSV reply to network order

* ftpc: Data socket address for passive connection should be same as server address

* ftpc: Must skip human readable string in EPSV response before scanning for port

* ftpc: Don't send PASS command if USER command was sufficient. ie no password required

* ftpc: Generically handle permanent negative completion in shard ftpc_cmd logic

* ftpc: Minor addresssing fix

* ftpc: Tweak logic for overriding network debugging output

* FTP: Adds option for setting stack size of various threads in FTPD and FTPC

* netutils/ftpd: Fixes build error setting IPv4 address. sin_addr => sin_addr.s_addr

* netutils/ftpd: Protects against partial write returns by looping in that case

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2017-11-06 23:41:30 +00:00
Gregory Nutt
a7157d0e3c include/netutils/netlib.h: In order to avoid pre-processing warnings, NETLIB_SOCK_FAMILY must always be assigned a value, even if there is no real meaning value for it. 2017-11-03 09:57:33 -06:00
Gregory Nutt
6b9d23c6aa Correct and standardize some naming used in the previous commits. 2017-10-30 14:16:37 -06:00
Gregory Nutt
dafc88ed25 include/netutils/netlib.h: Broaden socket definitions of previous commit. 2017-10-30 14:11:42 -06:00
Gregory Nutt
51b369589b include/netutils/netlib.h: Add definitions needed when only local Unix domain sockets are supported. 2017-10-30 11:34:59 -06:00
Alan Carvalho de Assis
8aa72a0ad4 apps/examples/obd2: Add OBD2 example application 2017-10-28 13:38:47 -06:00
Alan Carvalho de Assis
a1f1f68b72 apps/canutils/libobd2: Add libobd2 for NuttX 2017-10-28 13:33:30 -06:00