lwIP

LwIP之ICMP协议

随声附和 提交于 2019-12-12 10:03:13
ICMP(网际控制报文协议),ICMP数据包是封装在IP数据包中的,由于IP不是为可靠传输服务设计的,ICMP的目的主要是用于在TCP/IP网络中发送和控制消息。主要应用有Ping、Traceroute和MTU测试。 ICMP报文的种类有三大种类,即ICMP差错报文、控制报文、请求/应答报文,各大类型报文又分为多种类型报文。 差错报文: (1) 特点: 1.ICMP差错报文都是有路由器发送到源主机的。 2.ICMP报文只提供IP数据报的差错报告,并不采取处理措施,差错处理由应用程序处理。 3.传输过程中可能丢失、损坏,甚至被抛弃。 4.ICMP差错报文是伴随着抛弃出错的IP数据报而产生的。 5.为了防止广播风暴,以下情况不会产生ICMP差错报文。 1)ICMP差错报文 2)目的地址是广播或多播 3)链路层广播的数据报 4)不是IP分片的第一片 5)源地址是零地址、回送地址、广播地址或多播地址 (2)信息不可达报文: 1.目的机硬件故障或关机 2.目标地址不存在 3.网关不知道去往目的机的路径 (3)超时报文: 1.为了避免无限制的在网中循环,IP协议采用 1)在数据报头设置TTL域 2)对分片数据报采用定时器技术 2.当报文超时出现时,路由器或目的机立即丢弃该数据报,并向信源机发送超时报文 控制报文: (1)拥塞控制与源站控制报文: 1

Why LCP negotiation over PPPoS session doesn't start via LWIP, between STM32F7 and Telit GL865 GSM Modem?

笑着哭i 提交于 2019-12-11 18:34:31
问题 I am using Telit GL865 GSM Modem with STM32F7 nucleo development board. I make them communicate via USART1. Firstly, I configure the modem with AT commands as below; after that, modem starts to send LCP packages and since I cannot handle them, NO CARRIER message occurs at the end. What I am not sure is that am I applying the right AT commands since it is different than the link I am sharing: https://github.com/espressif/esp-idf/blob/master/examples/protocols/pppos_client/main/pppos_client

NTP Request Packet

廉价感情. 提交于 2019-12-10 14:14:46
问题 I'm trying to figure out what I need to send (client) in the NTP request package to retrieve a NTP package from the server. I'm working with the LWIP on Cortex M3, Stellaris LM3S6965 I understand that I will recieve a UDP header and then the NTP protocol with the different timestamps the remove the latency. I probable need to make an UDP header but what do I need to add as data? wireshark image: I hope you guys can help me. 回答1: The client request packet is the same as the server reply packet

STM32移植lwip之建立tcp客户端

橙三吉。 提交于 2019-12-09 22:38:12
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。 本文链接:https://blog.csdn.net/q361750389/article/details/53044119 本篇目标:在之前能ping通pc机的工程基础上搭建tcp客户端,并可以主动发数据给pc机,同时也能与pc机收发数据,并在网络调试工具上显示 材料准备: 基础工程:修改后能ping通pc机的工程(STM32官方移植lwip修改代码) 调试工具:用来调试tcp连接下的数据接收(网络调试助手) 搭建工程:最终搭建好tcp客户端数据接收的工程(tcp客户端建立工程) 搭建TCP客户端 搭建TCP客户端的过程与上一章TCP服务器也相似,所以尽量把重点的地方加粗显示来区别 在搭建TCP客户端之前可以先理一下概念,客户端与服务器的区别: 客户端:主动建立tcp去连接目标IP 服务器:拥有静态IP,能让其他设备被动连接 因此用STM32搭建的TCP客户端主动去连接PC机创建的虚拟服务器,并完成收发数据的动作,接下来创建新的c文件,为tcp_client.c,编写三个函数: tcp服务器初始化函数 Tcp_Client_Init() : void Tcp_Client_Init(void) { struct tcp_pcb *tcp_client_pcb; struct

lwip stack netconn api keep connection “keep-alive”

