D
D
Dereck882018-06-30 20:47:52
USB
Dereck88, 2018-06-30 20:47:52

Software reconnection of a 4G USB modem to change ip?

Good day!
There is a 4g modem from Beeline: ZTE MF823D
IP It changes if you pull it out of the USB connector and insert it back.
I need to implement IP change programmatically.
Tried (and didn't help):
1) Beeline shell
2) disable/enable USB controller in device manager
3) AT commands: (enable/disable)
AT+CFUN=0
AT+CFUN=1
4) bat file with devconx64, rasdial commands
The IP field of each of these actions still remains the same as it was.
(That is, the IP only changes if you pull out the modem and put it back in)
The modem is unlocked and when connected it is defined as a network card. If you just pull the modem out of the USB port with your hands and insert it, then the ip address will be new, but if programmatically, then for some reason the address remains the same. Perhaps there is a way using the command line to turn off the power of the selected USB port and turn it on?

Answer the question

In order to leave comments, you need to log in

6 answer(s)
H
horsepower, 2018-07-05
@horsepower

You can connect the modem via a USB device that can manage USB power. For example, Mikrotik routers can turn off USB power for a few seconds and then turn it back on. You can do this remotely or by scheduled scripts on the router itself.

D
d-stream, 2018-07-01
@d-stream

And if item 2, and a pause between switching off and on for 30-60 seconds?

A
alexalexes, 2018-06-30
@alexalexes

Have you tried this recipe?
wmzbaks.ru/forum/topic.php?forum=3&topic=23

J
Johnny Smith, 2018-07-01
@Olek1

You can pass the device through some remote access device that has the ability to reboot it remotely, and through it reboot the modem along with it

C
ColdSpirit, 2018-07-01
@ColdSpirit

Since you have a "network card" connection, I can assume that your modem is the same as mine - the modem connects to the Internet regardless of the PC, the "modem-internet" connection will work even if it is connected stupidly to the usb charger . And in the PC, he simply supplies the Internet (as an independent provider).
If so, then in order to change the ip, you need to turn off the USB power, or find a way to reach the modem, and disable-enable it with commands.
I assume that he has a web-face, and he can be controlled through the browser. Try to disable-enable it first from there. If the ip does not change, then the power option remains.
By the way, check the result several times - sometimes the operator assigns the same ip.
Read more about the modem here:https://wiki.archlinux.org/index.php/ZTE_MF_823_(M...

V
Valentine, 2018-07-01
@vvpoloskin

The operator issues a gray IP address, which is then mapped to white on a piece of iron for NAT. To change the gray address, it is usually enough to play close-establish a connection, however, theoretically, the IP address can be remembered in the modem. Play around with AT commands in terms of establishing and resetting a session, IP and APN addressing, setting parameters for PDP contexts.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question