lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] SNMP, Malformed Packet


From: nrichard
Subject: [lwip-users] SNMP, Malformed Packet
Date: Tue, 31 Jan 2017 13:30:56 -0700 (MST)

Hello everyone,

I have an application, which is an image.bin file that I transferred to a
Sam4e Xplained Pro evaluation board using FTP (an FTP+lwip module under the
name Toelke on Github) and wrote to flash at location x430000.  I'm having
trouble running a couple of lwip services and I'm not sure why.  Services
such as pinging the board and an example HTTP server work perfectly fine. 
But for some reason it's specifically for UDP related services, such as SNMP
and a UDP echo server (used telnet on my PC).  When I attempt to request a
value through SNMP, I get no response back.  My debugging shows that I get
the request coming in, and it seems like it attempts to send something back,
since the debugging says "SNMP get-next request", yet I get nothing in
return in my SNMP client.  In Wireshark, I can see that request going out,
and a response coming back in with the error "malformed packet".  It does
this 5 times before timing out.  Then, the board sometimes eventually
crashes.  What's interesting about all of this though is that if I took my
application image and flashed it directly to the board at location x400000,
it works perfectly fine without any problems.
 
Any thoughts about what could be wrong?  I find it particularly odd that it
only affects UDP.  TCP is working just fine, I can ping the board and visit
an HTTP server.  When I first start the board with the bootloader, I have to
initialize TCP in order to use FTP, thus also initializing lwip.  After my
transfer though, I do a software reset of the board.  It doesn't do a
complete power shutdown from what I can tell, but documentation says it
resets the memory system, thus wiping any lwip settings / connections.  I am
initializing LWIP in both the bootloader, for the transfer, and then after
the reboot I initialize it again in my Application so that I can do SNMP,
HTTP, etc.  If the software reset isn't truly a reset like I think it is, is
it possible that I'm trying to run two sessions of lwip at the same time?

Here is a link to google drive with a wireshark capture that shows the whole
process from start to finish.

https://drive.google.com/open?id=0B2is3exEmQ2QcDV3ems4SGV4ckU

1. FTP from PC to board
2. Transfer image.bin from PC to board
3. Close FTP session
4. Contacting board through SNMP (5 tries)

If there's anything else I can provide, let me know. Thanks.



--
View this message in context: 
http://lwip.100.n7.nabble.com/SNMP-Malformed-Packet-tp28560.html
Sent from the lwip-users mailing list archive at Nabble.com.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]