4271 views|7 replies
annysky2012
Currently offline
|
The OP
Published on 2019-8-27 23:09
Only look at the author
About LWIP (LAN8720) network data transmission problem [Copy link]
This post is from stm32/stm8
Latest reply
This post was last edited by Ansersion on 2019-8-29 11:45
annysky2012 posted on 2019-8-29 09:58 The strlen function is indeed used, but the number I sent is 0, not '\0'! ! ! Why is this?
'\0' == 0
That's not the number 0. The ASCII code for the number 0 is 48.
Another common mistake is to use strcpy as memcpy, which will also cause truncation.
Details
Published on 2019-8-29 11:43
| |
Personal signature
没有什么不可以,我就是我,不一样的烟火! |
||
2
Published on 2019-8-28 09:38
Only look at the author
This post is from stm32/stm8
Comments
The strlen function is indeed used, but I sent the number 0, not '\0'! ! ! Why is that?
Details
Published on 2019-8-29 09:58
| ||
|
||
|
3
Published on 2019-8-28 10:38
Only look at the author
This post is from stm32/stm8
Comments
I haven't tried it, I'll try it
Details
Published on 2019-8-29 10:15
I haven't tried it, I'll try it
Details
Published on 2019-8-29 09:59
| ||
|
||
|
annysky2012
Currently offline
|
This post is from stm32/stm8
Comments | |
Personal signature
没有什么不可以,我就是我,不一样的烟火! |
||
|
annysky2012
Currently offline
|
This post is from stm32/stm8
| |
Personal signature
没有什么不可以,我就是我,不一样的烟火! |
||
|
annysky2012
Currently offline
|
This post is from stm32/stm8
| |
Personal signature
没有什么不可以,我就是我,不一样的烟火! |
||
|
7
Published on 2019-8-29 11:43
Only look at the author
This post is from stm32/stm8
Comments
That makes a lot of sense. When I sent data, I used strlen to determine the length of the data to be sent and to apply for memory. Logically, it should be applied by bytes. I confused strlen and sizeof. Now the problem has been solved, thank you!
Details
Published on 2019-8-30 11:25
| ||
|
||
|
annysky2012
Currently offline
|
This post is from stm32/stm8
| |
Personal signature
没有什么不可以,我就是我,不一样的烟火! |
||
|
EEWorld Datasheet Technical Support
EEWorld
subscription
account
EEWorld
service
account
Automotive
development
circle
About Us Customer Service Contact Information Datasheet Sitemap LatestNews
Room 1530, Zhongguancun MOOC Times Building, Block B, 18 Zhongguancun Street, Haidian District, Beijing 100190, China Tel:(010)82350740 Postcode:100190