`
wuhua
  • 浏览: 2120089 次
  • 性别: Icon_minigender_1
  • 来自: 广州
社区版块
存档分类
最新评论

What Is - Network Diagnostic Tool

阅读更多

What Is - Network Diagnostic Tool

Last Updated: 19 March 2009
Article Number: DB-00684

Summary

This article applies to the following:

  • BlackBerry® smartphones based on Java® technology
  • BlackBerry® Device Software 4.5 and later

Details

BlackBerry smartphones support many different transports that facilitate reliable data communication between third-party applications and the Internet. The transports available are direct Transmission Control Protocol (TCP), BlackBerry® Mobile Data System (BlackBerry MDS), BlackBerry® Internet Service Browsing (BIS-B), BlackBerry® Unite!™ software, Wireless Access Protocol (WAP)1.0, WAP2.0 and Wi-Fi® technology. It is important to understand the differences between these transports and how and when to leverage each transport. It is also crucial to determine if a transport is available for use before trying to use it. The Network Diagnostic Tool is essentially a role model that answers all these questions and is a functional diagnostic tool for testing a URL over various transports supported by the BlackBerry solutions, as well as for displaying the values of many network attributes during the test period.

This article refers to the source code of the Network Diagnostic Tool, which can be downloadedhere.

To better understand how each transport works, see the video Network Transports found onblackberrydeveloper.com.

Determining transport availability

The first step to determining the availability of a transport is to check if the ServiceRecord for that transport is available. This can be done programmatically as follows:

  1. Get the ServiceBook instance by calling the static method ServiceBook.getSB().
  2. Get the ServiceRecords from the ServiceBook by calling the instance methodServiceBook.getRecords().
  3. Iterate through each ServiceRecord and determine if it is for the transport you are looking for.

This is demonstrated in the Network Diagnostic Tool'sIOThread.initializeTransportAvailability().

The next step is to determine if the BlackBerry smartphone has network coverage to communicate through the transport. This can be accomplished by calling the application programming interface (API) CoverageInfo.isCoverageSufficient(int coverageType).

Refer to the method IOThread.initializeTransportAvailability()for a sample implementation of this.

Creating connections

Developer knowledge base article DB-00396 illustrates how to create an Hypertext Transfer Protocol (HTTP) or socket connection.

The IOThread.get*URL() methods in the source code shows how to construct URLs for each transport.

Once you have the URL you need, you can create an HTTPConnection instance using theConnector.open(String url) static method and start communicating with that URL. See theIOThread.do*() methods in the Network Diagnostic Tool source code to see a detailed implementation of this.

Note: The BIS-B transport is available only to partners of the BlackBerry Alliance Program, and therefore is not implemented in the attached source code of the Network Diagnostic Tool. For more information on the BlackBerry Alliance Program, visithttp://na.blackberry.com/eng/partners/why_join.jsp.

Displaying network and radio information

Besides testing the different transports for a given URL, the Network Diagnostic Tool also displays network and radio information such as signal level, network name and type, and available network services. Refer to the method ReportScreen.displayNetworkInfo() in the Network Diagnostic Tool source code for more information on how to display this information.

RadioStatusListener

It is also possible for an application to listen for changes in the radio such as signal level and available network services. To accomplish this, you must implement the interfaceRadioStatusListener. The Network Diagnostic Tool implements this interface in the class namedIOThread.

Automatically detecting wireless service providers

It is very useful to be able to detect wireless service providers, especially for applications using the Direct TCP transport for BlackBerry smartphones that operate using Global System for Mobile communications® (GSM®). For these BlackBerry smartphones, correct access point name (APN) information must be specified by the BlackBerry smartphone user before any application can leverage the Direct TCP transport.

APN information can also be set programmatically, which is demonstrated in the referenced Network Diagnostic Tool source code. The details are also explained in DB-00532. If the current wireless service provider for the BlackBerry smartphone can be determined, then the APN information can be set up programmatically from the application. This improves the BlackBerry smartphone user's experience because the APN does not need to be specified manually. To detect the wireless service provider, use a table that contains the name, mobile country code (MCC), mobile network code (MNC) and the APN details of each wireless service provider. Compare the MCC and MNC values returned by the BlackBerry smartphone against the values in the table. Once a match is found, set the corresponding APN information programmatically. For more information on how to read the MCC and MNC values from the BlackBerry smartphone, see DB-00688.

The complete process to automatically detect wireless service providers is also demonstrated by the Network Diagnostic Tool. The Network Diagnostic Tool stores the wireless service provider table in an Extensible Markup Language (XML) file that can be downloaded from here. This file must be stored on the BlackBerry smartphone in the following location:file:///store/netdiag/carrier_info.xml unless this path is changed in the source code. You can add details for as many wireless service providers as you want to the XML file.

Changes required for earlier versions of the BlackBerry Java Development Environment

Although this article is targeted for BlackBerry® Java® Development Environment (BlackBerry JDE) 4.5 or later, the source code of the Network Diagnostic Tool can be easily modified and compiled using earlier versions of the BlackBerry JDE. Consider the following changes:

  1. Before BlackBerry JDE 4.3, RadioStatusListener had an additional method namedmobilityManagementEvent(int eventCode, int cause). This method must be implemented if you are using BlackBerry JDE 4.2 or earlier.
  2. CoverageInfo.COVERAGE_DIRECT is not supported until BlackBerry JDE 4.5. For BlackBerry JDE 4.3 or earlier, use CoverageInfo.COVERAGE_CARRIER.
  3. WLANInfo class is not available until BlackBerry JDE 4.5. For BlackBerry JDE 4.3 or earlier, use the following logic:
  4. if(CoverageInfo.isCoverageSufficient(CoverageInfo.COVERAGE_CARRIER,RadioInfo.WAF_WLAN, false)){
        coverageWiFi = true;
        wifiLog.addlog("Coverage Status: Online");

  5. RadioInfo.NETWORK_SERVICE_GAN is not supported in BlackBerry JDE 4.2.1 or earlier. Remove any references to this constant for those versions of the BlackBerry JDE.
  6. RadioInfo.NETWORK_SERVICE_EVDO_ONLY and RadioInfo.NETWORK_SERVICE_UMTS are not supported in BlackBerry JDE 4.2.1 or earlier. Remove any references to these constants for those versions of the BlackBerry JDE.
  7. The CoverageInfo class is introduced in BlackBerry JDE 4.2.0. Remove any references to this class if you are using an earlier version of the BlackBerry JDE to compile this application. However, it is possible to do the following in versions of the BlackBerry JDE earlier than 4.2.0:
    1. if(RadioInfo.getSignalLevel() != RadioInfo.LEVEL_NO_COVERAGE) the BlackBerry smartphone has radio signal.
    2. if(RadioInfo.getNetworkService() & RadioInfo.NETWORK_SERVICE_DATA)>0 the BlackBerry smartphone has data connectivity.
 

Keywords

network diagnostic tool, http, connection, transport, direct tcp, mds, bis, unite, wap, wap2, wap2.0, radiostatuslistener

分享到:
评论

相关推荐

    ArubaOS 6.0 Command Line Interface Reference Guide 命令行用户手册

    It is a powerful diagnostic tool for troubleshooting issues related to spectrum monitoring. #### Conclusion The new commands introduced in ArubaOS 6.0 significantly enhance the capabilities of the ...

    Mastering.Wireshark.178398952

    Use Wireshark as a diagnostic tool and also for network security analysis to keep track of malware Troubleshoot all the network anomalies with help of Wireshark Resolve latencies and bottleneck issues...

    Essential Linux Device Drivers

    Diagnostic Tools Kernel Hacking Config Options Test Equipment Chapter 22. Maintenance and Delivery Coding Style Change Markers Version Control Consistent Checksums Build Scripts Portable Code...

    Java 11 Cookbook, Second Edition

    Solutions for modular, functional, reactive, GUI, network, and multithreaded programming For more than three decades, Java has been on the forefront of developing robust software that has helped ...

    [附源码+数据库+毕业论文+部署教程+配套软件]基于SpringBoot+MyBatis+MySQL+Maven+Vue的停车场管理系统,推荐!

    一、项目简介 包含:项目源码、数据库脚本等,该项目附带全部源码可作为毕设使用。 项目都经过严格调试,eclipse或者idea 确保可以运行! 该系统功能完善、界面美观、操作简单、功能齐全、管理便捷 二、技术实现 jdk版本:1.8 及以上 ide工具:IDEA或者eclipse 数据库: mysql5.5及以上 后端:spring+springboot+mybatis+maven+mysql 前端: vue , css,js , elementui 三、系统功能 1、系统角色主要包括:管理员、用户 2、系统功能 前台功能包括: 用户登录 车位展示 系统推荐车位 立即预约 公告展示 个人中心 车位预定 违规 余额充值 后台功能: 首页,个人中心,修改密码,个人信息 用户管理 管理员管理 车辆管理 车位管理 车位预定管理,统计报表 公告管理 违规管理 公告类型管理 车位类型管理 车辆类型管理 违规类型管理 轮播图管理 详见 https://flypeppa.blog.csdn.net/article/details/146122666

    springboot656基于java-springboot的农机电招平台毕业设计(代码+数据库+论文+PPT+演示录像+运行教学+软件下载).zip

    项目已获导师指导并通过的高分毕业设计项目,可作为课程设计和期末大作业,下载即用无需修改,项目完整确保可以运行。 包含:项目源码、数据库脚本、软件工具等,该项目可以作为毕设、课程设计使用,前后端代码都在里面。 该系统功能完善、界面美观、操作简单、功能齐全、管理便捷,具有很高的实际应用价值。 项目都经过严格调试,确保可以运行!可以放心下载 技术组成 语言:java 开发环境:idea 数据库:MySql 部署环境:maven 数据库工具:navica 更多毕业设计https://cv2022.blog.csdn.net/article/details/124463185

    Python程序设计学习思维导图-仅供参考

    内容为Python程序设计的思维导图,适用于新手小白进行浏览,理清思路

    2024-Stable Diffusion全套资料(软件+关键词+模型).rar

    2024-Stable Diffusion全套资料(软件+关键词+模型).rar

    mmexport1741417035005.png

    mmexport1741417035005.png

    COMSOL三维锂离子电池全耦合电化学热应力模型:模拟充放电过程中的多物理场耦合效应及电芯内应力应变情况,COMSOL锂离子电池热应力全耦合模型,comsol三维锂离子电池电化学热应力全耦合模型锂离子

    COMSOL三维锂离子电池全耦合电化学热应力模型:模拟充放电过程中的多物理场耦合效应及电芯内应力应变情况,COMSOL锂离子电池热应力全耦合模型,comsol三维锂离子电池电化学热应力全耦合模型锂离子电池耦合COMSOL固体力学模块和固体传热模块,模型仿真模拟电池在充放电过程中由于锂插层,热膨胀以及外部约束所导致的电极的应力应变情况结果有电芯中集流体,电极,隔膜的应力应变以及压力情况等,电化学-力单向耦合和双向耦合 ,关键词: 1. COMSOL三维锂离子电池模型; 2. 电化学热应力全耦合模型; 3. 锂离子电池; 4. 固体力学模块; 5. 固体传热模块; 6. 应力应变情况; 7. 电芯中集流体; 8. 电极; 9. 隔膜; 10. 电化学-力单向/双向耦合。,COMSOL锂离子电池全耦合热应力仿真模型

    基于传递矩阵法的一维层状声子晶体振动传输特性及其优化设计与应用,声子晶体传递矩阵法解析及应用,Matlab 一维层状声子晶体振动传输特性 传递矩阵法在声子晶体的设计和应用中具有重要作用 通过调整声子

    基于传递矩阵法的一维层状声子晶体振动传输特性及其优化设计与应用,声子晶体传递矩阵法解析及应用,Matlab 一维层状声子晶体振动传输特性 传递矩阵法在声子晶体的设计和应用中具有重要作用。 通过调整声子晶体的材料、周期和晶格常数等参数,可以设计出具有特定带隙结构的声子晶体,用于滤波、减震、降噪等应用。 例如,通过调整声子晶体的周期数和晶格常数,可以改变带隙的位置和宽度,从而实现特定的频率范围内的噪声控制。 此外,传递矩阵法还可以用于分析和优化声子晶体的透射谱,为声学器件的设计提供理论依据。 ,Matlab; 一维层状声子晶体; 振动传输特性; 传递矩阵法; 材料调整; 周期和晶格常数; 带隙结构; 滤波; 减震; 降噪; 透射谱分析; 声学器件设计,Matlab模拟声子晶体振动传输特性及优化设计研究

    头部姿态估计(HeadPose Estimation)-Android源码

    头部姿态估计(HeadPose Estimation)-Android源码

    永磁同步电机FOC、MPC与高频注入Simulink模型及基于MBD的代码生成工具,适用于Ti f28335与dspace/ccs平台开发,含电机控制开发文档,永磁同步电机控制技术:FOC、MPC与高

    永磁同步电机FOC、MPC与高频注入Simulink模型及基于MBD的代码生成工具,适用于Ti f28335与dspace/ccs平台开发,含电机控制开发文档,永磁同步电机控制技术:FOC、MPC与高频注入Simulink模型开发及应用指南,提供永磁同步电机FOC,MPC,高频注入simulink模型。 提供基于模型开发(MBD)代码生成模型,可结合Ti f28335进行电机模型快速开发,可适用dspace平台或者ccs平台。 提供电机控制开发编码器,转子位置定向,pid调试相关文档。 ,永磁同步电机; FOC控制; MPC控制; 高频注入; Simulink模型; 模型开发(MBD); Ti f28335; 电机模型开发; dspace平台; ccs平台; 编码器; 转子位置定向; pid调试。,永磁同步电机MPC-FOC控制与代码生成模型

    light of warehouse.zip

    light of warehouse.zip

    考虑温度和气体排放等因素的工业乙醇发酵过程及其Matlab源码-乙醇发酵-气体排放-Matlab建模和仿真-代谢路径

    内容概要:文章深入讨论了工业乙醇发酵的基本原理及工艺流程,特别是在温度和气体排放(如CO2及其他有害气体)影响下的发酵效果分析。文章介绍了乙醇发酵的重要环节,如糖分解、代谢路径、代谢调控以及各阶段的操作流程,重点展示了如何通过Matlab建模和仿真实验来探索这两个关键环境因素对发酵过程的具体影响。通过动态模型仿真分析,得出合适的温度范围以及适时排除CO2能显著提升发酵产乙醇的效果与效率,从而提出了基于仿真的优化发酵生产工艺的新方法。 适用人群:从事生物工程相关领域研究的科学家、工程师及相关专业师生。 使用场景及目标:适用于实验室环境、学术交流会议及实际生产指导中,以提升研究人员对该领域内复杂现象的理解能力和技术水平为目标。 其他说明:附录中有详细的数学公式表达和程序代码可供下载执行,便于有兴趣的研究团队重复实验或者继续扩展研究工作。

    Tomcat资源包《Tomcat启动报错:CATALINA-HOME环境变量未正确配置的完整解决方案》

    本资源包专为解决 Tomcat 启动时提示「CATALINA_HOME 环境变量未正确配置」问题而整理,包含以下内容: 1. **Apache Tomcat 9.0.69 官方安装包**:已验证兼容性,解压即用。 2. **环境变量配置指南**: - Windows 系统下 `CATALINA_HOME` 和 `JAVA_HOME` 的详细配置步骤。 - 常见错误排查方法(如路径含空格、未生效问题)。 3. **辅助工具脚本**:一键检测环境变量是否生效的批处理文件。 4. **解决方案文档**:图文并茂的 PDF 文档,涵盖从报错分析到成功启动的全流程。 适用场景: - Tomcat 9.x 版本环境配置 - Java Web 开发环境搭建 - 运维部署调试 注意事项: - 资源包路径需为纯英文,避免特殊字符。 - 建议使用 JDK 8 或更高版本。

    java毕业设计源码 仿360buy京东商城源码 京东JavaWeb项目源代码

    这是一款仿照京东商城的Java Web项目源码,完美复现了360buy的用户界面和购物流程,非常适合Java初学者和开发者进行学习与实践。通过这份源码,你将深入了解电商平台的架构设计和实现方法。欢迎大家下载体验,提升自己的编程能力!

    java-springboot+vue的乒乓球馆预约管理系统源码.zip

    系统选用B/S模式,后端应用springboot框架,前端应用vue框架, MySQL为后台数据库。 本系统基于java设计的各项功能,数据库服务器端采用了Mysql作为后台数据库,使Web与数据库紧密联系起来。 在设计过程中,充分保证了系统代码的良好可读性、实用性、易扩展性、通用性、便于后期维护、操作方便以及页面简洁等特点。

    【javaweb毕业设计源码】大学生求职就业网

    这是一款专为大学生打造的求职就业网JavaWeb毕业设计源码,功能齐全,界面友好。它提供简历投递、职位搜索、在线交流等多种实用功能,能够帮助你顺利进入职场。无论你是想提升技术水平还是寻找灵感,这个源码都是不可多得的资源。快来下载,让你的求职之路更加顺畅吧!

    useTable(1).ts

    useTable(1).ts

Global site tag (gtag.js) - Google Analytics