Git Product home page Git Product logo

mm-radio's Introduction

The mm-radio HAL

Build Status License Discord

Warning!

This project is a free and open-source initiative maintained by a group of volunteers. It is provided "as is" without any warranties or guarantees. Please be aware that it is a reference proof of concept and the user is fully responsible for any issues that may arise from using the project.

Introduction

The mm-radio project is a Hardware Abstraction Layer (HAL) for the Android operating system that allows communication between the Modem Manager and the Android framework. It implements the Android Interface Definition Language (AIDL) radio interface and "wires-up" requests to the Modem Manager service from the Mobile broadband connectivity community

It is designed to work on Android 13 and later versions. Older versions do not have AIDL Radio HAL support.

The implementation details of mm-radio are as follows:

  • The src/radio directory contains the main binding logic between IRadio interface and MM dbus API.
  • The src/mm_zbus directory contains zbus auto-generated proxies for ModemManager dbus API.
  • The src/utils directory contains various helpers.

Building mm-radio using AOSPLESS within a Docker container

To build the mm-radio project using the AOSPLESS approach within a Docker container, you can follow these steps:

  1. Install Docker: Run the following commands to install Docker on your system:

    $ sudo apt install docker.io
    $ sudo usermod -aG docker $USER
    
  • Note: Don't forget to reboot your PC to apply group configuration changes.
  1. Clone the project: Use the following command to clone the mm-radio project:

    $ git clone https://github.com/GloDroid/mm-radio.git
    $ cd mm-radio
    
  2. Build the project: Run the following command to build the project:

    $ make ci_fast
    
  • Or, you can run the following command to build and deploy the project to the target device (assuming that some version of mm-radio is already installed on your device):

    $ make bd
    

Note:

  • If you encounter permission denied errors when running for the first time, try rebooting your device and running the command again.
  • To view mm-radio logs after running make bd, export the environment variable export ADBLOG=1.

Embedding the mm-radio project into your build

To embed the mm-radio project into your build, you can use the AOSPEXT make scripts to build mm-radio, Modem Manager, and related repositories.

  1. AOSP Manifest: An example of AOSP Manifest file including mm-radio, Modem Manager and related repositories can be found at: Link
  2. AOSP product configuration changes: An example of required AOSP product configuration changes can be found at: Link
  3. Modem Manager patches: The Modem Manager project may require additional patches to compile within AOSP. These patches can be found at: Link

Contributing

When contributing to this repository, please follow these guidelines:

  1. Kernel Code of Conduct: Use the Kernel Code of Conduct when submitting patches.
    (In a simple form just make sure to include a Signed-off-by line in your commits)
  2. Local CI: Before submitting a patch, ensure that it passes a local CI run by using the make ci command.
  3. Commit message: Keep the commit message clean and describe the changes made in the patch.
  4. Avoid mixing changes: Avoid mixing bug fixes, refactors, and new features in a single patch. This is considered a bad practice.
  5. Use common prefix for commits: Use the mm-radio: prefix for commits.

Please make sure that your contributions follow the above guidelines to ensure that the review process is as smooth as possible.

Project status

Please find the latest status of the project at: Link

mm-radio's People

Contributors

rsglobal avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

rsglobal picoworm

mm-radio's Issues

Project status

Works

  • Dial number, accept incoming call, hangup
  • DTMF tones
  • USSD commands
  • Simple SMS messaging cases

Issues

  • Airplane mode currently disables modem same as mmcli -m any -d does.

Doesn't work:

  • Concatenated (long) SMS
  • SIM identification
  • Data
  • PIN / PUK entering (PIN must be disable prior to using)

Dialer UI become unresponsive after dialing really long number.

04-18 09:27:58.529   288   288 I mm-radio: setMute: 551 (src/radio/radio_voice.rs:556)
04-18 09:27:58.532   288   288 I mm-radio: dial: 552 (src/radio/radio_voice.rs:289)
04-18 09:27:58.548   288   322 I mm-radio: Call added: "/org/freedesktop/ModemManager1/Call/7" (src/radio/radio_voice.rs:220)
04-18 09:27:58.548   288   323 I mm-radio: Call monitoring started (src/radio/radio_voice.rs:97)
04-18 09:27:58.548   288   288 I mm-radio: Call already exists (src/radio/radio_voice.rs:214)
04-18 09:27:58.555   288   320 I mm-radio: Call state: 1 (src/radio/radio_voice.rs:102)
04-18 09:27:58.571   288   288 E mm-radio: Casting Error(MethodError(OwnedErrorName(ErrorName(Str(Owned("org.freedesktop.libqmi.Error.Protocol.ArgumentTooLong")))), Some("Couldn't create call: QMI protocol error (19): 'ArgumentTooLong'"), Msg { type: Error, sender: UniqueName(Str(Borrowed(":1.0"))), reply-serial: 127, body: Signature("s") })) at src/radio/radio_voice.rs:301:13, to binder at src/radio/radio_voice.rs:305:9 (src/utils/error.rs:63)
04-18 09:27:58.574   288   320 I mm-radio: Call state: 7 (src/radio/radio_voice.rs:102)
04-18 09:27:58.574   288   320 I mm-radio: Call monitoring stopped (src/radio/radio_voice.rs:116)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.