About r36

luaw_mem.c may be broken, pool memory is never allocated. Actually, I was using r15.

In luaW_memPoolInit poolset variable is not initialized (maybe poolset = headers), also last_min, last_max and poolset_max_size during pass 1. I’ve fixed those, and pool memory then gets alocated, but then random resets of the device occur, maybe during memory release. Didn’t have enough time to find the reason, so I reverted to previous version of memory allocation.

Seems that ETHER bearer will be supported, just trying to do the same for Fastrack_ethernet with some kind of wrapper around ETHER bearer. Funny thing, when bearer_stop, ETHER bearer never fires STOPPED event (using R73). Also, when not using DHCP, bearer never gets IP_CONNECTED.

Maybe better wait for ‘official’ port?

Two most common source of problems with memory:

  • make sure that you initialize it the new way (i.e. you shouldn’t have a mempools.h in your project). Maybe you missed a step when porting to the new initialization API? Notice that lua will run without the mempools, it will just waste more memory (it will rely on adl_memGet() only, which is not optimized for small allocations).

  • make sure that you compile in 1MB+, not in 256KB

About Ethernet: there is a preliminary support, but it will remain as a sample for a while: I’m not over confident about its stability, and my knowledge about device drivers is very limited. I currently have stability issues on an application which involves several 3rd party C code, including the Ethernet driver; I don’t know whether he is the one responsible for those instabilities, I need to run my app over GPRS to compare.

I have also observed that DHCP takes very long to connect, ~ 1 minute, but it seems due to my DHCP server which checks for networks loops before giving a lease.