Network connection type: where in DB (MobiControl v13)

Network connection type: where in DB (MobiControl v13)

Hi all, wondering if anyone has knowledge about where to find the network connection type (Wi-Fi, cellular, Ethernet, etc.) on the MobiControl database.


NetworkConnectionType is listed within the Device Properties to be called through the API, and is also easily seen on the web-console under "Information" for each device.


However, I could not find it as a field/column in eg. the main DevInfo table. I'm wondering if it may be extracted from the field DevInfo.DevStat.

 

Objective: I was trying to create a customer report for support personnel that would return the present network connection type for each device.

 

Device Properties in the API:

NetworkConnectionType_WithinAPIDeviceProperties

Web-console > Device > Information:

Connection type as seen on the web-console

  • 29 October 2018
  • SOTI MobiControl
  • 3 Answers
  • 0 Upvote
  • 3 Followers
  • 1.6K Views
    • 3 Answers
    • 0 Upvote
    • 3 Followers

3 Answers

Order By:   Standard | Newest | Votes
AJMOD@SOTI | posted this 01 November 2018

Hi Rui,

 

Typically we don't provide customers scripts they can run on their environment but since this is just a select statement to pull information for a custom report I believe it's OK to share. Just for full disclosure I may need to remove the script section of this post later but for the time being you can use this information to get the network connection type for each device. In the future if you require any additional scripts to run on the MobiControl DB you may need to speak with our Professional Services team. 

 

You can find the network connection type in the DevInfo table, specifically in the DevData field. The confusion here in finding the relevant information is that the property is not particularly obvious and needs to be decoded to determine what connection is being used. I have included a code snipped below which you can use to query the MobiControl DB to determine the type of connection being used by your devices:

 

SELECT CASE WHEN dbo.GetValueByKey(d.DevData, 'CT=', ';') = ''          THEN 'Not Reported'

                WHEN dbo.GetValueByKey(d.DevData, 'CT=', ';') = '130023424' THEN '3G'

                WHEN dbo.GetValueByKey(d.DevData, 'CT=', ';') = '16'        THEN 'Ethernet'

                WHEN dbo.GetValueByKey(d.DevData, 'CT=', ';') = '32'        THEN 'Wifi'

                WHEN dbo.GetValueByKey(d.DevData, 'CT=', ';') = '134217728' THEN '4G'

                WHEN dbo.GetValueByKey(d.DevData, 'CT=', ';') = '3145731'   THEN '2G'

            END AS [Network Type]

  FROM [dbo].[DevInfo]  d

 

I also want to let you know that it is possible for the data to be store differently depending on the type of device and version of MobiControl you are using but the "DevData" field is where the information should be stored and the code snippet above would be a good starting place for you to find the connection type.

 

As always please exercise caution when running any scripts on your SQL server.

 

Technical Support | SOTI Inc. |1.905.624.9828 | support@soti.net | www.soti.net |

  • 2
  • 1
AJMOD@SOTI | posted this 01 November 2018

Hi Rui,

 

Typically we don't provide customers scripts they can run on their environment but since this is just a select statement to pull information for a custom report I believe it's OK to share. Just for full disclosure I may need to remove the script section of this post later but for the time being you can use this information to get the network connection type for each device. In the future if you require any additional scripts to run on the MobiControl DB you may need to speak with our Professional Services team. 

 

You can find the network connection type in the DevInfo table, specifically in the DevData field. The confusion here in finding the relevant information is that the property is not particularly obvious and needs to be decoded to determine what connection is being used. I have included a code snipped below which you can use to query the MobiControl DB to determine the type of connection being used by your devices:

 

SELECT CASE WHEN dbo.GetValueByKey(d.DevData, 'CT=', ';') = ''          THEN 'Not Reported'

                WHEN dbo.GetValueByKey(d.DevData, 'CT=', ';') = '130023424' THEN '3G'

                WHEN dbo.GetValueByKey(d.DevData, 'CT=', ';') = '16'        THEN 'Ethernet'

                WHEN dbo.GetValueByKey(d.DevData, 'CT=', ';') = '32'        THEN 'Wifi'

                WHEN dbo.GetValueByKey(d.DevData, 'CT=', ';') = '134217728' THEN '4G'

                WHEN dbo.GetValueByKey(d.DevData, 'CT=', ';') = '3145731'   THEN '2G'

            END AS [Network Type]

  FROM [dbo].[DevInfo]  d

 

I also want to let you know that it is possible for the data to be store differently depending on the type of device and version of MobiControl you are using but the "DevData" field is where the information should be stored and the code snippet above would be a good starting place for you to find the connection type.

 

As always please exercise caution when running any scripts on your SQL server.

 

Technical Support | SOTI Inc. |1.905.624.9828 | support@soti.net | www.soti.net |

  • 2
  • 1
Rui Ormonde | posted this 01 November 2018

Outstanding AJMOD! That solved the problem. Have taken note of your recommendations and I'm very grateful for your support.

  • 1
  • 1

Give us your feedback
Give us your feedback
Feedback