Skip to content

Udp receiver doesn't see packets from other phones?? #1

@GoogleCodeExporter

Description

@GoogleCodeExporter
Hi, 
This is not a bug report, but rather a question.  First of all, congratulations 
on an excellent project.  Your code is very nice and has been very helpful 
effort to implement adhoc networking in our project (see 
http://code.google.com/p/posit-mobile/). I have also recommended your project 
as a model to some of my students.

I've downloaded and adapted your Udp Code to use with our own protocol. 
Everything works fine when I implement it in infrastructure mode -- i.e., using 
a Wifi hotspot as the broadcast node.  But in adhoc mode I'm having trouble 
getting the packets to be received by the Udp receiver.   Here's how I set up 
each phone, with X being a unique hash code between 0 and 254. I'm doing this 
on G1 phones.

# insmod /system/lib/modules/wlan.ko
# wlan_loader -f /system/etc/wifi/Fw1251r1c.bin -e /proc/calibration -i 
/data/local/bin/tiwlan.ini
# ifconfig rmnet0 192.168.2.X  netmask 255.255.255.0
# ifconfig rmnet0 up

And in my tiwlan.ini  I have the phone set to Adhoc mode:

WiFiAdhoc = 1
dot11DesiredChannel = 6
dot11DesiredSSID = hfossadhoc
dot11DesiredBSSType = 0

And here's how I create and broadcast packets:

IPAddress = InetAddress.getByName("192.168.2.255");  // Broadcast address 
DatagramPacket packet = new DatagramPacket(bytes, bytes.length, IPAddress, 
8889);
datagramSocket = new DatagramSocket(8881);
datagramSocket.send(packet);

The Upd receiver socket listens on port 8889.   What happens is that the phone 
that sent the packet does receive it. But other phones either don't receive it 
at all or silently reject the packets. Can you think of any reason why this 
would be?  Hardware differences? Firewall?

I couldn't find your email or I would have contacted you that way.

Once again, congratulations on a nice thesis result!

Regards,
-- ralph ([email protected])



Original issue reported on code.google.com by [email protected] on 25 Oct 2010 at 8:53

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions