Convert device id hex to string

I am evaluating the LX60. After struggling to get it to stream to server 1 IP address, I realized they are using UDP and not TCP. So that is working now. I have the Device Id configuration set to Phone Number. It is coming across in the NMEA sentences and is supposed to be HEX. This is not any HEX I can identify so I am struggling how to convert his to the phone number.

The 9 bytes before the NMEA string start are:

255,235,114,41,0,213,1,0,0

Anybody have any C# examples of how this is done.

The AT *DEVICEID? command returned

0x000001D5002972EB

But still cannot figure out what that is as it related to the phone number

From OP

255 = FF
235 = EB
114 = 72
41 = 29
0 = 00
213 = D5
1 = 01
0 = 00
0 = 00

So in the NMEA sentence starts with FF but then the next 8 bytes which represent the phone number are reversed from what the *DEVICEID? command returns. But still even doing that I cannot get it to match the phone number of the SIM card. Not sure why any of this is not documented in detail.

Why is there still no answer? How do we parse the $DEVID field?

I figured it out. When I get back to the office I will post the code.

Mine is set to include the IMEI in the location report being sent to the server UDP.

string locationReport = Encoding.ASCII.GetString(bytes);
string IMEI = Convert.ToInt64(locationReport.Substring(11,14), 16).ToString();

locationReport is a string representing an entire record send via UDP to the server listener from the modem. Hope this helps.

So I see you’re using Substring(11, 14), my device id is coming as 16 characters (after 0x). Are you skipping the first 2? I am testing with Phone Number as the ID, and when I convert to an Int64 it isn’t correct.