Ofono/phonesim installation and startup

Source: Internet
Author: User

Reference: http://blog.csdn.net/bluebeach/article/details/5889983

Install and start ofono

1. Download ofono and phonesim from https://www.kernel.org/pub/linux/network/ofono/

2. Some Dependent packages need to be installed, such as: sudo apt-Get install libglib2.0-dev libudev-dev libdbus-1-dev libcap-ng-dev libtool

3. Remove BT When configuring ofono:
./Configure -- disable-Bluetooth

4. Make; sudo make install

5. sudo ofonod-nd '*' to start ofono.

Install and start phonesim

If you do not have a 3G modem, you can install a phonesim phone simulator.

1. Download phonesim from https://www.kernel.org/pub/linux/network/ofono/

2. CD phonesim

3. install some dependency packages: APT-Get install build-essential libqt4-dev

4. Make; sudo make install

5. the src/phonesim-Gui src/Default. xml step is used to start phonesim.

After starting phonesim, you will find nothing happens, but in fact phonesim has already established a sock connection in port 12345. You need to modify/usr/local/etc/ofono/MODEM. conf (or/etc/ofono/MODEM. conf ).

[Phonesim]

Driver = phonesim

Address = 127.0.0.1

Port = 12345

Save the changes and then start ofono.

Ofonod [2460]: src/GPRS. C: ofono_upls_context_driver_register () DRIVER: 0x810a588, name: hsomodem
Ofonod [2460]: src/radio-settings.c: ofono_radio_settings_driver_register () DRIVER: 0x810a5a4, name: hsomodem
Ofonod [2460]: src/GPRS. C: ofono_upls_context_driver_register () DRIVER: 0x810a538, name: mbmmodem
Ofonod [2460]: src/STK. C: ofono_stk_driver_register () DRIVER: 0x810a554, name: mbmmodem
Ofonod [2460]: src/voicecall. C: ofono_voicecall_driver_register () DRIVER: 0x810a440, name: hfpmodem
Ofonod [2460]: src/network. C: ofono_netreg_driver_register () DRIVER: 0x810a4c0, name: hfpmodem
Ofonod [2460]: src/call-volume.c: ofono_call_volume_driver_register () DRIVER: 0x810a4f8, name: hfpmodem
Ofonod [2460]: src/voicecall. C: ofono_voicecall_driver_register () DRIVER: 0x810a3a0, name: calypsomodem
Ofonod [2460]: src/STK. C: ofono_stk_driver_register () DRIVER: 0x810a3f0, name: calypsomodem
Ofonod [2460]: src/GPRS. C: ofono_upls_context_driver_register () DRIVER: 0x810a36c, name: Invalid weimodem
Ofonod [2460]: src/radio-settings.c: ofono_radio_settings_driver_register () DRIVER: 0x810a338, name: nwmodem
Ofonod [2460]: src/voicecall. C: ofono_voicecall_driver_register () DRIVER: 0x810a200, name: atmodem
Ofonod [2460]: src/MODEM. C: ofono_devinfo_driver_register () DRIVER: 0x810a29c, name: atmodem
Ofonod [2460]: src/call-barring.c: ofono_call_barring_driver_register () DRIVER: 0x810a250, name: atmodem
Ofonod [2460]: src/call-forwarding.c: ofono_call_forwarding_driver_register () DRIVER: 0x810a020, name: atmodem
Ofonod [2460]: src/call-meter.c: ofono_call_meter_driver_register () DRIVER: 0x810a060, name: atmodem
Ofonod [2460]: src/call-settings.c: ofono_call_settings_driver_register () DRIVER: 0x81_f20, name: atmodem
Ofonod [2460]: src/phonebook. C: ofono_phonebook_driver_register () DRIVER: 0x810a280, name: atmodem
Ofonod [2460]: src/SSN. C: ofono_ssn_driver_register () DRIVER: 0x810a290, name: atmodem
Ofonod [2460]: src/ussd. C: ofono_ussd_driver_register () DRIVER: 0x810a1b0, name: atmodem
Ofonod [2460]: src/SMS. C: ofono_sms_driver_register () DRIVER: 0x8109fc0, name: atmodem
Ofonod [2460]: src/Sim. C: ofono_sim_driver_register () DRIVER: 0x810a140, name: atmodem
Ofonod [2460]: src/STK. C: ofono_stk_driver_register () DRIVER: 0x810a18c, name: atmodem
Ofonod [2460]: src/network. C: ofono_netreg_driver_register () DRIVER: 0x810a0e0, name: atmodem
Ofonod [2460]: src/CBS. C: ofono_cbs_driver_register () DRIVER: 0x8109fe8, name: atmodem
Ofonod [2460]: src/call-volume.c: ofono_call_volume_driver_register () DRIVER: 0x810a2c8, name: atmodem
Ofonod [2460]: src/GPRS. C: ofono_upls_driver_register () DRIVER: 0x810a2f0, name: atmodem
Ofonod [2460]: src/GPRS. C: ofono_upls_context_driver_register () DRIVER: 0x810a304, name: atmodem
Ofonod [2460]: src/MODEM. C: ofono_devinfo_driver_register () DRIVER: 0x81097ac, name: isimodem
Ofonod [2460]: src/phonebook. C: ofono_phonebook_driver_register () DRIVER: 0x810979c, name: isimodem
Ofonod [2460]: src/network. C: ofono_netreg_driver_register () DRIVER: 0x81097e0, name: isimodem
Ofonod [2460]: src/voicecall. C: ofono_voicecall_driver_register () DRIVER: 0x8109820, name: isimodem
Ofonod [2460]: src/SMS. C: ofono_sms_driver_register () DRIVER: 0x8109880, name: isimodem
Ofonod [2460]: src/CBS. C: ofono_cbs_driver_register () DRIVER: 0x81098a0, name: isimodem
Ofonod [2460]: src/Sim. C: ofono_sim_driver_register () DRIVER: 0x81098c0, name: isimodem
Ofonod [2460]: src/SSN. C: ofono_ssn_driver_register () DRIVER: 0x8109904, name: isimodem
Ofonod [2460]: src/ussd. C: ofono_ussd_driver_register () DRIVER: 0x8109910, name: isimodem
Ofonod [2460]: src/call-forwarding.c: ofono_call_forwarding_driver_register () DRIVER: 0x8109940, name: isimodem
Ofonod [2460]: src/call-settings.c: ofono_call_settings_driver_register () DRIVER: 0x8109960, name: isimodem
Ofonod [2460]: src/call-barring.c: ofono_call_barring_driver_register () DRIVER: 0x8109988, name: isimodem
Ofonod [2460]: src/call-meter.c: ofono_call_meter_driver_register () DRIVER: 0x81099a0, name: isimodem
Ofonod [2460]: src/radio-settings.c: ofono_radio_settings_driver_register () DRIVER: 0x81099c8, name: isimodem
Ofonod [2460]: src/GPRS. C: ofono_upls_driver_register () DRIVER: 0x81099dc, name: isimodem
Ofonod [2460]: src/GPRS. C: ofono_upls_context_driver_register () DRIVER: 0x81099f0, name: isimodem
Ofonod [2460]: src/MODEM. C: ofono_modem_driver_register () DRIVER: 0x8109760, name: isimodem
Ofonod [2460]: src/MODEM. C: ofono_modem_create () Name: phonesim, type: phonesim
Ofonod [2460]: src/MODEM. C: set_modem_property () Modem 0x84ea770 Property Address
Ofonod [2460]: src/MODEM. C: set_modem_property () Modem 0x84ea770 property Port
Ofonod [2460]: plugins/phonesim. C: phonesim_probe () 0x84ea770
Ofonod [2460]: plugins/Bluetooth. C: manager_properties_cb ()
Ofonod [2460]: plugins/Bluetooth. C: parse_adapters ()
Ofonod [2460]: plugins/Bluetooth. C: parse_adapters () Calling getproperties on/org/bluez/1398/hci0
Ofonod [2460]: plugins/Bluetooth. C: parse_devices ()
Ofonod [2460]: plugins/Bluetooth. C: adapter_properties_cb () Adapter address: 00: 22: 69: C6: 0f: 4D, path:/org/bluez/1398/hci0
Ofonod [2460]:
Using device:/org/bluez/1398/hci0/dev_00_bd_3a_69_60_ AB, devaddr:
00: BD: 3A: 69: 60: AB, adapter: 00: 22: 69: C6: 0f: 4D
Ofonod [2460]: src/MODEM. C: ofono_modem_create () Name: HFP/002269c60f4d_00bd3a6960ab, type: HFP
Ofonod [2460]: plugins/HFP. C: hfp_register_ofono_handsfree () Registering ofono agent to Bluetooth daemon

