Join Today
+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 14
  1. #1

    Default Network access from C++

    Does anyone know of a way to download files from specifc URLs to the e680i phone, from C++ or bash? I tried wget in a shell script but it's not working for some reason I don't get. Even worse, how do I get data directly from a socket, more precisely if I have a web service working and I call its HTTP URL and this HTTP request returns an XML file, how do I grab this file/data, using EZX? Any ideas?

  2. #2

    Default Re: Network access from C++

    Ok I kinda figured what part of the problem was: there's no implementation of the HTTP protocol with the EZX version I'm using, which comes with Qt 2.3.6 which comes with an implementation of the FTP protocol only, and another one but not HTTP! Does anyone know of the Qt version that comes with the EZX download on this website? And I guess wget doesn't come with the phone's OS, is there an alternative which works on the phone?

  3. #3

    Default Re: Network access from C++


  4. #4

    Default Re: Network access from C++

    Not sure if it'll work with e680i but I'll give it a try. Any idea how I can call wget from c++?

  5. #5

    Default Re: Network access from C++

    busybox works fine w/ e680i; and if you want a call from c++ i've used system("/diska/.system/bin/busybox XX"); and it worked just fine (you may or may not have to prepend the path to busybox depending on how you start the app)

    hey... this has the potential for a nice user-friendly package installer (assuming that the user can get a open inet connection); what did you have in mind for such an app (if you can share it)?

  6. #6

    Default Re: Network access from C++

    I needed to get the XML file returned from a web service HTTP call for parsing; I mean if I can do that from C++ then I'll be able to create an application that calls any web service and actually uses it. With that working, the possibilities are limitless: I have access to any web service! But since EZX's Qt doesn't exactly provide HTTP handling, I'd have to write my own HTTP C++ module or just go for an easier way of downloading the XML to the mobile and parsing it, which is what busybox would provide with wget and C++'s system() call.

  7. #7

    Default Re: Network access from C++

    i can't remember exactly where now, but somewhere in the a780 forum i recall someone doing some work w/ setting up sockets for http access as a potential workaround for kvm limitations.

    also, you might want to check out opie source, as long as its not conflicting w/ an exisiting EZX socket opie has no problems as far as i know w/ sockets and can get my phone to the internet easier (w/o the gprs restrictions on opera and the kvm).

    i'm not familiar w/ the limitations of wget (or the version that's included in busybox), but if you need something more flexible/controllable i'm sure its possible. keep up the good work, we can all share in your learning

  8. #8

    Default Re: Network access from C++

    Yeah, wget might be a bit clumsy to use. I'm currently writing a GUI wrapper for some command line apps and the code I produce is ugly. (But maybe thats my fault).

    Anyway, instead of using wget, what about using an existing HTTP/whatever library by compiling it for ezx?

    libcurl should be good for that, but other options exist, too.

    Kosta

  9. #9

    Default Re: Network access from C++

    Well this is possible but usually these libraries don't build very well with EZX. I tried several libraries for different software and I ended up with the "incompatible modules" error from the compiler when it's linking. A library such as curl depends on lots of other libraries and finding versions that are compatible with EZX is quite difficult.

    I think I found a way around this: searching the web I came across the source code for Qt (Qt already handles HTTP but not the one that comes with EZX) so I examined the source code and surely enough the class qhttp exists (it's built using sockets and these are already supported). I think compiling this class won't be difficult.

    Well turns out a lot of work is required to get this working with EZX's Qt if at all. Anyone already tried doing that?

    Quote Originally Posted by rpconnect
    i'm not familiar w/ the limitations of wget (or the version that's included in busybox), but if you need something more flexible/controllable i'm sure its possible.
    It is indeed limited; wget didn't understand something like this: http://server.com/rest/RestWebServic...temsperpage=10
    Complains about the "form?page=1&itemsperpage=10" part but surely enough works fine till the .aspx part. Running Linux's wget system call on the same URL, it works fine and saves the result to an XML file (which is what the URL returns).

  10. #10

    Default Re: Network access from C++

    Hi!

    I tried compiling libcurl and it worked without any problems. It can be downloaded from here.

    I think I found a way around this: searching the web I came across the source code for Qt (Qt already handles HTTP but not the one that comes with EZX)
    This might be very well possible, if you succeed, please share.

    It is indeed limited; wget didn't understand something like this: server.com/rest/RestWe...perpage=10

    Complains about the "form?page=1&itemsperpage=10" part but surely enough works fine till the .aspx part. Running Linux's wget system call on the same URL, it works fine and saves the result to an XML file (which is what the URL returns).
    Did you escape the string correctly? Otherwise your shell will expand stuff you dont want expanded. What is a wget system call? Do you mean popen() or exec()ing wget?

    HTH,
    Kosta


 
+ Reply to Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. need help with network
    By Casper in forum Windows
    Replies: 0
    Last Post: 02-26-2009, 08:29 AM
  2. Need network help
    By RLKramer in forum A1200 General Chat
    Replies: 2
    Last Post: 06-25-2008, 02:23 AM
  3. O2 Network
    By rkc888 in forum A1200 General Chat
    Replies: 2
    Last Post: 05-14-2006, 08:48 PM
  4. Network problem: foreign network HELP
    By ittercity in forum A780 General Chat
    Replies: 0
    Last Post: 11-15-2005, 06:17 AM
  5. network name?
    By hiaceminibus in forum E680 General Chat
    Replies: 14
    Last Post: 04-27-2005, 12:01 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Single Sign On provided by vBSSO

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1