Two-day flood TCP protocol stack

xiaoxiao2021-03-06  63

Write a protocol stack.

I started last Thursday, I saw the code, I got online. A flash board was studied on Saturday Saturday and studied the AT command.

Finally, I found that AVR's board has problems.

For the code or a fog.

This week, I changed the block ARM development board, spent a day, debugging the two serial ports of ARM.

By the way, write a bit error rate test on the computer.

Then write a program that parsing the PPP, assisting the data received by the serial port.

The debug agreement was officially started on Monday night.

All night, basically understand the PPP protocol, you can call the Internet and sleep.

Terraday afternoon, the username password verification, request DNS and native IP success. PPP is connected.

On Wednesday morning, TCP was successfully held, and later found that the ARM compiler handled the high and low byte, which was significantly modified.

For fixed IP, the server returns a second handshake, and the notebook GPRS is online, the net is not returned. Suspected is that the check code is not right.

I found a bunch of standard TCP bags, tossing for a long time, it seems to have a check code, it seems to have access to the standard.

Then send a third time, theoretically, it should be connected, but the transmit and receive data is not responded.

Cause: The confirmation code is not filled, the server considers confidant that the confirmation package is confiscated.

Finally, I will get data normally before dinner. At this point, the TCP connection is basically passed.

The actual work is only two days. Mainly PPP debugging is more painful. The online information is very vague, and it is slightly not talking about it.

Many data items do not know the specific meaning. TCP is relatively simple, that is, the confirmation code and the logo point code.

UDP has not been adjusted, it should be more simple than TCP, after all, there is no state.

to sum up:

1. The preparation of the peripheral is always 80% of the time.

2. When you don't understand, you don't understand how you look at the code. I understand how I understand it later.

For example, the classic "TCP / IP Details", the idea of ​​individual thinks is worth discusing.

Many similar protocols, standard data like to use the descriptive text of the large section, and relatively small forms, especially foreign books.

Examples of blocks are also programs that call library functions. After reading, it is still a mist. The function that is actually used is critical.

If I write the book, I will directly list the 16-encoding code of the transmitted and received, and then the peeling wire, analyze the specific meaning, so absolute

It is better than the book on the market.

转载请注明原文地址:https://www.9cbs.com/read-92776.html

New Post(0)