W5100 indirect Patrick1ab driver
edlikestoboogie
Posts: 71
I have been trying to use Patrick1ab's W5100 driver recently that he posted with no luck. If you are listening patrick, how do I properly use your driver to start a listening TCP server?
I am using StartINDIRECT() then InitAddresses() to initialize.
Then I use "repeat while eth.SocketTCPestablished(0) == false" to wait for a connection
and finally use txTCP and rxTCP to send and recieve packets.
Is this how to use your Ver2 of your indirect driver?
Could you please provide us with some sample code on using the driver and any updates if you improved your driver.
I get confused reading your driver code, because some of your methods, like txTCP/rxTCP use writeSPI, which makes me think I am not suppose to use it. In any case I can't even get the W5100 to light the LEDs to my magjack, so the situation is bad, although my router is showing a link to my project.
thanks,
Ed.
I am using StartINDIRECT() then InitAddresses() to initialize.
Then I use "repeat while eth.SocketTCPestablished(0) == false" to wait for a connection
and finally use txTCP and rxTCP to send and recieve packets.
Is this how to use your Ver2 of your indirect driver?
Could you please provide us with some sample code on using the driver and any updates if you improved your driver.
I get confused reading your driver code, because some of your methods, like txTCP/rxTCP use writeSPI, which makes me think I am not suppose to use it. In any case I can't even get the W5100 to light the LEDs to my magjack, so the situation is bad, although my router is showing a link to my project.
thanks,
Ed.
Comments
In the latest versions, I changed the RX/TX masks to the RX/TX expmasks.
Since this differs from the default configuration of the W5100 chip, you will have to set the RX/TX memory size according to the experimental masks.
Like this:
If you want to use this driver as a server, you will have to open a socket first and then listen to it:
After that, you can call "repeat while eth.SocketTCPestablished(0) == false" to wait for a connection.
I apologize for the confusion I have caused.
You can use every method of the driver (except PUB ResetHardware(_block) is guess, but I commented this out anyway).
I was simply to lazy to change every "writeSPI" to a "write" or to a "writeINDIRECT".
That sounds bad to me, since normally this has nothing to do with the driver.
Have you checked the supply voltage for the W5100 chip? Are the magjack LEDs connected with the right polarity?
Post Edited (Patrick1ab) : 6/7/2010 10:48:34 AM GMT
I am happy to tell you that I got your driver working on my project. I was able to connect and get some data off the propeller. Oddly enough, the LEDs are still not functioning. Which is really weird since I did not change that part of my PCB layout from my many previous working PCBs with the W5100 configured for SPI. My server code is acting funny so I will have to tighten that up for the next few days, I'll try and do some speed tests to see if this was well worth the migration from SPI.
Thanks again Patrick for all the hard work and I hope you improve on this driver in the future.
i'm pretty excited, since I feel like we are the first few people to get this working for the prop.