Hi,
I want to construct a system where PDAs can communicate without accesspoint.
since there is no accesspoint, can a PDA send out packet without IP address Can other PDAs neerby eavesdrop the packet
How to do it
I think TCP/UDP socket programming may not work since IP address is needed.
Should I configure my wireless network adaptor for this
Thanks.
Toby

How to communicate in ad-hoc mode
Senthilvel
There's no difference between wireless mode and ever between wired and wireless network from software point of view, it all comes down to TCP/IP.
You would need to properly configure your ad-hoc network by setting up SSID, encryption and assigning IP addresses manually or with DHCP server if you have one.
sklett
TCP/IP is end to end. From the software point of view, it receives only the packets aims to itself.
But in ad-hoc network, each peer acts as both end user and router. It can receive packets which is not for it, and relay them to next hop.
Thus, the problem is that how to enable the peer to send packet without IP address.
for example, using "BROADCAST" instead of IP address. And other peers nearby can receive this packet.
Terence Lee
Col in trouble
Fortunately TCP/IP is not end to end or internet would be limited to just two hosts, right
Are you familiar with OSI network model
http://www.webopedia.com/quick_ref/OSI_Layers.asp
The difference between wired and wireless network and between ad-hoc and infrastructure mode are on layers 1 and 2. Applications are working with network on layers 4 and above so they are not affected by layers below.
ad-hoc mode is different from infrastructure only because devices are sending packets to each other directly and not through access point. All other levels including TCP/IP remain intact. If you don't have DHCP server in ad-hoc mode and you did not assigned IP addresses manually, PPC devices would assign private IPs to themselves automatically.
In theory you can work at level 3 sending and receiving Ethernet packets, but that’s rarely necessary. Network drivers and sniffers would be an example of that.
Also, I believe you’re mistaken about packets been forwarded by devices in ad-hoc mode. They work just like normal Ethernet cards sending packets to each other based on MAC address or using broadcast (supported by TCP/IP, by the way). One can even say Ethernet cards are operating in ad-hoc mode.
Frank Natoli
Thanks very much for your response.
As your said, if we do not assigned IP address manually, PPC device would assign private IP to itself automatically. But how do they know the IP addresses of other devices
Thus, at the beginning, they should advertise themself by broadcasting. Is there any programming way to support broadcast Does socket programming support broadcasting
Thanks.
american_werewolf
Devices would use broadcast to resolve names (that's how you should address them - by names) into IP address automatically, exactly the same way desktops would.
If you don't know the names in advance you would need to implement some sort of registrations service like computer browser on desktop which allows you to see computers in "Network neighborhood" even in peer to peer networks:
http://technet2.microsoft.com/WindowsServer/en/Library/e1cc4f8c-04f5-4b98-a04c-1ba601fb5d421033.mspx
Implementation of such services should be done by a developer with at least 10 years of TCP/IP and C++ experience as it involves deep network knowledge and low level programming, probably on a driver or service level (e.g. no C# or VB).
Not to mention that does not work very well as this idea is from 1980s networks and it’s not exactly compatible with TCP/IP. This is why it’s pretty common for “Network neighborhood” not to function properly except in very simple situations.
Note the task can be defined as “how do I know which hosts are present on this network” and it has nothing to do with ad-hoc mode and/or wireless networks. It’s applicable for infrastructure mode and wired networks as well.
One more thing: it should be fairly easy to implement none generic solution with UDP broadcast. The tough part would be getting it to scale well. < xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />