The Network interface for the UAV dev board (UDB) allows for a versitile, easy and fast access to data within the UDB. It supports TCP and UDP connections in either Server or Client modes. There are three hardware platforms supported all based on Microchip SPI external PHYs: one is WiFi and the other two are Ethernet. As of this writing the IP stack and it's accompaning modules are located in branches/MatrixPilot_IP/Microchip/TCPIP and branches/MatrixPilot_IP/MyIpNetwork. For now it is in MatrixPilot_IPAfter further testing has been performed it will be merged to trunk.
Due to limited program memory in older UDB hardware, only the UDB4 or newer hardware platforms are supported.
Some fine print: The TCP/IP stack used is maintained by Microchip and its license states that it is free to use as long as it is used with either a Microchip microprocessor or with one of their PHYs.
There are three external SPI PHYs that are supported. They are: MRF24WG0Mx - WiFi 802.11b/g x=A is for a built-in antenna for short-range. x=B uses an external antenna for longer range. ENC624J600 - Ethernet 10/100 MBit ENC28J60 - Ethernet 10 MBit
= Configuring MatrixPilot-IP To configure the IP library, and it's accompanining modules, use the following files: MatrixPilot/options.h - enable IP by selecting PHY and MatrixPIlot-IP modules MyIpNetwork/MyIpOptions.h - configure MatrixPilot-IP modules: assign IP type (TCP/UDP), ports and server IPs MyIpNetwork/HardwareProfile.h - hardware pin assignments for MCHP Stack MyIpNetwork/TCPIP.h - Microchip TCP/IP stack config for stock library options such as DHCP, static IP, MAC addess, ping, FTP MyIpNetwork/WF_Config.h - Microchip TCP/IP stack config for WiFi options such as SSID and security passphrase
The first step of installation is options.h. It is where you can enable/disable the entire IP stack for use with MatrixPilot by choosing which external PHY you are using. Enable it by defining them as (1) instead of (0). ONly one can be used at a time.
#define USE_WIFI_MRF24WG (0) #define USE_ETHERNET_ENC624J600 (0) #define USE_ETHERNET_ENC28J60 (0)
Next you'll want to enable which modules to use. // Select which Network modules you would like to Enable #define NETWORK_USE_UART1 (0) // Forward UART1 data #define NETWORK_USE_UART2 (0) // Forward UART2 data #define NETWORK_USE_FLYBYWIRE (0) // Joystick -> flght surfaces (over the internet!) #define NETWORK_USE_MAVLINK (0) // Forward MAVLink data #define NETWORK_USE_DEBUG (0) // Debug - Simple Telnet in ASCII #define NETWORK_USE_ADSB (0) #define NETWORK_USE_LOGO (0) #define NETWORK_USE_CAM_TRACKING (0) // Camera Tracking, also set CAM_USE_EXTERNAL_TARGET_DATA=1 #define NETWORK_USE_GPSTEST (0) // GPS spoof testing #define NETWORK_USE_PWMREPORT (0) // PWM pin states #if (NETWORK_USE_UART2 == 1) { {},0,0,0,0,0,0,0,0, eSourceUART2,eTCP, "www.google.com", 23}, { {},0,0,0,0,0,0,0,0, eSourceUART2,eTCP, "74.125.224.82", 24}, { {},0,0,0,0,0,0,0,0, eSourceUART2,eTCP, NULL, 25}, { {},0,0,0,0,0,0,0,0, eSourceUART2,eUDP, NULL, 26}, #endif