Знаю, что на форуме есть гуру по LwIP, поэтому прошу помочь с проблемой, в которой ковыряюсь уже 3 недели.
Камень STM32F4 на плате Discovery, модем Huawei E1550, FreeRTOS 7.3.0, LwIP 1.4.1 (пробовал с обычным PPP и PPP_new результат одинаковый).
Таск соединения по PPP:
CODE
void vTCPIP(void *pvParameters) {
//MTS PPP connecion variables:
int connected=0;
uint8_t setup=0;
ppp_pcb *PPPconn;
vSemaphoreCreateBinary(SemPPPready);
xSemaphoreTake(SemPPPready,0);
vTaskDelay(1000/portTICK_RATE_MS);
while (1) {
if (!connected) {
while (xSemaphoreTake(SemUSBisup,0)!=pdPASS) {vTaskDelay(500/portTICK_RATE_MS);}
/* Initilaize the LwIP stack */
tcpip_init(tcpip_init_done, &setup);
while (!setup) {vTaskDelay(50/portTICK_RATE_MS);}
ppp_init();
PPPconn=ppp_new();
ppp_set_default(PPPconn);
ppp_set_auth(PPPconn,PPPAUTHTYPE_PAP,"mts","mts");
ppp_over_serial_open(PPPconn,PPP_SERIAL_PORT, linkStatusCB, &connected);
while (!connected) {vTaskDelay(50/portTICK_RATE_MS);}
xSemaphoreGive(SemPPPready);
} else {vTaskDelay(5000/portTICK_RATE_MS);}
}
ppp_close(PPPconn); //close PPP connection
}
Соединение netconn:
CODE
IP4_ADDR(&remoteIP,93,171,220,230);
while (xSemaphoreTake(SemPPPready,0)!=pdPASS) {
vTaskDelay(1000/portTICK_RATE_MS);
}
while (1)
{
if (uxTaskGetStackHighWaterMark(NULL)<50) {printf("\nStack LOW\n");}
//LwIP API connection
conn=netconn_new(NETCONN_TCP);
//netconn_bind(conn,IP_ADDR_ANY,80);
while (netconn_connect(conn,&remoteIP,80)!=ERR_OK) {
vTaskDelay(1000/portTICK_RATE_MS);
}
printf("\n GSH:: CONNECTED OK \n");
//stats_display();
while (netconn_write(conn,dataBUF,sizeof(dataBUF),NETCONN_NOCOPY)!=ERR_OK) {
vTaskDelay(5000/portTICK_RATE_MS);}
printf("\n GSH:: DATA WRITTEN OK \n");
err=netconn_recv(conn,&nBUF1);
if ((err==ERR_OK)&&(nBUF1!=NULL)) {
netbuf_copy(nBUF1,respBUF,450);
printf("\n GSH::BUF= %s \n",respBUF);
netbuf_delete(nBUF1);
}
netconn_delete(conn);
vTaskDelay(100/portTICK_RATE_MS);
}
lwipopts.h
CODE
#ifndef __LWIPOPTS_H__
#define __LWIPOPTS_H__
#include <stdio.h>
//### Gennady's defines for PPP stack
#define LWIP_PLATFORM_DIAG printf
#define SYS_LIGHTWEIGHT_PROT 1
#define LWIP_SOCKET 0 //add sockets.c to compilation
#define LWIP_NETCONN 1 //sequiential API is used
#define LWIP_ARP 0 //No ARP is needed
#define LWIP_DNS 1
#define LWIP_ICMP 1
#define LWIP_DHCP 0
#define LWIP_UDP 1
#define PPP_SUPPORT 1
#define PPPOE_SUPPORT 0
#define LWIP_PPP_API 1
#define PAP_SUPPORT 1
#define VJ_SUPPORT 0
#define PPP_MAXIDLEFLAG 1000
#define PPP_THREAD_STACKSIZE 1000
#define PPP_THREAD_PRIO 2
#define PPP_THREAD_NAME "ppp_t"
#define TCPIP_THREAD_NAME "tcpip_t"
#define TCPIP_THREAD_PRIO 1 //(configMAX_PRIORITIES - 2)
#define TCPIP_THREAD_STACKSIZE 2500
#define TCPIP_MBOX_SIZE 5
#define DEFAULT_TCP_RECVMBOX_SIZE 2000
#define DEFAULT_ACCEPTMBOX_SIZE 2000
#define DEFAULT_THREAD_STACKSIZE 500
#define DEFAULT_THREAD_PRIO 1
#define LWIP_SO_SNDTIMEO 0
#define LWIP_SO_RCVTIMEO 0
#define LWIP_SO_RCVBUF 0
/* ---------- Debugging options ---------- */
// /*
#define DNS_DEBUG LWIP_DBG_OFF
#define NETIF_DEBUG LWIP_DBG_OFF
#define PBUF_DEBUG LWIP_DBG_OFF
#define API_LIB_DEBUG LWIP_DBG_OFF
#define API_MSG_DEBUG LWIP_DBG_OFF
#define SOCKETS_DEBUG LWIP_DBG_OFF
#define IP_DEBUG LWIP_DBG_OFF
#define IP_REASS_DEBUG LWIP_DBG_OFF
#define MEM_DEBUG LWIP_DBG_OFF
#define MEMP_DEBUG LWIP_DBG_OFF
#define SYS_DEBUG LWIP_DBG_OFF
#define TIMERS_DEBUG LWIP_DBG_OFF
#define TCP_DEBUG LWIP_DBG_OFF
#define TCP_INPUT_DEBUG LWIP_DBG_OFF
#define TCP_FR_DEBUG LWIP_DBG_OFF
#define TCP_RTO_DEBUG LWIP_DBG_OFF
#define TCP_CWND_DEBUG LWIP_DBG_OFF
#define TCP_WND_DEBUG LWIP_DBG_OFF
#define TCP_OUTPUT_DEBUG LWIP_DBG_OFF
#define TCP_RST_DEBUG LWIP_DBG_OFF
#define TCP_QLEN_DEBUG LWIP_DBG_OFF
#define TCPIP_DEBUG LWIP_DBG_OFF
#define PPP_DEBUG_DATA 1
#define PPP_KOSTIL 0
#define PPP_DEBUG LWIP_DBG_ON
#define LWIP_DEBUG 1
// */
/* ---------- Statistics options ---------- */
#define LWIP_STATS 0
#define LWIP_STATS_DISPLAY 0
#define LWIP_PROVIDE_ERRNO 0
#define MEM_STATS 0
#define MEMP_STATS 0
#define SYS_STATS 0
/* ---------- Memory options ---------- */
#define MEM_ALIGNMENT 4
#define MEM_SIZE 8000
#define MEMP_SANITY_CHECK 1
#define MEMP_NUM_PBUF 100
#define MEMP_NUM_TCP_PCB 5
#define MEMP_NUM_TCP_PCB_LISTEN 1
#define MEMP_NUM_TCP_SEG 10
/* ---------- TCP options ---------- */
#define LWIP_TCP 1
#define TCP_TTL 255
#define TCP_WND (4*TCP_MSS)
#define TCP_MAXRTX 1
#define TCP_SYNMAXRTX 2
#define TCP_QUEUE_OOSEQ 1
#define TCP_MSS 536
#define TCP_CALCULATE_EFF_SEND_MSS 1
#define TCP_SND_BUF (2*TCP_MSS)
#define TCP_SND_QUEUELEN 8
#define TCP_SNDLOWAT (TCP_MSS/4)
#define TCP_SNDQUEUELOWAT 4
#define TCP_OVERSIZE TCP_MSS
/* ---------- IP options ---------- */
#define IP_REASSEMBLY 1
#define IP_FRAG 1
#define IP_REASS_MAXAGE 10
/* ---------- Pbuf options ---------- */
#define PBUF_LINK_HLEN 20
#define PBUF_POOL_SIZE 20
#define PBUF_POOL_BUFSIZE 512
/* ---------- Netif API ---------- */
#define LWIP_NETIF_API 1
/* ---------- PPP ---------- */
//#define PPP_MTU 1500 /* Default MTU (size of Info field) */
#define PPP_MAXMTU 1500 /* Largest MTU we allow */
//#define PPP_MINMTU 64
//#define PPP_MRU 1500 /* default MRU = max length of info field */
//#define PPP_MAXMRU 1500 /* Largest MRU we allow */
#define PPP_DEFMRU 296 /* Try for this */
//#define PPP_MINMRU 128 /* No MRUs below this */
//#define MAXNAMELEN 256 /* max length of hostname or name for auth */
//#define MAXSECRETLEN 256 /* max length of password or secret */
#endif /* __LWIPOPTS_H__ */
sys_arch.c функции записи и чтения PPPoS
CODE
// SIO functions for GPRS application
static volatile unsigned char stop = 0;
extern xQueueHandle queue_bytes_pppin;
extern xQueueHandle queue_bytes_pppout;
u32_t sio_read(sio_fd_t fd, u8_t *data, u32_t len)
{
unsigned long i = 0;
while (xQueueReceive(queue_bytes_pppin,&data[i],0)==pdPASS)
{
#if PPP_DEBUG_DATA
if (i==0) {printf("\nReading PPP packet from USB\n0000 ");}
printf("%.2x ",data[i]);
#endif
i++;
if (stop||(i==len))
{
stop = 0;
return i;
}
}
#if PPP_DEBUG_DATA
if (i>0) {printf("\n");}
#endif
return i;
}
u32_t sio_write(sio_fd_t fd, u8_t *data, u32_t len)
{
#if PPP_KOSTIL
static u8_t pppFr=0x7e;
#endif
unsigned long i;
#if PPP_DEBUG_DATA
printf("\nWriting PPP packet to USB\n0000 ");
#endif
for (i=0;i<len;i++) {
#if PPP_KOSTIL
if ((i==0)&&(data[0]!=0x7e)) {
xQueueSendToBack(queue_bytes_pppout,&pppFr,5000);
#if PPP_DEBUG_DATA
printf("%.2x ",pppFr);
#endif
}
#endif
xQueueSendToBack(queue_bytes_pppout,&data[i],5000);
#if PPP_DEBUG_DATA
printf("%.2x ",data[i]);
#endif
}
#if PPP_DEBUG_DATA
printf("\n");
#endif
return len;
}
void sio_read_abort(sio_fd_t fd)
{
stop = 1;
}
// End of sio functions
static volatile unsigned char stop = 0;
extern xQueueHandle queue_bytes_pppin;
extern xQueueHandle queue_bytes_pppout;
u32_t sio_read(sio_fd_t fd, u8_t *data, u32_t len)
{
unsigned long i = 0;
while (xQueueReceive(queue_bytes_pppin,&data[i],0)==pdPASS)
{
#if PPP_DEBUG_DATA
if (i==0) {printf("\nReading PPP packet from USB\n0000 ");}
printf("%.2x ",data[i]);
#endif
i++;
if (stop||(i==len))
{
stop = 0;
return i;
}
}
#if PPP_DEBUG_DATA
if (i>0) {printf("\n");}
#endif
return i;
}
u32_t sio_write(sio_fd_t fd, u8_t *data, u32_t len)
{
#if PPP_KOSTIL
static u8_t pppFr=0x7e;
#endif
unsigned long i;
#if PPP_DEBUG_DATA
printf("\nWriting PPP packet to USB\n0000 ");
#endif
for (i=0;i<len;i++) {
#if PPP_KOSTIL
if ((i==0)&&(data[0]!=0x7e)) {
xQueueSendToBack(queue_bytes_pppout,&pppFr,5000);
#if PPP_DEBUG_DATA
printf("%.2x ",pppFr);
#endif
}
#endif
xQueueSendToBack(queue_bytes_pppout,&data[i],5000);
#if PPP_DEBUG_DATA
printf("%.2x ",data[i]);
#endif
}
#if PPP_DEBUG_DATA
printf("\n");
#endif
return len;
}
void sio_read_abort(sio_fd_t fd)
{
stop = 1;
}
// End of sio functions
Лог соединения:
CODE
xLength=3 data=at
xLength=36 data=at+cgdcont=1,"IP","internet.mts.ru"
xLength=7 data=ATS0=0
xLength=21 data=AT&FE0V1X1&D2&C1S0=0
xLength=9 data=ATDT*99#
ppp phase changed: unit 0: phase=0
ppp phase changed: unit 0: phase=1
ppp_over_serial_open: unit 0: connecting
ppp_start: unit 0
ppp_set_xaccm[0]: out_accm=0 0 0 0
ppp_send_config[0]: out_accm=FF FF FF FF
ppp_recv_config[0]: in_accm=FF FF FF FF
neg_upap: 1
ppp_write[0]: len=47
Writing PPP packet to USB
0000 7e ff 7d 23 c0 21 7d 21 7d 21 7d 20 7d 34 7d 22 7d 26 7d 20 7d 20 7d 20 7d 20 7d 25 7d 26 7d 3b 2e 7d 34 6b 7d 27 7d 22 7d 28 7d 22 da bc 7e
ppp_start: finished
Reading PPP packet from USB
0000 7e ff 7d 23 c0 21 7d 21 7d 20 7d 20 7d 39 7d 22 7d 26 7d 20 7d 20 7d 20 7d 20 7d 23 7d 25 c2 23 7d 25 7d 25 7d 26 7d 20 e2 b7 7d 2f 7d 27 7d
22 7d 28 7d 22 b6 af 7e 7e ff 7d 23 c0 21 7d 22 7d 21 7d 20 7d 34 7d 22 7d 26 7d 20 7d 20 7d 20 7d 20 7d 25 7d 26 7d 3b 2e 7d 34 6b 7d 27 7d 22 7d
28 7d 22 31 d5 7e
pppos_input_proc[0]: got 102 bytes
ppp_write[0]: len=22
Writing PPP packet to USB
0000 ff 7d 23 c0 21 7d 23 7d 20 7d 20 7d 28 7d 23 7d 24 c0 23 f7 d7 7e
Reading PPP packet from USB
0000 7e ff 7d 23 c0 21 7d 21 7d 21 7d 20 7d 38 7d 22 7d 26 7d 20 7d 20
7d 20 7d 20 7d 23 7d 24 c0 23 7d 25 7d 26 7d 20 e2 b7 7d 2f 7d 27 7d 22 7d 28 7d 22 a4 9a 7e
pppos_input_proc[0]: got 53 bytes
ppp_write[0]: len=52
Writing PPP packet to USB
0000 ff 7d 23 c0 21 7d 22 7d 21 7d 20 7d 38 7d 22 7d 26 7d 20 7d 20 7d 20 7d 20 7d 23 7d 24
c0 23 7d 25 7d 26 7d 20 e2 b7 7d 2f 7d 27 7d 22 7d 28 7d 22 68 77 7e
ppp_send_config[0]: out_accm=0 0 0 0
ppp_recv_config[0]: in_accm=0 0 0 0
ppp phase changed: unit 0: phase=5
ppp_write[0]: len=19
Writing PPP packet to USB
0000 ff 03 c0 23 01 01 00 0c 03 6d 74 73 03 6d 74 73 0c f7 7e
Reading PPP packet from USB
0000 7e ff 7d 23 c0 21 7d 2b 7d 22 7d 20 7d 28 7d 20ppp_write[0]: len=20
Writing PPP packet to USB
0000 7e ff 03 c0 23 01 02 00 0c 03 6d 74 73 03 6d 74 73 bf 09 7e
Reading PPP packet from USB
0000 7e c0 23 02 02 00 05 00 30 15 7e
pppos_input_proc[0]: got 11 bytes
PAP authentication succeeded
ppp phase changed: unit 0: phase=7
ppp_write[0]: len=35
Writing PPP packet to USB
0000 ff 03 80 21 01 01 00 1c 02 06 00 2d 0f 01 03 06 00 00 00 00 81 06 00 00 00 00 83 06 00 00 00 00 55 15 7e
Reading PPP packet from USB
0000 7e 80 21 03 01 00 1c 81 06 0a 0b 0c 0d 83 06 0a 0b 0c 0e 82 06 0a 0b 0c 0d 84 06 0a 0b 0c 0e 41 03 7e
pppos_input_proc[0]: got 34 bytes
ppp_write[0]: len=48
Writing PPP packet to USB
0000 7e ff 03 80 21 01 02 00 28 02 06 00 2d 0f 01 03 06 00 00 00 00 81 06 0a 0b 0c 0d 83 06 0a 0b 0c 0e 82 06 0a 0b 0c 0d 84 06 0a 0b 0c 0e 27 56 7e
Reading PPP packet from USB
0000 7e 80 21 03 02 00 1c 81 06 0a 0b 0c 0d 83 06 0a 0b 0c 0e 82 06 0a 0b 0c 0d 84 06 0a 0b 0c 0e 99 f5 7e
pppos_input_proc[0]: got 34 bytes
ppp_write[0]: len=48
Writing PPP packet to USB
0000 7e ff 03 80 21 01 03 00 28 02 06 00 2d 0f 01 03 06 00 00 00 00 81 06 0a 0b 0c 0d 83 06 0a 0b 0c 0e 82
06 0a 0b 0c 0d 84 06 0a 0b 0c 0e c9 1c 7e
Reading PPP packet from USB
0000 7e 80 21 01 00 00 04 67 c3 7e
pppos_input_proc[0]: got 10 bytes
ppp_write[0]: len=17
Writing PPP packet to USB
0000 ff 03 80 21 03 00 00 0a 03 06 00 00 00 00 a0 3d 7e
Reading PPP packet from USB
0000 7e 80 21 04 03 00 16 02 06 00 2d 0f 01 82 06 0a 0b 0c 0d 84 06 0a 0b 0c 0e 25 84 7e
pppos_input_proc[0]: got 28 bytes
ppp_write[0]: len=29
Writing PPP packet to USB
0000 ff 03 80 21 01 04 00 16 03 06 00 00 00 00 81 06 0a 0b 0c 0d 83 06 0a 0b 0c 0e e3 09 7e
Reading PPP packet from USB
0000 7e 80 21 03 04 00 16 03 06 0a 6d 56 e8 81 06 d5 57 00 01 83 06 d5 57 01 01 d4 bd 7e
pppos_input_proc[0]: got 28 bytes
ppp_write[0]: len=29
Writing PPP packet to USB
0000 ff 03 80 21 01 05 00 16 03 06 0a 6d 56 e8 81 06 d5 57 00 01 83 06 d5 57 01 01 73 40 7e
Reading PPP packet from USB
0000 7e 80 21 02 05 00 16 03 06 0a 6d 56 e8 81 06 d5 57 00 01 83 06 d5 57 01 01 e5 23 7e
pppos_input_proc[0]: got 28 bytes
Reading PPP packet from USB
0000 7e 80 21 01 02 00 04 df 76 7e
pppos_input_proc[0]: got 10 bytes
ppp_write[0]: len=13
Writing PPP packet to USB
0000 7e ff 03 80 21 02 02 00 04 a9 7d 5d 7e
Could not determine remote IP address: defaulting to 10.64.64.64
sifup: unit 0: err_code=0
local IP address 10.109.86.232
remote IP address 10.64.64.64
primary DNS address 213.87.0.1
secondary DNS address 213.87.1.1
ppp phase changed: unit 0: phase=8
ppp_netif_output[0]: proto=0x21
Writing PPP packet to USB
0000 21 45 00 00 2c 00 00 00 00 ff 06 1f e5 0a 6d 56 e8 5d ab dc e6 c0 01 00 50 00 00 19 6d 00 00 00 00 60
02 08 60 1d bd 00 00 02 04 02 18 86 2d 7e
Reading PPP packet from USB
0000 7e 21 45 00 00 2c e9 62 40 00 31 06 c4 82 5d ab dc e6 0a 6d 56 e8 00 50 c0 01 ef bd af 39 00 00 19 6e
60 12 80 00 07 14 00 00 02 04 02 18 63 bc 7e
pppos_input_proc[0]: got 49 bytes
ppp_input[0]: ip in pbuf len=44
ppp_netif_output[0]: proto=0x21
Wr
GSH:: CONNECTED OK
iting PPP packet to USB
0000 21 45 00 00 28 00 01 00 00 ff 06 1f e8 0a 6d 56 e8 5d ab dc e6 c0 01 00 50 00 00 19 6e ef bd af 3a 50
10 08 60 92 d5 00 00 b0 b3 7e
ppp_netif_output[0]: proto=0x21
Writing PPP packet to USB
0000 21 45 00 00 ad 00 02 00 00 ff 06 1f 62 0a 6d 56 e8 5d ab dc e6 c0 01 00 50 00 00 19 6e ef bd af 3a 50
18 08 60 07 ad 00 00 50 4f 53 54 20 2f 68 5f 66 6f 72 6d 2e 70 68 70 20 48 54 54 50 2f 31 2e 31 0d 0a 43
6f 6e 74 65 6e 74 2d 6c 65 6e 67 74 68 3a 20 31 33 0d 0a 43 6f 6e 6e 65 63 74 69 6f 6e 3a 20 43 6c 6f 73
65 0d 0a 43 6f 6e 74 65 6e 74 2d 54 79 70 65 3a 20 61 70 70 6c 69 63 61 74 69 6f 6e 2f 78 2d 77 77 77 2d
66 6f 72 6d 2d 75 72 6c 65 6e 63 6f 64 65 64 0d 0a 0d 0a 68 6c 61 6d 3d 48 4c 41 4d 49 4e 47 41 0d 0a 00
aa 46 7e
GSH:: DATA WRITTEN OK
ppp_netif_output[0]: proto=0x21
Writing PPP packet to USB
0000 7e 21 45 00 00 ad 00 03 00 00 ff 06 1f 61 0a 6d 56 e8 5d ab dc e6 c0 01 00 50 00 00 19 6e ef bd af 3a
50 18 08 60 07 ad 00 00 50 4f 53 54 20 2f 68 5f 66 6f 72 6d 2e 70 68 70 20 48 54 54 50 2f 31 2e 31 0d 0a
43 6f 6e 74 65 6e 74 2d 6c 65 6e 67 74 68 3a 20 31 33 0d 0a 43 6f 6e 6e 65 63 74 69 6f 6e 3a 20 43 6c 6f
73 65 0d 0a 43 6f 6e 74 65 6e 74 2d 54 79 70 65 3a 20 61 70 70 6c 69 63 61 74 69 6f 6e 2f 78 2d 77 77 77
2d 66 6f 72 6d 2d 75 72 6c 65 6e 63 6f 64 65 64 0d 0a 0d 0a 68 6c 61 6d 3d 48 4c 41 4d 49 4e 47 41 0d 0a
00 bc 5d 7e
ppp_netif_output[0]: proto=0x21
Writing PPP packet to USB
0000 21 45 00 00 2c 00 04 00 00 ff 06 1f e1 0a 6d 56 e8 5d ab dc e6 c0 02 00 50 00 00 19 7d 5d 00 00 00 00
60 02 08 60 1d ac 00 00 02 04 02 18 05 b7 7e
Reading PPP packet from USB
0000 7e 21 45 00 00 2c eb 80 40 00 31 06 c2 64 5d ab dc e6 0a 6d 56 e8 00 50 c0 02 3f 0d c9 3d 00 00 19 7d
5e 60 12 80 00 9d af 00 00 02 04 02 18 5a 68 7e
pppos_input_proc[0]: got 50 bytes
ppp_input[0]: ip in pbuf len=44
ppp_netif_output[0]: proto=0x
GSH:: CONNECTED OK
21
Writing PPP packet to USB
0000 7e 21 45 00 00 28 00 05 00 00 ff 06 1f e4 0a 6d 56 e8 5d ab dc e6 c0 02 00 50 00 00 19 7d 5e 3f 0d c9
3e 50 10 08 60 29 71 00 00 2c 67 7e
ppp_netif_output[0]: proto=0x21
Writing PPP packet to USB
0000 21 45 00 00 ad 00 06 00 00 ff 06 1f 5e 0a 6d 56 e8 5d ab dc e6 c0 02 00 50 00 00 19 7d 5e 3f 0d c9 3e
50 18 08 60 9e 48 00 00 50 4f 53 54 20 2f 68 5f 66 6f 72 6d 2e 70 68 70 20 48 54 54 50 2f 31 2e 31 0d 0a 43
6f 6e 74 65 6e 74 2d 6c 65 6e 67 74 68 3a 20 31 33 0d 0a 43 6f 6e 6e 65 63 74 69 6f 6e 3a 20 43 6c 6f 73
65 0d 0a 43 6f 6e 74 65 6e 74 2d 54 79 70 65 3a 20 61 70 70 6c 69 63 61 74 69 6f 6e 2f 78 2d 77 77 77 2d
66 6f 72 6d 2d 75 72 6c 65 6e 63 6f 64 65 64 0d 0a 0d 0a 68 6c 61 6d 3d 48 4c 41 4d 49 4e 47 41 0d 0a 00 2f d8 7e
GSH:: DATA WRITTEN OK
ppp_netif_output[0]: proto=0x21
Writing PPP packet to USB
0000 7e 21 45 00 00 ad 00 07 00 00 ff 06 1f 5d 0a 6d 56 e8 5d ab dc e6 c0 02 00 50 00 00 19 7d 5e 3f 0d c9
3e 50 18 08 60 9e 48 00 00 50 4f 53 54 20 2f 68 5f 66 6f 72 6d 2e 70 68 70 20 48 54 54 50 2f 31 2e 31 0d 0a
43 6f 6e 74 65 6e 74 2d 6c 65 6e 67 74 68 3a 20 31 33 0d 0a 43 6f 6e 6e 65 63 74 69 6f 6e 3a 20 43 6c 6f 73
65 0d 0a 43 6f 6e 74 65 6e 74 2d 54 79 70 65 3a 20 61 70 70 6c 69 63 61 74 69 6f 6e 2f 78 2d 77 77 77 2d 66
6f 72 6d 2d 75 72 6c 65 6e 63 6f 64 65 64 0d 0a 0d 0a 68 6c 61 6d 3d 48 4c 41 4d 49 4e 47 41 0d 0a 00 39 c3 7e
ppp_netif_output[0]: proto=0x21
Writing PPP packet to USB
0000 21 45 00 00 2c 00 08 00 00 ff 06 1f dd 0a 6d 56 e8 5d ab dc e6 c0 03 00 50 00 00 19 9f 00 00 00 00 60
02 08 60 1d 89 00 00 02 04 02 18 7c ec 7e
ppp_netif_output[0]: proto=0x21
Writing PPP packet to USB
0000 7e 21 45 00 00 2c 00 09 00 00 ff 06 1f dc 0a 6d 56 e8 5d ab dc e6 c0 03 00 50 00 00 19 9f 00 00 00 00
60 02 08 60 1d 89 00 00 02 04 02 18 f1 e6 7e
Reading PPP packet from USB
0000 7e 21 45 00 00 2c ed c3 40 00 31 06 c0 21 5d ab dc e6 0a 6d 56 e8 00 50 c0 03 b8 c4 3c 39 00 00 19 a0
60 12 80 00 b0 d9 00 00 02 04 02 18 64 81 7e
pppos_input_proc[0]: got 49 bytes
ppp_input[0]: ip in pbuf len=44
ppp_netif_output[0]: proto=0x21
Writing PPP packet to USB
0000 21 45 00 00 28 00 0a 00 00 ff 06 1f df 0a 6d 56 e8 5d ab dc e6 c0 03 00 50 00 00 19 a0 b8 c4 3c 3a 50
14 08 60 3c 97 00 00 8b 1e 7e
Reading PPP packet from USB
0000 7e 21 45 00 00 28 ee 48 40 00 31 06 bf a0 5d ab dc e6 0a 6d 56 e8 00 50 c0 01 ef bd af 39 00 00 19 6e
50 10 81 d0 19 66 00 00 93 4d 7e
pppos_input_proc[0]: got 45 bytes
ppp_input[0]: ip in pbuf len=40
ppp_netif_output[0]: proto=0x21
Writing PPP packet to USB
0000 7e 21 45 00 00 28 00 0b 00 00 ff 06 1f de 0a 6d 56 e8 5d ab dc e6 c0 01 00 50 00 00 19 6e ef bd af 39
50 14 08 60 92 d2 00 00 da c7 7e
Reading PPP packet from USB
0000 7e 21 45 00 00 28 ee c3 40 00
pppos_input_proc[0]: got 10 bytes
Reading PPP packet from USB
0000 31 06 bf 25 5d ab dc e6 0a 6d 56 e8 00 50 c0 01 ef bd af 39 00 00 19 6e 50 10 81 d0 19 66 00 00 3f fd
7e 7e 21 45 00 00 28 ef 1c 40 00 31 06 be cc 5d ab dc e6 0a 6d 56 e8 00 50 c0 01 ef bd af 39 00 00 19 6e 50
10 81 d0 19 66 00 00 60 15 7e 7e 21 45 00 00 28 ef 3a 40 00 31 06 be ae 5d ab dc e6 0a 6d 56 e8 00 50 c0
02 3f 0d c9 3d 00 00 19 7d 5e 50 10 81 d0 b0 01 00 00 b9 26 7e
pppos_input_proc[0]: got 126 bytes
ppp_input[0]: ip in pbuf len=40
ppp_netif_output[0]: proto=0x21
Writing PPP packet to USB
0000 21 45 00 00 28 00 0c 00 00 ff 06 1f dd 0a 6d 56 e8 5d ab dc e6 c0 01 00 50 00 00 19 6e ef bd af 39 50
14 08 60 92 d2 00 00 37 e7 7e
ppp_input[0]: ip in pbuf len=40
ppp_netif_output[0]: proto=0x21
Writing PPP packet to USB
0000 21 45 00 00 28 00 0d 00 0
Reading PPP packet from USB
0000 7e 21 45 00 00 28 ef 55 40 00 31 06 be 93 5d ab dc e6 0a 6d 56 e8 00 50 c0 01 ef bd af 39 00 00 19 6e
50 10 81 d0 19 66 00 00 c8 75 7e
pppos_input_proc[0]: got 45 bytes
ppp_input[0]: ip in pbuf len=40
ppp_netif_output[0]: proto=0x21
Writing PPP packet to USB
0000 21 45 00 00 28 00 0f 00 00 ff 06 1f da 0a 6d 56 e8 5d ab dc e6 c0 01 00 50 00 00 19 6e ef bd af 39 50
14 08 60 92 d2 00 00 c9 0f 7e
Reading PPP packet from USB
0000 7e 21 45 00 00 28 df 23 00 00 fa 06 45 c5 5d ab dc e6 0a 6d 56 e8 00 50 c0 01 ef bd af 39 00 00 00 00
50 04 00 00 b4 b0 00 00 15 e2 7e
pppos_input_proc[0]: got 45 bytes
ppp_input[0]: ip in pbuf len=40
Reading PPP packet from USB
0000 7e 21 45 00 00 28 df 23 00 00 fa 06 45 c5 5d ab dc e6 0a 6d 56 e8 00 50 c0 01 ef bd af 39 00 00 00 00
50 04 00 00 b4 b0 00 00 15 e2 7e
pppos_input_proc[0]: got 45 bytes
ppp_input[0]: ip in pbuf len=40
Reading PPP packet from USB
0000 7e 21 45 00 00 28 ef 62 40 00 31 06 be 86 5d ab dc e6 0a 6d 56 e8 00 50 c0 02 3f 0d c9 3d 00 00 19
7d 5e 50 10 81 d0 b0 01 00 00 a2 e4 7e
pppos_input_proc[0]: got 46 bytes
ppp_input[0]: ip in pbuf len=40
ppp_netif_output[0]: proto=0x21
Writing PPP packet to USB
0000 21 45 00 00 28 00 10 00 00 ff 06 1f d9 0a 6d 56 e8 5d ab dc e6 c0 02 00 50 00 00 19 7d 5e 3f 0d c9
3d 50 14 08 60 29 6e 00 00 5b 3b 7e
Данные в sio_read и sio_write гоняются туда-сюда, только видимо стек их отправляет/принимает не так, то ли до модема данные доходят с ошибкой, но судя по тому, что коннект по PPP устанавливается и ай пи присваивается, в sys_arch.c и далее до модема все нормально.
Задача - передать HTTP POST запрос на сервер и получить ОК.
Формат HTTP запроса корректный, пробовал через Putty, сервер принимает нормально.
Через LwIP никак не удается тот же самый запрос закинуть на сервер и принять хоть какой-то ответ.