Post

Replies

Boosts

Views

Activity

Reply to POSIX sockets and cellular modem
@eskimo: i have encountered this problem myself too, with UDP sockets. Lost a week, just FYI. For completeness: I’m using setsockopt(IPPROTOIP/IPBOUND_IF) after doing the bind(...). This is a clear bug on iOS. That should have not been required. bind() is exactly for that: bind on an IP address. The only meaningful scenario would be when there are 2 or more interfaces having same ip, and bind() would not be enough to say which interface to use. Even then, metric of the interface should kick in and properly discriminate between those interfaces. The moment I do that extra setsockopt everything works, modem is brought online. also, this problem only happens on dual sim scenario. It works just fine without that setsockopt in single sim. the way I see this is a clear POSIX API breakage, because sendto() should at very least return an error, not silently fail. The pkts are sent according to the pcap capture done on rvi0, so the iOS is contradicting itself, and that’s pretty bad. As for pros and cons, it would be much better if we are let to decide if we go one route or the other. There is not a single place listed anywhere in the docs where this extra setsockopt is required. Do correct me if I’m wrong, it would be awesome to stand corrected. overall, this breaks things...
Jul ’20