Announcement

Collapse
No announcement yet.

XML file upload trouble, xPico Wifi

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • XML file upload trouble, xPico Wifi

    Hello,
    I have a trouble with configuration xml file. This file I used in the past and all was well. The last days I get result:

    Code:
    C:\Dropbox\Fire\xPico WiFire\Update instalatortor\Ofen Innovativ Update Tool\OI_0_0_0\Data>curl -u admin:PASSWORD http://192.168.0.1/import/config -X POST --form [email protected]
    <?xml version="1.0" standalone="yes"?>
    <!-- Automatically generated XML -->
    <!DOCTYPE function [
       <!ELEMENT function (return)>
       <!ELEMENT return (result,message+)>
       <!ELEMENT result (#PCDATA)>
       <!ELEMENT message (#PCDATA)>
       <!ATTLIST function version CDATA #IMPLIED>
    ]>
    <function version = "0.1.0.0">
       <return>
          <message>ERROR: Expected &quot;&lt;&quot;.</message>
          <message>ERROR: XML parsing failed at line 16.</message>
          <message>ERROR: XML import failed.</message>
          <result>Failed</result>
       </return>
    </function>
    The file I am sending to xPico ( the same I was sending in the past):

    Code:
    <?xml version="1.0" standalone="yes"?>
    <!-- Automatically generated XML -->
    <!DOCTYPE configrecord [  
    <!ELEMENT configrecord (configgroup+)>
    <!ELEMENT configgroup (configitem+)>
    <!ELEMENT configitem (value+)>
    <!ELEMENT value (#PCDATA)>
    <!ATTLIST configrecord version CDATA #IMPLIED>
    <!ATTLIST configgroup name CDATA #IMPLIED>
    <!ATTLIST configgroup instance CDATA #IMPLIED>
    <!ATTLIST configitem name CDATA #IMPLIED>
    <!ATTLIST configitem instance CDATA #IMPLIED>
    <!ATTLIST value name CDATA #IMPLIED>
    ]>
    <configrecord version = "0.1.0.1">
        <configgroup name = "Access Point" instance = "ap0">
            <configitem name = "SSID">
                <value>OFEN-%-6s</value>
            </configitem>
            <configitem name = "Passphrase">
                <value>innovativ</value>
            </configitem>
        </configgroup>
        <configgroup name = "Clock">
            <configitem name = "Source">
                <value>NTP</value>
            </configitem>
            <configitem name = "UTC Offset">
                <value>60</value>
            </configitem>
        </configgroup>
        <configgroup name = "HTTP Server">
            <configitem name = "Access Control" instance = "1">
                <value name = "AuthType">None</value>
            </configitem>
        </configgroup>
        <configgroup name = "Interface" instance = "wlan0">
            <configitem name = "Hostname">
                <value>ofen</value>
            </configitem>
        </configgroup>
        <configgroup name = "Line" instance = "1">
            <configitem name = "Name">
                <value>uart1Web</value>
            </configitem>
            <configitem name = "Protocol">
                <value>None</value>
            </configitem>
        </configgroup>
        <configgroup name = "Line" instance = "2">
            <configitem name = "Name">
                <value>uart2Server</value>
            </configitem>
            <configitem name = "Protocol">
                <value>Tunnel</value>
            </configitem>
        </configgroup>
        <configgroup name = "Tunnel Connect" instance = "2">
            <configitem name = "Mode">
                <value>Any Character</value>
            </configitem>
            <configitem name = "Connections">
                <value>Simultaneous</value>
            </configitem>
        </configgroup>
    </configrecord>
    What is wrong? I do not see...

    The file is sending to xPico by BAT file:

    Code:
    set hostIP=192.168.0.1
    set address=%cd%
    cd %address%\Data
    rem "Clearing files space..."
    curl -u admin:PASSWORD --anyauth -X POST -d "group=File System&action=Format" http://%hostIP%/action/status
    rem "Creating folders..."
    curl -u admin:PASSWORD http://%hostIP%/fs/http -X MKCOL
    curl -u admin:PASSWORD http://%hostIP%/fs/http/src -X MKCOL
    rem "Instaling media files..."
    curl -u admin:PASSWORD http://%hostIP%/fs/http/src/ -T back.png
    curl -u admin:PASSWORD http://%hostIP%/fs/http/src/ -T black.png
    curl -u admin:PASSWORD http://%hostIP%/fs/http/src/ -T digestor.png
    curl -u admin:PASSWORD http://%hostIP%/fs/http/src/ -T domov.png
    curl -u admin:PASSWORD http://%hostIP%/fs/http/src/ -T enter.png
    curl -u admin:PASSWORD http://%hostIP%/fs/http/src/ -T graf.png
    curl -u admin:PASSWORD http://%hostIP%/fs/http/src/ -T help.png
    curl -u admin:PASSWORD http://%hostIP%/fs/http/src/ -T ikony.gif
    curl -u admin:PASSWORD http://%hostIP%/fs/http/src/ -T info.png
    curl -u admin:PASSWORD http://%hostIP%/fs/http/src/ -T innovativ.gif
    curl -u admin:PASSWORD http://%hostIP%/fs/http/src/ -T nadrz.gif
    curl -u admin:PASSWORD http://%hostIP%/fs/http/src/ -T param.gif
    curl -u admin:PASSWORD http://%hostIP%/fs/http/src/ -T png.png
    curl -u admin:PASSWORD http://%hostIP%/fs/http/src/ -T sett.png
    curl -u admin:PASSWORD http://%hostIP%/fs/http/src/ -T wifi1.png
    curl -u admin:PASSWORD http://%hostIP%/fs/http/src/ -T wifi2.png
    curl -u admin:PASSWORD http://%hostIP%/fs/http/src/ -T wifi3.png
    curl -u admin:PASSWORD http://%hostIP%/fs/http/src/ -T wifi4.png
    rem "Instaling system files..."
    curl -u admin:PASSWORD http://%hostIP%/fs/http/ -T favicon.ico
    curl -u admin:PASSWORD http://%hostIP%/fs/http/ -T config.js
    curl -u admin:PASSWORD http://%hostIP%/fs/http/ -T config.html
    curl -u admin:PASSWORD http://%hostIP%/fs/http/ -T fc.html
    curl -u admin:PASSWORD http://%hostIP%/fs/http/ -T graf.html
    curl -u admin:PASSWORD http://%hostIP%/fs/http/ -T set.html
    curl -u admin:PASSWORD http://%hostIP%/fs/http/ -T style.css
    curl -u admin:PASSWORD http://%hostIP%/fs/http/ -T wifireLibV1.js
    curl -u admin:PASSWORD http://%hostIP%/fs/http/ -T xpwLibXv2.js
    curl -u admin:PASSWORD http://%hostIP%/fs/http/ -T innovativ.js
    curl -u admin:PASSWORD http://%hostIP%/fs/http/ -T index.html
    curl -u admin:PASSWORD http://%hostIP%/fs/http/ -T index1.html
    rem "Checking or instaling config file..."
    curl -u admin:PASSWORD http://%hostIP%/import/config -X POST --form [email protected]
    pause
    Please help me...
    Last edited by FireControls; 09-14-2017, 05:48 PM.

  • #2
    I just tried importing the XML file that you posted, and it worked fine. Is it possible that the file has some extraneous non-printable characters?

    Comment


    • #3
      No. I have the simmilar file, only name of access point and password are different. This XML work - sometimes. I compare this two files in binary editor (010editor) and they are the same without the name and password string.
      When I show hiden characters in Notepad++, all is ok.

      I update curl but when I try upload xml on other PC without changes the result is bad too. On this PC work xml upload ok in the past too.
      I try upload new three other xPico module. All upload ok (http files...) only xml failed.
      I try create new file and past the xml text in - result: failed.

      Is there some mandatory parameters for xml file? Coding or something. my xml is UTF-8 without BOM.

      Comment


      • #4
        Which firmware are you using? Is it 1.5 or 1.4? If it is 1.5, you may want to do the reset and export the xml because we have added some new configs in 1.5. You can have a try to open the xml file from Notepad++. Some editors may add the space automatically and this may cause the problem as well like Mariano mentioned.

        Comment


        • #5
          I use 1.5, because the 1.4 have the bug with network scanning when user index.html is used.
          link of hiden characters:
          www.paletka.sk/TEMP/Screenshot.png


          link of config:
          www.paletka.sk/TEMP/xml_config.txt
          link of status:
          www.paletka.sk/TEMP/xml_status.txt

          Comment

          Working...
          X