本文整理匯總了Python中MobileDevice.MobileDevice.get_net_info方法的典型用法代碼示例。如果您正苦於以下問題:Python MobileDevice.get_net_info方法的具體用法?Python MobileDevice.get_net_info怎麽用?Python MobileDevice.get_net_info使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類MobileDevice.MobileDevice
的用法示例。
在下文中一共展示了MobileDevice.get_net_info方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: get_net_info
# 需要導入模塊: from MobileDevice import MobileDevice [as 別名]
# 或者: from MobileDevice.MobileDevice import get_net_info [as 別名]
def get_net_info(self):
tech_in_use, card_mode, card_domain, carrier, carrier_mode = MobileDevice.get_net_info(self)
if tech_in_use == CARD_TECH_UMTS :
res = self.send_at_command("AT^SYSINFO", accept_null_response=False)
self.dbg_msg ("SYSCFG (HSPA stuff) : %s" % res)
if res[2] == 'OK' :
tech = int(res[1][0][-1])
if tech >= 5 :
tech_in_use = CARD_TECH_HSPA
return tech_in_use, card_mode, card_domain, carrier, carrier_mode
示例2: get_net_info
# 需要導入模塊: from MobileDevice import MobileDevice [as 別名]
# 或者: from MobileDevice.MobileDevice import get_net_info [as 別名]
def get_net_info(self):
tech_in_use, card_mode, card_domain, carrier, carrier_mode = MobileDevice.get_net_info(self)
if tech_in_use == CARD_TECH_UMTS :
res = self.send_at_command("AT$CNTI=0", accept_null_response=False)
self.dbg_msg ("AT$CNTI=0 (HSPA stuff) : %s" % res)
tech = res[1][0]
if res[2] == 'OK' :
if "HSDPA" in tech :
tech_in_use == CARD_TECH_HSDPA
elif "HSUPA" in tech :
tech_in_use = CARD_TECH_HSUPA
return tech_in_use, card_mode, card_domain, carrier, carrier_mode