Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Aug 2007

    UDP broadcast not working (Asha 310)


    I'm trying to broadcast a UDP package (datagram) but can't get it to work on the device (Asha 310). Here is my code:

      UDPDatagramConnection conn = (UDPDatagramConnection) Connector.open("datagram://");
      System.out.println("Local address " + conn.getLocalAddress() + ":" + conn.getLocalPort());
      Datagram dg = conn.newDatagram(pPacket.length);
      dg.setData(pPacket, 0, pPacket.length);
    If I use concrete address (e.g. the packet is send without problems. If I use, conn.send() finishes without exception but nothing gets send on the network (checked with Wireshark). If the address is using the correct format to broadcast just in this network segment as above (, conn.send() throws "Failed to send datagram" exception.

    In the simulator still does not work but works just fine. However on the device nothing works (except sending to a concrete, non-broadcast address). Any clues? Is the UDP broadcast possible at all on Asha devices?

    Thanks in advance.

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Budapest, Hungary

    Re: UDP broadcast not working (Asha 310)

    Are your PC and your device using the same network? is the broadcast address for If your phone uses a different network, the address is also different.
    EDIT: Ok, I see you mention it in the middle.

  3. #3
    Registered User
    Join Date
    Aug 2007

    Re: UDP broadcast not working (Asha 310)

    Yes, the phone is connected via Wi-Fi to the same network and the subnet mask is, so the broadcast address is It seems like a firmware bug/limitation in S40 phones.

Similar Threads

  1. Nokia Debug Device not working for Asha 205
    By trivedikamal123 in forum Mobile Java Tools & SDKs
    Replies: 1
    Last Post: 2013-04-16, 15:43
  2. Full screen mode is not working in ASha(java)
    By ohiletechguy in forum Mobile Java General
    Replies: 1
    Last Post: 2013-03-28, 09:14
  3. Broadcast FM
    By franci102 in forum General Development Questions
    Replies: 4
    Last Post: 2007-12-17, 06:03
  4. broadcast SMS
    By amisexy in forum PC Suite API and PC Connectivity SDK
    Replies: 1
    Last Post: 2003-06-25, 17:05

Posting Permissions

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