Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

How to get the cellular IP into a string?


DarrenJR Nov 2, 2021 02:58 PM

Depending on the ip lenght I sometimes get a null character in my IP string. Does anyone have a good way of getting the  cellular IP into a string?

Here is what i'm using:

Dim CellDiagInfo As String *75
Public IP1 As String *60
Public IP2 As String *50
Public IP As String *15

CellDiagInfo = Status.CellInfo

ResultString1 = (InStr (1,CellDiagInfo,"gw:",2)) - 1
IP1 = Left(CellDiagInfo,ResultString1)
ResultString2 = InStr (1,IP1,CHR(58),4)
IP2 = Mid(IP1,ResultString2,16)
IP = Trim (IP2)

Log in or register to post/reply in the forum.