[ell-i-developers] Tentative plan for Arduino Ethernet library support

  • From: Pekka Nikander <pekka.nikander@xxxxxx>
  • To: "ell-i-developers@xxxxxxxxxxxxx" <ell-i-developers@xxxxxxxxxxxxx>
  • Date: Tue, 18 Feb 2014 08:51:01 +0200

After some thinking, I'm currently planning to implement a rudimentary Arduino 
Ethernet library support for us.

The plan is to divide the implementation as follows:

1. Create a new location for our versions of official Arduino libraries, 

2. Place two Arduino libraries there, stm32/libraries/SPI and 

3. Create places for STM32- and ENC28J60 specific source code there, 
  stm32/libraries/SPI/arch/stm32 and stm32/libraries/Ethernet/arch/enc28j60

  The idea is that enc28j60 uses the SPI library, thereby allowing it
  to be used also with other MCUs.  If needed, I will extend the SPI interface 
for that

At the moment I'm looking if it is possible to create an ENC28J60 based stack 
that looks like a W5100 based stack, so that we could support directly the 
Arduino version of the Ethernet class.  Someone could then test the 
implementation on an Arduino Uno or Due.  After that we could contribute it to 
the Arduino proper.  So far everything looks good, the interface mostly is 
fairly high level and abstract, not bound to the W5100 implementation other 
than in a couple of places, that most probably can be refactored.

However, full W5100-like support would require a full TCP, as W5100 implements 
both TCP and UP on the chip.  That would take too much time at the moment, and 
I'm therefore planning to implement only UDP, for now.  That should be enough 
also for DHCP, as the Arduino Ethernet library implements DCHP.

If this plan succeeds, we should have working UDP/IP relatively soon.  
Realistically this will take more than a week, so perhaps late next week if 
everything goes well.  Sooner if someone is able to join me and we can divide 
some of the work among us.


Other related posts: