Reputation: 135
I'm doing a simple project to establish Wifi connection between my Android phone and TI's CC3200 device. I'm using my Android device as the group owner and CC3200 as the client. Once P2P connection is established, the Android device knows about its own IP address as this is the same as Group Owner Address. But for CC3200 to establish socket connections, the Android device also needs to know CC3200's IP address.
This has its initial challenge as each device needed a method to find out each other's device IP. The method that got me somewhere is by using CC3200's Netapp event handler. When I print out the Owner Address and Gateway Address in CC3200, Gateway address matches the Group Owner address. Since I'm a little rusty on networking theory, does anyone know if this is always the case? In P2P, is gateway address == group owner address?
Upvotes: 0
Views: 986
Reputation: 1380
You seems to use static IP . In that case gateway-address should be the P2P-GO's IP address.
When you start your android phone as a P2P-GO, you have to give an IP-Address to it. This is the IP address of the P2P-GO in your android phone. Apart from that, if your phone is connected to internet using 3G, it may have another IP-address. So make sure your P2P-Client's gateway address entry matches your P2P-GO's IP address and not the 3G , IP-Address.
Make sure the sub-net-mask is correct at the client side, if you are using static -ip
A Suggestions: you can enable DHCP server on your P2P-GO. In that case your P2P-Client will automatically get an IP address and will be able to communicate without any problems
Upvotes: 1