Changes between Version 21 and Version 22 of Hardware/jCM/dCM3/cSoftware


Ignore:
Timestamp:
Dec 19, 2011, 7:23:07 PM (12 years ago)
Author:
Ilya Chigirev
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Hardware/jCM/dCM3/cSoftware

    v21 v22  
    11[[TOC(Hardware/cCM/cCM3/*, depth=3)]]
    22
    3 == Software Description ==
     3=== Software Description ===
    44As mentioned previously software for the CM3 is developed in the Paradigm C++ Pro programming environment, and uses the Lantronix XPort AR SDK. At the time of this documents writing the SDK being used was release v5.2.0.0 R21. The CM3 works completely independently from the host node, and as soon as power is applied the native Lantronix XPort AR functions, such as network connectivity, start and then the custom
    55written CM software loads.
    66 
    7 === Files ===
     7==== Files ====
    88The following is a list of the basic files that are in the SVN repository, and what functionality they contain:
    99 * CM3 - Initialization of the CM3, XML configuration, and the main program which runs the two primary threads
     
    1616 * CM3_UDP - Where the UDP thread functions are defines, as well as any other functions that process UDP information.
    1717
    18 === Initialization ===
     18==== Initialization ====
    1919Upon startup the CM3 will fist contact broadcast over the network to discover the IP address that should belong to it. Assuming that the MAC address is already in DHCP, an IP address will be assigned to it, and from there the custom CM3 software takes over. Much of the configuration of the device is done through the XML configuration method. [[BR]]
    2020
     
    2727interface for the CM3, as described in table 2, and the user datagram protocol (UDP) socket.
    2828
    29 === UDP ===
     29==== UDP ====
    3030Once the UDP socket is opened two threads are opened that run side by side. The first is udpListen(), which is the thread that monitors the UDP socket for incoming packets. Once a packet is received the thread checks for valid CM packet structure and proceeds to act accordingly if it is. [[BR]]
    3131The other thread that is opened is udpPkt(). udpPkt() is the function that is responsible for sending registration and status packets. Initially the function will send out registration packets, until it gets a registration ACK, and then a status update packet every 20 seconds. If the CM sends out 3 status update packets and does not receive an ACK from the CMC, it will go back to the assumption that it is no longer registered in the CMC and send out registation packets again. The two UDP threads are responsible for most of the functionality of the CM3 as the majority of commands come from the experiment controller through the CMC over the UDP lines. HTTP and CLI commands are added functionality for when there is no CMC.
    3232
    33 === Flashing Firmware ===
     33==== Flashing Firmware ====
    3434There are two primary methods to reflash a CM3, over the network and also through the serial port. This section will describe how to load new firmware onto the device using both methods. The latest 'known good image' can always be found on the [http://www.orbit-lab.org/browser/CM3/trunk/images SVN Repository]
    3535
    36 ==== Flashing firmware over network ====
     36===== Flashing firmware over network =====
    3737 1. open FTP session directly to the CM Lantronix device in terminal client
    3838{{{
     
    5050 * The image '''must be''' sent to the Xpor AR named xport_ar.rom.gz, otherwise the device will not recognize it as new firmware and will not re-flash. Re-flashing the device will take a few minutes, it will reset itself and should come back online with no issues.
    5151
    52 ==== Flashing firmware over serial ====
     52===== Flashing firmware over serial =====
    5353Re-flashing as CM over the serial port should be done when the node is not accessible aver the network, it is a generally slower method than via FTP. Before you can recover the firmware over serial you will need to install Device Installer on your PC. Device Installer is free to download off the lantronix website, and can be found [http://ltxfaq.custhelp.com/app/answers/detail/a_id/644 here].
    5454