Skip to content

Haha – There’s My 17 – W5500 Connection Success

November 29, 2014

As is usually the way, I spent a good hour poking at my code and the logic analyzer before I made good and sure the ethernet cable was connected at the back of my laptop. Nope!

Once I fixed that, my socket status obediently went from 14=listen to 17=session established. Still something wrong because it should have printed the client IP but it’s progress.

14-11-29 17

This whole olduino thing is just my excuse for geeking out on low level code. Looking at the assembly of the getip() routine I see that I was passing a 0 length to wizread(). As you can imagine this doesn’t end well.

_getip:		;framesize=16
	reserve 14
;long getip(){ //retrieve the requester's ip and return it as a long
;	(void)wizRead(SnDIPR,WIZNET_READ_S0R,thisip.c,0); **************oooooooooooooops***********
	ldaD R12,12; reg:acon
	ldaD R13,8; reg:acon
	ldA2 R11,'O',sp,(8); reg:addr
	st2 R11,'O',sp,(4); arg+f**
	ld2z R11
	st2 R11,'O',sp,(6); arg+f**
	Ccall _wizRead; CALLI2(ar)

From → web server

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: