Have you performed an ethernet packet trace watching the "empty" packet on the net?
Looking at an earlier trace when it was getting clobbered with packets, the client was sending SYNs, and the Spinneret was responding with RSTs. (I'm not sure what that means, actually.) I'll try to provide more detail in the morning, once I've got my mods to Beau's object in place.
After looking at Beau's and Mike's code more closely, I decided it was time to take the training wheels off and just dig in with a direct interface to the BrilIdea driver. And I'm glad I did. It's not as onerous as I imagined it might be, and what I've done so far works. I'm not ready to change the thread status to "solved" just yet, but it's getting closer.
Anyway, I've attached a strip-down version of what I'm working on that works. Now it's time to start adding the original pieces back. Hopefully, it will keep working.
Well, apparently it wasn't completely solved, but I had not put any timeouts in the get_request routine, and the webcam was hanging. So I added the timeout:
PUB get_request : packet_size | time
repeat until w5100.SocketTCPestablished(0)
ifnot (lookdown(get_status : $14, $16, $17, $11))
socket_reset
return
time := cnt
repeat until (cnt - time > timeout)
if (packet_size := W5100.rxTCP(0, @data))
data[packet_size]~
return
socket_reset
return
Comments
-Phil
This is how I handle the socket using the status register.
Listen - > $14 -> [if $00 then reset the socket] -> TCPestablished? -> [if not $14, $16, $17, or $11 then reset the socket]
Here's my status register monitoring code.
Next I check the packet size. If the packet is 0 I start a timer and keep trying to get the data. If there is a timeout I reset the socket.
This is a sample of my log with the status register states.
This is a normal looking request where the status goes from $14 to $17
This one I held down the F5 key.
No data returned
Hope this helps.
After looking at Beau's and Mike's code more closely, I decided it was time to take the training wheels off and just dig in with a direct interface to the BrilIdea driver. And I'm glad I did. It's not as onerous as I imagined it might be, and what I've done so far works. I'm not ready to change the thread status to "solved" just yet, but it's getting closer.
Anyway, I've attached a strip-down version of what I'm working on that works. Now it's time to start adding the original pieces back. Hopefully, it will keep working.
Thanks to all for the assistance!
-Phil
-Phil
We'll see what happens...
-Phil