霸气de小男生 提交于 2019-12-08 12:36:59
问题 I'm currently working with the lwip stack to implement a modbus server, but the "keep-alive" function doesn't work. Can someone look to my problem? code: static void prvweb_ParseHTMLRequest( struct netconn *pxNetCon ) { struct netbuf *pxRxBuffer; portCHAR *pcRxString; unsigned portSHORT usLength; static unsigned portLONG ulPageHits = 0; while(netconn_recv( pxNetCon, &pxRxBuffer) != ERR_OK) { vTaskDelay( webSHORT_DELAY ); } if( pxRxBuffer != NULL ) { /* Where is the data? */ netbuf_data(

STM32 LWIP PPPos implementation

为君一笑 提交于 2019-12-07 17:33:52
问题 On my STM32F7 I have to connect a 3G modem using serial port. I can communicate with the modem using AT commands. I would like to use PPPos (PPP over serial) library from LWIP to enter in PPP mode. So I take a long look at the official documentation http://lwip.wikia.com/wiki/PPP and https://github.com/tabascoeye/lwip/blob/master/doc/ppp.txt I understand the guideline but I'm really surprise there is no implementation example with serial port. Indeed, I think there is a lot of modems that

几种开源的TCP/IP协议栈对比

戏子无情 提交于 2019-12-06 19:36:40
几种开放源码的TCPIP协议栈概述 1、BSD TCP/IP协议栈 BSD栈历史上是其他商业栈的起点,大多数专业TCP/IP栈(VxWorks内嵌的TCP/IP 栈)是BSD栈派生的。这是因为BSD栈在BSD许可协议下提供了这些专业栈的雏形,BSD许用证允许BSD栈以修改或未修改的形式结合这些专业栈的代码而无须向创建者付版税。同时,BSD也是许多TCP/IP协议中的创新(如广域网中饿拥塞控制和避免)的开始点。 2、uC/IP uC/IP是由Guy Lancaster编写的一套基于uC/OS且开放源码的TCP/IP协议栈,亦可移植到其它操作系统,是一套完全免费的、可供研究的TCP/IP协议栈,uC/IP大部分源码是从公开源码BSD发布站点和KA9Q(一个基于DOS单任务环境运行的TCP/IP协议栈)移植过来。uC/IP具有如下一些特点:带身份验证和报头压缩支持的PPP协议,优化的单一请求/回复交互过程,支持IP/TCP/UDP协议,可实现的网络功能较为强大,并可裁减。 UCIP协议栈被设计为一个带最小化用户接口及可应用串行链路网络模块。根据采用CPU、编译器和系统所需实现协议的多少,协议栈需要的代码容量空间在 30-60KB之间。http://ucip.sourceforge.net 3、LwIP LwIP是瑞士计算机科学院(Swedish Institute of Computer

STM32 LWIP PPPos implementation

一个人想着一个人 提交于 2019-12-05 21:02:11
On my STM32F7 I have to connect a 3G modem using serial port. I can communicate with the modem using AT commands. I would like to use PPPos (PPP over serial) library from LWIP to enter in PPP mode. So I take a long look at the official documentation http://lwip.wikia.com/wiki/PPP and https://github.com/tabascoeye/lwip/blob/master/doc/ppp.txt I understand the guideline but I'm really surprise there is no implementation example with serial port. Indeed, I think there is a lot of modems that have a serial interface, so I thought i can easily find an example of use. Anyone have already done that

又一个操作系统开源

ⅰ亾dé卋堺 提交于 2019-12-04 23:06:53
9月18日,腾讯宣布开源自主研发的轻量级物联网实时操作系统 Ten centOS tiny。TencentOS tiny是腾讯面向物联网领域开发的实时操作系统,具有低功耗,低资源占用,模块化,安全可靠等特点,可有效提升物联网终端产品开发效率。TencentOS tiny 提供精简的 RTOS 内核,内核组件可裁剪可配置,可快速移植到多种主流 MCU (如STM32全系列)及模组芯片上。而且,基于RTOS内核提供了丰富的物联网组件,内部集成主流物联网协议栈(如 CoAP/MQTT/TLS/DTLS/LoRaWAN/NB-IoT 等),可助力物联网终端设备及业务快速接入腾讯云物联网平台。 TencentOS tiny 主体架构图,从下到上主要包括: CPU 库 :TencentOS tiny 支持的 CPU IP 核架构,当前主要支持 ARM Cortex M0/3/4/7。 驱动管理层 :包括板级支持包(BSP,主要由 MCU 芯片厂家开发与维护)、硬件抽象(HAL,主要由 TencentOS tiny提供,方便不同芯片的适配与移植)、设备驱动(Drivers,例如 Wi-Fi、GPRS、LoRa 等模块的驱动程序)。 内核 :TencentOS tiny 实时内核包括任务管理、实时调度、时间管理、中断管理、内存管理、异常处理、软件定时器、链表、消息队列、信号量、互斥锁

Zeroconf Name resolution

╄→гoц情女王★ 提交于 2019-12-04 04:48:20
I am developing a control device with an embedded webserver. The webserver provides a control interface to any web browser that requests it (from Windows browsers, Mac browsers, iPhone android etc). The problem I am having is with a general way of generically knowing how to access the device. i.e. what address to type in the web browser. Fixed IPs are too techie for my users and could go wrong as my device could be plugged into many different Local networks. Using uPnp service discovery requires software to run on the client for some platforms and isn't as natural as just typing a web address.