The above log contains the following line, which indicates that ofono can correctly detect phonesim.

Ofonod [2460]: plugins/phonesim. C: phonesim_probe () 0x84ea770

Power on phonesim

1. CD ofono/test

2../list-Modem

Xxx @ xxx :~ /Ofono/test $./list-Modems
[/HFP/002269c60f4d_00bd3a6960ab]
Interfaces =
Powered = 0
Name = Nokia N900
Features =
Online = 0

[/Phonesim]
Interfaces =
Powered = 0
Features =
Online = 0

The above log shows that two modem instances exist, one is hfp modem connected to Bluetooth, and the other is phonesim.

3../enable-Modem

Xxx @ xxx :~ /Ofono/test $./enable-modem/phonesim
Connecting modem/phonesim...

Enable-modem is used for power on modem. After startup, the modem is offline. For example, the flight mode is offline. After enable-modem, phonesim will display an interface. You can do many things through it in the future. :-)

4../online-Modem

Xxx @ xxx :~ /Ofono/test $./online-modem/phonesim
Setting modem/phonesim online...

Online-modem enables all modem functions, such as GPRS and SMS.

5. Let's make a call.

Xxx @ xxx :~ /Ofono/test $./test-voicecall/phonesim 10086
Using modem/phonesim
Dialing 10086...
Dialing in progress, got OBJ:/phonesim/voicecall01
State: Dialing, Number: 10086
Voice call [/phonesim/voicecall01] added
State = dialing
Lineidentification = 10086
Multiparty = 0

Voicecall property: 'state' changed to 'alerting'
Voicecall property: 'state' changed to 'active'
Voicecall property: 'starttime' changed to '2017-09-17t09: 27: 54 + 123'

Congratulations! Your first phone is connected! ;-)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.