Domanda

I've read that there is no way to toggle 2g/3g on android in my own code. But is there a solution how to do this with root privileges or smomething like this?

È stato utile?

Soluzione

You might be able to do it like this: (disclaimer: I haven't personally done this, but in theory it can work)

First see this SO question about sending AT commands on Android, especially the 2nd answer about a workaround using root privileges: How to send AT command in android?.

Then use AT commands to set the device to "2G only or "3G only" or whatever you want. Using standard AT commands defined in 3GPP 27.007, you can tell the device to select a particular 2G or 3G network (see AT+COPS, AT+CREG). You can tweak whether you get "2G only" or "2G preferred" by setting the parameter of the AT+COPS set command to 1 or 4 respectively.

I found 2 ways to do this using different proprietary AT commands. One is publically available on the internet here. It uses AT+URAT, which as far as I'm aware isn't a standard AT command.

The point here is, that the device probably won't support AT+URAT, but it might have its own proprietary AT command for this function.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top