×

Discussion Board

Results 1 to 13 of 13
  1. #1
    Regular Contributor
    Join Date
    Nov 2010
    Posts
    51

    My app works in the simulator but in the device NO. HELP :(

    Hello,

    I have an application that sends a UDP datagram, and one who receives it.
    In the simulator works, but when it happened to my nokia N95 8 gb, no
    work. I have the .pro with the QT + = NETWORK, and TARGET.CAPABILITIES + =
    NetworkServices.

    When I test it on the devices, it asks me to choose a connection for
    connect (WLAN) is connected, but does not communicate with other program
    that is running on my computer. I tested with two simulators
    two computers and it works.

    The application is self-signed, but I have also signed with open
    signed online (https: / / www.symbiansigned.com / app / page), and also not work.

    Anyone can help me?

    Thanks.

  2. #2
    Nokia Developer Champion
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: My app works in the simulator but in the device NO. HELP :(

    First question: How do you know it's not working? (Symptoms??)

    Second question: Have you run it with the debugger to see where your code goes awry? Or at least inserted some sort of debug trace?

    Third question: Are you accessing any data files in the execution of your program?

  3. #3
    Regular Contributor
    Join Date
    Nov 2010
    Posts
    51

    Re: My app works in the simulator but in the device NO. HELP :(

    Hi!!, Thanks for answering.

    The code I use is this: (Examples QT Nokia)

    Receiver: http://doc.qt.nokia.com/latest/netwo...treceiver.html

    Sender: http://doc.qt.nokia.com/latest/netwo...astsender.html

    First Answer: It does not work out because it received messages. Probe the two programs (each on a PC) in the simulator qt, and it works, and test a program (recevied or sender) in the PC and one on my phone N95, and that sent from the mobile PC is less than , or sent from your PC does not reach the phone. Those are the symptoms.

    Second Answer: Do not know how to use the debugger with the phone. I have several messages for the code, (qDebug), I can only see in the program being run from the PC. For example if I cast datagrams from the mobile to receive the PC, the SIGNAL jumps never have gotten the message.

    Third Answer: What do you mean?, use the code that you attached by link above.

  4. #4
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: My app works in the simulator but in the device NO. HELP :(

    Quote Originally Posted by erespia2 View Post
    First Answer: It does not work out because it received messages. Probe the two programs (each on a PC) in the simulator qt, and it works, and test a program (recevied or sender) in the PC and one on my phone N95, and that sent from the mobile PC is less than , or sent from your PC does not reach the phone. Those are the symptoms.
    These examples are using local network UDP broadcast messages. On the other hand, your phone and PC do not form local network (you can check phone and PC IP addresses to ensure that).

  5. #5
    Regular Contributor
    Join Date
    Nov 2010
    Posts
    51

    Re: My app works in the simulator but in the device NO. HELP :(

    Quote Originally Posted by divanov View Post
    These examples are using local network UDP broadcast messages. On the other hand, your phone and PC do not form local network (you can check phone and PC IP addresses to ensure that).
    I have connected my PC (laptop) for my WiFi router. The phone also I have it connected via WiFi to my router. The two are on the same network, is not it?, my laptop's IP is 192.168.1.33, and my phone is 192.168.1.34

  6. #6
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: My app works in the simulator but in the device NO. HELP :(

    Try QString QIODevice::errorString() aftrer writeDatagram() and readDatagram().

  7. #7
    Regular Contributor
    Join Date
    Nov 2010
    Posts
    51

    Re: My app works in the simulator but in the device NO. HELP :(

    Quote Originally Posted by divanov View Post
    Try QString QIODevice::errorString() aftrer writeDatagram() and readDatagram().

    How??

    I'm testing after:

    connect (udpSocket, SIGNAL (readyRead ()), this,
    SLOT (processPendingDatagrams ()));

    and after:

    udpSocket-> writeDatagram (datagram.data (), datagram.size (),
    QHostAddress:: Broadcast, 9050);
    A place:

    qDebug () <<QIODevice:: errorstring ();


    And I get an error that it takes an object.
    But when I create an object as QIODevice aux;
    Will not let me because it is abstract or something like that.

    As would prove?, Sorry for my ignorance

    Thanks

  8. #8
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: My app works in the simulator but in the device NO. HELP :(

    Code:
    qDebug() << udpSocket->errorString();

  9. #9
    Regular Contributor
    Join Date
    Nov 2010
    Posts
    51

    Re: My app works in the simulator but in the device NO. HELP :(

    Quote Originally Posted by divanov View Post
    Code:
    qDebug() << udpSocket->errorString();
    Ok.

    I get this message on the console:

    [Qt Message] "Unable to send a message"

    Every time you send a datagram, the sender.

    In the server, this message on the console:

    [Qt Message] "Unknown error"

    Is there a solution?

    The same holds for the sign, since the run in through the Qt Creator
    TRK for the phone, it runs with self-sign signature. But I tried
    also to sign it (open signed), the. sis, separately and install it
    the phone, and still not working. If I install it directly on the phone,
    I have no option to use qDebug ().

    This is my file. pro:

    QT += network

    TARGET = broadcastsender
    TEMPLATE = app


    SOURCES += main.cpp\
    sender.cpp

    HEADERS += sender.h

    CONFIG += mobility
    MOBILITY =

    symbian {
    TARGET.UID3 = 0xe85a5a74
    TARGET.CAPABILITY += LocalServices NetworkServices ReadUserData UserEnvironment WriteUserData
    TARGET.EPOCSTACKSIZE = 0x14000
    TARGET.EPOCHEAPSIZE = 0x020000 0x800000
    }

  10. #10
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: My app works in the simulator but in the device NO. HELP :(

    You can use QMessageBox::information() instead of qDebug(). However, problem is unlikely related to signing.

  11. #11
    Regular Contributor
    Join Date
    Nov 2010
    Posts
    51

    Re: My app works in the simulator but in the device NO. HELP :(

    Quote Originally Posted by divanov View Post
    You can use QMessageBox::information() instead of qDebug(). However, problem is unlikely related to signing.
    I get the same problem. Install the app on your phone, signing I did a certificate through the OPDA only for my IMEI phone. I get the list of available WLAN to connect to. I connect my network, appears on the screen phone, the icon connected, and when I send the datagram, still get the same error.

    Every time you send a datagram

    "Unable to send a message"

    What can be happening?

    I greatly appreciate your help.

  12. #12
    Regular Contributor
    Join Date
    Nov 2010
    Posts
    51

    Re: My app works in the simulator but in the device NO. HELP :(

    I still have the same problem.

    Someone help me please?

    Please.
    Last edited by erespia2; 2011-01-17 at 19:07.

  13. #13
    Regular Contributor
    Join Date
    Nov 2010
    Posts
    51

    Re: My app works in the simulator but in the device NO. HELP :(

    Quote Originally Posted by erespia2 View Post
    I still have the same problem.

    Someone help me please?

    Please.
    Help me!! , its important for me

Similar Threads

  1. App runs in simulator but not on real device
    By jccorral in forum [Archived] Qt Mobility Project
    Replies: 11
    Last Post: 2010-08-15, 18:57
  2. [Nokia Qt Simulator] wrong app/device size
    By vladest in forum [Archived] Qt SDKs and Tools
    Replies: 4
    Last Post: 2010-04-30, 07:35

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •