当前位置: 首页 > 工具软件 > oFono > 使用案例 >

oFono学习笔记——oFono主要部件概念整理

慕翰学
2023-12-01

摘要

本文主要对oFono中的四大核心部件的概念进行整理。主要是翻译oFono的官方doc

四大核心部件

1.1 Core Daemon

Core Daemon提供了供oFono内部使用的一些服务。这些服务包括,将drivers和plugins载入到oFono中;Atoms部件的发现及Atom设备间交流;和PDU短信相关的编码,解码,分段的APIs;读写SIM以及解释EF文件的APIs;设置字符集转换的APIs;与小区广播(cell broadcast)相关的APIs;

Daemon的另一个主要职责是对modem进行抽象。每一个设备都是独立管理的,并且系统中的设备可以并存。这也就是说,双卡双待对于oFono来说是可行的,哈哈。

Core daemon provides base level services within oFono, namely the loading of plugins and drivers; utility APIs for decoding, encoding and fragmentation of binary SMS pdus; utility APIs for reading and writing to the SIM, and interpreting the contents of the low-level Element File (EF) contents; utility APIs for character set conversion; utility APIs for decoding, duplicate detection and pagination of cell broadcasts; and detection of and communication between oFono atoms.

A big part of the core daemon is the modem device abstraction.  Each device is managed independently, and several devices can be present and active in the system at the same time.  The technologies for each device are not restricted in any way, and can be customized via the use of drivers.

1.2 oFono Atoms

oFono Atoms给上层应用提供基于D-Bus的APIs。通过使用不同的Atom可以使用不同的core functionality,比如使用Voicecall Atom所提供的APIs就可以实现和Voicecall相关的操作。

此外,Atom还可以检测其他Atom的存在,并利用其他Atom所提供的数据来实现更多功能。需要注意的是,oFono本身并不去具体实现Atom的驱动。目前已经有32种不同的Atoms在oFono当中,不同版本的Atom种类可能不同,具体可以看src/ofono.h文件。

oFono atoms provide a clear abstraction API for the applications based on D-Bus.  There are currently over a dozen atoms within oFono, providing access to core functionality like voice calls, supplementary services, short message service (SMS), cell broadcast (CBS) and sim management.

Atoms can detect the presence of other atoms and use information provided by other atoms to provide extra functionality.  For instance, the Network Registration atom will read low-level EF files whenever a SIM is present, and provide enhanced operator information if the SIM is thus provisioned.

1.3 Drivers

oFono特有的驱动机制可以使它能过集成多种device technologies。所有Modem devices 和 atoms为low-level操作提供了一个遵从3GPP TS 27.007 和 3GPP TS 27.005规范的抽象接口。

oFono自带了一个AT命令的参考驱动,这个驱动可以兼容市面上大部分基于AT命令的modem。

oFono provides a way to integrate multiple device technologies through its driver mechanism.  All modem devices and atoms provide an abstract interface for low-level operations.  This interface is based on 3GPP TS 27.007 "AT command set for User Equipment" and 3GPP TS 27.005 "DTE-DCE interface for SMS and CBS".  oFono assumes that all operations are fully asynchronous.

This means that oFono can accommodate a wide variety of devices, including full-featured modems (AT command based and otherwise), data-only cards, and modem like devices (e.g. Bluetooth Handsfree and Sim Access Profile devices, etc.)

oFono provides a reference AT command driver, which should work for the majority of AT command based modems in the market.  oFono also includes an ISI protocol based driver, which will enable the majority of Nokia devices to be used.  Finally a Bluetooth Handsfree Profile (HFP) driver is also planned.

1.4 Plugins

Plugins在oFono中是被用来加载modem设备驱动以及atom驱动。也可以依靠plugins实现设备的发现等扩展功能,以后的文章我会写一篇关于oFono设备发现的文章。

Plugins provide a final piece of the puzzle.  These are used to provide device drivers and atom drivers.  They can also be used to extend oFono or interact with other system services.  For example, Moblin uses oFono plugins to store all call history information within Evolution Data Server.

转载于:https://www.cnblogs.com/zhx831/p/3171622.html

 类似资料: