Menu

#43 No work minidla with Asus Zenfone2

v1.0 (example)
open
None
5
2018-01-03
2015-09-20
No

No connecting to minidla server from ASUS ZenFone2_last-custom-firmware (Good connecting\working from Samsung s4, HTC Sensation, Samsung TV)

[2015/09/20 02:25:26] sql.c:88: error: prepare failed: near "als": syntax error
SELECT (select count(distinct DETAIL_ID) from OBJECTS o left join DETAILS d on (o.DETAIL_ID = d.ID) where (OBJECT_ID glob '$') and (( o.CLASS like "item.audioItem%" ) and REF_ID als)) + (select count() from OBJECTS o left join DETAILS d on (o.DETAIL_ID = d.ID) where (OBJECT_ID = '') and (( o.CLASS like "item.audioItem%" ) and REF_ID als))
[2015/09/20 02:25:26] upnpsoap.c:1967: warn: Returning UPnPError 708: Unsupported or invalid search criteria

Discussion

  • Shrimpkin

    Shrimpkin - 2015-10-12

    What dlna client are you using?

    For android, I use an opensource client Slick UPnP by Casper Jørgensen.

     
    • Evgeniy Bondarenko

      Standart Plaer on firrmware Asus ZenUI
      Musik -> network media server(music) or Gallery -> network media server(video/photo)
      Dlna serrver - finded, but no open.

       
  • Shrimpkin

    Shrimpkin - 2015-10-14

    I don't have an ZenUI and probably can't help but you can always post the relevant debugging log entries for your device by running in debug mode with -d -v options.

     
    • Evgeniy Bondarenko

      This log from minidlna server vith debuging mode.
      Version 1.1.4

       
  • Justin Maggard

    Justin Maggard - 2015-10-29

    We'd need both "SearchCriteria:" and "Translated SearchCriteria:" information.

     
  • JCA

    JCA - 2017-11-29

    Hi !
    I know that the topic is 2 years old but I have the same problem with my Asus Gallery App on my Asus ZenFone3 Max. Here is some debug logs :

    [2017/11/29 16:38:48] minidlna.c:1302: debug: HTTP connection from 192.168.1.29:60800
    [2017/11/29 16:38:48] clients.c:332: debug: Client found in cache. [Generic DLNA 1.5/entry 1]
    [2017/11/29 16:38:48] upnphttp.c:889: debug: HTTP REQUEST: POST /ctl/ContentDir HTTP/1.1
    Host: 192.168.1.42:8200
    User-Agent: UPnP/1.0 DLNADOC/1.50 AwoX/1.1
    SOAPACTION: "urn:schemas-upnp-org:service:ContentDirectory:1#Search"
    Content-Type: text/xml; charset="utf-8"
    Content-Length: 535
    
    [2017/11/29 16:38:48] clients.c:332: debug: Client found in cache. [Generic DLNA 1.5/entry 1]
    [2017/11/29 16:38:48] upnphttp.c:670: debug: SOAPAction: urn:schemas-upnp-org:service:ContentDirectory:1#Search
    [2017/11/29 16:38:48] upnpsoap.c:2181: debug: SoapMethod: Search
    [2017/11/29 16:38:48] upnpsoap.c:1793: debug: Searching ContentDirectory:
     * ObjectID: 0
     * Count: 10
     * StartingIndex: 0
     * SearchCriteria:   (  upnp:class derivedfrom "object.item.imageItem"  ) and @refID exists fals
     * Filter: *
     * SortCriteria: (null)
    [2017/11/29 16:38:48] upnpsoap.c:1807: debug: Translated SearchCriteria: (  o.CLASS like "item.imageItem%"  ) and REF_ID als
    [2017/11/29 16:38:48] sql.c:88: error: prepare failed: near "als": syntax error
    SELECT (select count(distinct DETAIL_ID) from OBJECTS o left join DETAILS d on (o.DETAIL_ID = d.ID) where (OBJECT_ID glob '*$*') and ((  o.CLASS like "item.imageItem%"  ) and REF_ID als)) + (select count(*) from OBJECTS o left join DETAILS d on (o.DETAIL_ID = d.ID) where (OBJECT_ID = '*') and ((  o.CLASS like "item.imageItem%"  ) and REF_ID als))
    [2017/11/29 16:38:48] upnpsoap.c:123: warn: Returning UPnPError 708: Unsupported or invalid search criteria
    [2017/11/29 16:38:48] upnphttp.c:1225: debug: HTTP RESPONSE: HTTP/1.1 500 Internal Server Error
    Content-Type: text/xml; charset="utf-8"
    Connection: close
    Content-Length: 422
    Server: 4.9.29-10-osmc DLNADOC/1.50 UPnP/1.0 MiniDLNA/1.2.1
    Date: Wed, 29 Nov 2017 15:38:48 GMT
    EXT:
    

    Can you take a look at this ?

    Thanks in advance !

    Jisay

     
  • Shrimpkin

    Shrimpkin - 2017-12-08

    The SearchCriteria bool should be "false" but is "fals". The problem is most likely with the client. You can apply this patch and post the results to verify that minidlna is not at fault.

    diff --git a/upnpsoap.c b/upnpsoap.c
    index 441da98..fe23b24 100644
    --- a/upnpsoap.c
    +++ b/upnpsoap.c
    @@ -1306,6 +1306,7 @@ BrowseContentDirectory(struct upnphttp * h, const char * action)
            args.client = h->req_client ? h->req_client->type->type : 0;
            args.flags = h->req_client ? h->req_client->type->flags : 0;
            args.str = &str;
    +       DPRINTF(E_DEBUG, L_HTTP, "Browse XML request\n%*.*s\n", 0, h->req_contentlen, h->req_buf+h->req_contentoff);
            DPRINTF(E_DEBUG, L_HTTP, "Browsing ContentDirectory:\n"
                                     " * ObjectID: %s\n"
                                     " * Count: %d\n"
    @@ -1782,6 +1783,7 @@ SearchContentDirectory(struct upnphttp * h, const char * action)
            args.client = h->req_client ? h->req_client->type->type : 0;
            args.flags = h->req_client ? h->req_client->type->flags : 0;
            args.str = &str;
    +       DPRINTF(E_DEBUG, L_HTTP, "Search XML request\n%*.*s\n", 0, h->req_contentlen, h->req_buf+h->req_contentoff);
            DPRINTF(E_DEBUG, L_HTTP, "Searching ContentDirectory:\n"
                                     " * ObjectID: %s\n"
                                     " * Count: %d\n"
    
     
  • JCA

    JCA - 2017-12-31

    Hi !

    Thanks for your answer and sorry for the delay of mine :-)

    Here is the output of logs with your patch applied :

    [2017/12/31 15:54:31] upnpsoap.c:1786: debug: Search XML request
    <?xml version="1.0" encoding="utf-8"?><s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><u:Search xmlns:u="urn:schemas-upnp-org:service:ContentDirectory:1"><ContainerID>0</ContainerID><SearchCriteria>  (  upnp:class derivedfrom &quot;object.item.imageItem&quot;  ) and @refID exists false </SearchCriteria><Filter>*</Filter><StartingIndex>0</StartingIndex><RequestedCount>10</RequestedCount><SortCriteria></SortCriteria></u:Search></s:Body></s:Envelope>
    [2017/12/31 15:54:31] upnpsoap.c:1795: debug: Searching ContentDirectory:
     * ObjectID: 0
     * Count: 10
     * StartingIndex: 0
     * SearchCriteria:   (  upnp:class derivedfrom &quot;object.item.imageItem&quot;  ) and @refID exists fals
     * Filter: *
     * SortCriteria: (null)
    [2017/12/31 15:54:31] upnpsoap.c:1809: debug: Translated SearchCriteria: (  o.CLASS like "item.imageItem%"  ) and REF_ID als
    

    I don't find "Browse XML request" in logs.

    Seems that SearchCriteria is formatted in the right way :-S

    Thanks again,

    Jisay

     

    Last edit: JCA 2017-12-31
    • Shrimpkin

      Shrimpkin - 2018-01-01

      Looks like there is a problem with the xml parsing library and white space. It has been fixed upstream at http://miniupnp.free.fr.

      Try this patch:

      diff --git a/minixml.c b/minixml.c
      index 2fed4a1..bf3fc0f 100644
      --- a/minixml.c
      +++ b/minixml.c
      @@ -143,7 +143,7 @@ void parseelt(struct xmlparser * p)
                              return;
                          while( IS_WHITE_SPACE(*p->xml) )
                          {
      -                       p->xml++;
      +                       i++; p->xml++;
                              if (p->xml >= p->xmlend)
                                  return;
                          }
      

      Dev note: minixml.[c,h] could be updated to upstream miniupnp by handling XML_STORE_EMPTY_FL flag (looks obsolete?). Although, I have not verified with the functions in upnpsoap.c that use the flag.

       
  • JCA

    JCA - 2018-01-02

    Hello !

    I tried your patch and it seems to work ! :-)

    Thanks for the help !

    Jisay

     
  • Justin Maggard

    Justin Maggard - 2018-01-03

    Thanks, I've checked in that fix. XML_STORE_EMPTY_FL is necessary, so we can't blindly replace minixml.c.

     
    • Shrimpkin

      Shrimpkin - 2018-01-04

      Forgot to check git history logs. Shows the flag as being part of the forked code. Initially, I thought the flag might of been part of the library but didn't have time to look into it more. FYI, the fix for OP has been available upstream since 2011.

       

Log in to post a comment.