Monday, December 21, 2015

Progress on TCP/IP via MCC

Have chosen LwIP as the TCP/IP stack for the M4.  LwIP runs on a number of different processors and it has a rich application stack; HTTP, Auto IP, IPv6, etc.

Created a MQX interface following the porting guide and several examples.  Created a loop back interface and able to create sockets.  Working on a modification to the lwIP select function to allow passing a semaphore and a condition variable.    This allows one thread to wait on TCP/UDP sockets and messages from a queue using the passed in semaphore; this helps with multithreading issues with LwIP.

Tasks pending:
- MCC driver for lwIP; it's a simple thread pending on read MCC function; write will be passed via the TCP/IP thread.  MTU size is 1024; based on the MCC buffer size.  Here is the code:
- Ethernet/MCC driver for Linux: pass packets from MCC to Linux TCP/IP stack
- TTY MCC interface.


The reason for doing this:

  1. Applications on the M4 side need a configuration file or script for startup:
    1. Can use TFTP
      1. Setup a TFTP server on the Linux side, M4 can get or write files
    2. Syslog
      1. Create a syslog forwarder on M4, now message so up in Linux log
    3. One MCC port can transport several different messages to several different apps without any forwarder or mux.  TCP/IP uses port numbers for each app. 

Here is a link to a basic drawing of MCC TCP/IP:


No comments:

Post a Comment