No announcement yet.

Points to clarify before starting a project

  • Filter
  • Time
  • Show
Clear All
new posts

  • Points to clarify before starting a project

    The goal of my project is quite "easy", but working in a "reverse way" than most of the described projects :

    We need to get from a central web server parameters for a local serial device D.

    We plan to use xport-pro and write a cgi-bin C program to do the following tasks :

    1) Read the device serial number via RS232
    2) Do a http query to the central web server to get the parameters for the device (with the device serial number as a key)
    3) store locally in the xml local storage the values of the parameters (5 to 10 parameters)
    4) write on the serial port the values of the parameters
    5) wait for the next synchronisation at a given hour (the next launch hour is one of the parameter we get), and then execute tasks 2/3/4/6
    6) check if an update of the program is available on a remote ftp server, if yes, do a FTP transfert to get it and update it

    I think 1 single C program implementing SDKmain and several thread would be the smartest solution.
    I have a few interrogations about how works the xport-pro with EvolutionOS ? Is there a task scheduler or do i need to do a "wait thread" like imagined in point 5 above ?
    for the program update how to do it ? can i do a ftp query just to replace my own program (while it is executed ?) or do i need to prepare a new romz containing the new program and config file and do firmware update ?

  • #2
    Hi Christophe,

    1) reading data from the serial is easy and straightforward. In the configuration you should disable the tunnel for this serial interface
    2) Doing a http query and waiting for the answer has to be done by your program based on a TCP connection. The Evos provides only a web server, but no web client.
    3) Storing in RAM is trival. If you want to store it failsafe you need to open a file in the flash filesystem and storre it there.
    4) writing to the serial is same as reading.
    5) no problem
    6) The XPort Pro provides you with a ftp server, but not with a ftp client.
    You can transfer a file from a remote location to the XPort Pro flash filesystem. If it has the right name (xport_pro.romz) it is recongnized as firmware file and the Xport Pro firmware is replaced with the send one.
    There is no API to the FTP server

    In SDKmain you have spawn the threats you need. SDKmain is in the boot path and you have to finish SDKmain other wise the boot will never finish.

    Lantronix FAE EMEA


    • #3
      Is there a possibility to see what is provided by the API ?
      (API documentation ?)
      TFTPGet seems to enable to download a file from a remote server by example

      Most of what I have done seems clear and "do-able" in the time I have.
      I'm going to swap to windows (I'm working usually on Linux) and download the EOS SDK to see what is in and check the various samples.


      • #4
        Project mostly done

        Hello !

        My program is now done.

        I have done in it a ligth http client implementation.

        my "http-get" gets periodically (period is one of the parameters) from a central DB with the xport serialnumber as a key :
        - raw datas (private configuration data, stored locally on the xport filesystem)
        - xcr datas (the php script on the central server side generates either raw data or xcr records from data fetched in a mysql DB)
        - firmware update

        the private data are then sent by serial (RS485) to the electronic device.

        nice program

        If some of you need a freelance developer for such a project, feel free to contact me ([email protected]) I speak french and english.
        I have invested a lot to learn EvolutionOS for this small project for a customer. I will be pleased to re-use my knowledge of EvolutionOS for other projects. I work in home office from Cahors,France.