Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using one network interface (4G) for signaling and another (wifi) for p2p #39

Open
brunoalbertopeixoto opened this issue Mar 27, 2023 · 2 comments

Comments

@brunoalbertopeixoto
Copy link

When I try to connect the webcall to the internet, if I am connected to direct wi-fi, the application displays the print error. To connect I need to enter 4g, try to connect to 4g and only then connect to wi-fi.
Screenshot_2023-03-27-10-46-45

@mehrvarz
Copy link
Owner

direct wi-fi = wi-fi direct?

wi-fi direct is a two-device link (IIRC), like a nullmodem cable. If wi-fi direct impedes connectivity to a 3rd machine (WebCall server), then WebRTC cannot work. This is not a bug.

WebRTC will always establish the most direct P2P link. A wifi-only connection between two devices is no problem if both devices are connected to the same (regular 802.11) wifi network. But to establish this link, both devices need to be able to talk to a WebCall server.

@mehrvarz mehrvarz changed the title Bug: Android Webcall Using one network interface (4G) for signaling and another (wifi) for p2p Mar 28, 2023
@mehrvarz
Copy link
Owner

mehrvarz commented Apr 3, 2023

It is possible to use WebRTC on a device with multiple network interfaces. And you can establish a P2P WebRTC link over a secondary interface that has no connection to the internet. But it is crucial that the interface providing internet access, DNS, etc. (here: your 4G link) stays available as the main network interface the whole time, in particular during call establishment. When the caller clicks the Call button, all available network links are probed and info about these links is exchanged (via the signaling server) with the selected callee. It is here that a secondary interface may be selected as the "quickest" P2P link between the two devices. If you think this trough, it should become clear that during this process all network interfaces need to be active.

In your case, it seems that when you enable the alternative interface (Wifi Direct?) the main (4G) interface is shut down . But this makes WebRTC (via WebCall server) impossible. To solve this, you need to configure your devices, so that your 4G link stays active as the main interface when you turn the alternative Wifi link on.

Here a stackoverflow post with a similar question. Unfortuantely without an answer. But if one would be there, it would probably read like mine above :-)
https://stackoverflow.com/questions/30759848/how-to-use-different-network-interface-for-signaling-media-in-webrtc-app

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants