lwip | A Lightweight TCP/IP stack | Networking library
kandi X-RAY | lwip Summary
kandi X-RAY | lwip Summary
lwip is a small independent implementation of the tcp/ip protocol suite that has been developed by adam dunkels at the computer and networks architectures (cna) lab at the swedish institute of computer science (sics). the focus of the lwip tcp/ip implementation is to reduce the ram usage while still having a full scale tcp. this making lwip suitable for use in embedded systems with tens of kilobytes of free ram and room for around 40 kilobytes of code rom. lwip is freely available under a bsd license. lwip has grown into an excellent tcp/ip stack for embedded devices, and developers using the stack often submit bug fixes, improvements, and additions to the stack to further increase its usefulness. development of lwip is hosted on savannah, a central point for software development, maintenance and distribution. everyone can help improve lwip by use of savannah's interface, cvs and the mailing list. a core team of developers will commit changes to the cvs source tree. the lwip tcp/ip stack
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of lwip
lwip Key Features
lwip Examples and Code Snippets
Community Discussions
Trending Discussions on lwip
QUESTION
I'm trying to get an SSI page running on my STM32 using lwIP. When I open a .html page all is displayed fine. But .shtml pages will not be rendered and only the source code becomes visible.
This post leads me to look for the mimetype using wget:
...ANSWER
Answered 2022-Jan-02 at 14:19Ok - I found it. The mimetype was set by the Perl script makefsdata. There was no rule for shtml file endings. So I added the rule to the header:
QUESTION
I try implementation of MQTT client on ATSAME53N20A. I achieved wih succes tcp-ip server-client application with lwip bsd socket api before. But this time some things going wrong despite of I follow the lwip MQTT documentation. I use mosquitto mqtt broker on same network with pc.
Firstly I did initialization like tcpip, ethernet_link etc. Later, I have a "mqtt_new" task.
...ANSWER
Answered 2021-Dec-27 at 12:00I solved this problem. When I changed the following definition that was included in mqtt_connect task, the problem was solved.
QUESTION
Framework:
ESP-IDF v4.3.1 - Eclipse Plugin
Project with 1 active component (my plan is to add ble scanning, mqtt messaging and wifi access)
...ANSWER
Answered 2021-Nov-18 at 11:27You have a naming conflict. You're trying to create a custom component named mqtt
which requires the system component named mqtt
and you expect the build system to figure it out. That's just asking for trouble :)
Name your component myproject-mqtt
or something. Watch out for similar problems with your components wifi
and ble
.
QUESTION
I'm debugging an HTTP server on STM32H725VG using LWIP and HAL drivers, all initially generated by STM32CubeMX. The problem is that in some cases data sent via HAL_ETH_Transmit
have some octets replaced by 0x00, and this corrupted content successfully gets to the client.
I've checked that the data in the buffers passed as arguments into HAL_ETH_Transmit
are intact both before and after the call to this function. So, apparently, the corruption occurs on transfer from the RAM to the MAC, because the checksum is calculated on the corrupted data. So I supposed that the problem may be due to interaction between cache and DMA. I've tried disabling D-cache, and then the corruption doesn't occur.
Then I thought that I should just use __DSB()
instruction that should write the cached data into the RAM. After enabling D-cache back, I added __DSB()
right before the call to HAL_ETH_Transmit
(which is inside low_level_output
function generated by STM32CubeMX), and... nothing happened: the data are still corrupted.
Then, after some experimentation I found that SCB_CleanDCache()
call after (or instead of) __DSB()
fixes the problem.
This makes me wonder. The description of DSB
instruction is as follows:
Data Synchronization Barrier acts as a special kind of memory barrier. No instruction in program order after this instruction executes until this instruction completes. This instruction completes when:
- All explicit memory accesses before this instruction complete.
- All Cache, Branch predictor and TLB maintenance operations before this instruction complete.
And the description of SCB_DisableDCache
has the following note about SCB_CleanDCache
:
When disabling the data cache, you must clean (
SCB_CleanDCache
) the entire cache to ensure that any dirty data is flushed to external memory.
Why doesn't the DSB
flush the cache if it's supposed to be complete when "all explicit memory accesses" complete, which seems to include flushing of caches?
ANSWER
Answered 2021-Oct-22 at 12:20dsb ish
works as a memory barrier for inter-thread memory order; it just orders the current CPU's access to coherent cache. You wouldn't expect dsb ish
to flush any cache because that's not required for visibility within the same inner-shareable cache-coherency domain. Like it says in the manual you quoted, it finishes memory operations.
Cacheable memory operations on write-back cache only update cache; waiting for them to finish doesn't imply flushing the cache.
Your ARM system I think has multiple coherency domains for microcontroller vs. DSP? Does your __DSB
intrinsic compile to a dsb sy
instruction? Assuming that doesn't flush cache, what they mean is presumably that it orders memory / cache operations including explicit flushes, which are still necessary.
QUESTION
I have a program that basically looks like this:
...ANSWER
Answered 2021-Sep-14 at 15:24Using wordsexp.h
solved the issue by parsing the string correctly for getopt()
.
Essentially:
QUESTION
On my ESP32 I am having trouble creating a working PPP interface to my ISP. I am using an ESP-32 Ethernet kit and have it hooked up to a Simcom EVB Kit with a Sim7600G chip. With this hardware I am using ESP-IDF in combination with LWIP to get the PPP connection going. At first I have to send all the corresponding AT commands to make sure it is actually ready for a PPP connection. These AT Commands are the following:
...ANSWER
Answered 2021-Sep-21 at 07:47I have not found the solution to this problem with the mentioned frameworks. Instead I reverted to another dependency from the ESP-IDF: esp-modem. I managed to get a working solution by following the pppos-client and modem-console examples within my current software.
QUESTION
I feel like this question has been asked a bunch of times, but none of the answers I have found seem to be working for me. I'm extremely new to CMake and C/C++ as I come from the world of Java, and am struggling to understand cmake and how it works.
Anyways, basically I have the folder structure below. This is an esp-idf project, so I don't know if that has anything to do with what I'm running into.
...ANSWER
Answered 2021-Jul-09 at 13:46The ESP-IDF build system is built on top of CMake. This means you can use all the standard features of CMake in your files. However, the the ESP-IDF system predefines many functions, and makes many assumptions about the layout of your project, supposedly to make things "easier". Instead of reading CMake documentation, start by reading and understanding the ESP-IDF build system documentation:
https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/build-system.html
It looks to me like there is a particular layout expected for subcomponents, including the format of the CMakeLists.txt
file. Specifically, move Metriful
under a new directory called components
, or add Metriful
to EXTRA_COMPONENT_DIRS
near the top of your root CMakeLists.txt
If Metriful is not written as an esp-idf component, this may not work. However, the document also describes how to link to "pure CMake" components, which will look something like this (at the end of your root CMakeLists.txt
).
QUESTION
I am integrating a library (lwip) and I want to reroute the logging mechanism from printf
to something I wrote myself (which logs directly to my uart).
In some header file the following code exists
...ANSWER
Answered 2021-May-14 at 14:15extern "C" void logLineToUart(const char * log, ...);
You need to tell it to make the name C-linker compatible the first time it is seen.
updateThe extern "C"
is only when compiling as C++. It is not legal syntax in C. You can use extern
by itself (it is implied if you leave it off).
That's not very friendly... C++ accommodates sharing header files with C by accepting syntax that would not apply to C++, just to make it easy to use the same header file contents. In particular, using (void)
for empty parameter lists (which is "an abomination") and allowing a comma in variadic function parameter lists ( (int x ...)
is how C++ originally defined it; when the same feature got incorporated into ANSI C they used (int x, ...)
with a superfluous comma that is not needed by the grammar.) C++ compilers accept both of these to make it easier to consume C headers...
But, you have to add extern "C"
around everything. This introduces conditional compilation anyway, even though C++ accepts the C syntax. Note that for a single declaration, extern int foo (int);
the extern
is allowed and implied if you leave it out. If the C compiler allowed the linkage specification even though only "C" is available, it would make life easier. Note that in most cases, the C and C++ implementation are the same compiler suite, and often one language supports some features of the other as extensions. It would be cool if gcc
etc. supported extern "C++"
in C mode, since that code base certainly does know how the name encodes the parameters.
QUESTION
I'm trying to send an image from a node.js server to ESP32 chip using WIFI and ESP-IDF. I believe this transfer happens over a TCP/IP connection. I'm able to send a regular text data using a http get request or the http_perform_as_stream_reader function shown below. But when it comes to transferring an image from the node.js server, I'm unable to do so. I seem to be receiving garbage on the client side. The ultimate goal is to save the image into a spiffs file on ESP32. Here's my code:
Server side:
...ANSWER
Answered 2021-May-11 at 05:08Application should not assume that esp_http_client_read reads same number of bytes specified in the length argument. Instead, application should check the return value of this API which indicates number of bytes read by corresponding call. If the return value is zero, it indicates that complete data is read.
To work correctly, application should call esp_http_client_read in a while loop with a check for return value of esp_http_client_read.
You can also use esp_http_client_read_response, which is a helper API for esp_http_client_read to internally handle the while loop and read complete data in one go.
Please refer http_native_request example which uses esp_http_client_read_response()
API.
QUESTION
I'm currently building an embedded device that uses the open source light-weight IP package (lwIP) to host a static webserver to clients using html files and http requests. lwIP is somewhat different than a normal webserver because it is bare bones and configured to serve these files through a NOSYS declaration.
In an extremely simple scenario, I'm trying to host this file (index.html
):
ANSWER
Answered 2021-Apr-29 at 15:24What you have pasted are the request headers that your browser sends to the server. The problem is with the response headers that the embedded server sends back. In particular the Content-Type header isn't correct. It should look something like:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install lwip
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page