From Openmoko

(Redirected from OpenmokoFramework/cli)
Jump to: navigation, search

Cli-framework is an interactive python command line for testing the FSO framework. With cli-framework you can explore the whole interface of the framework in an interactive way. It's the perfect tool for testing the API.

Where to get => frameworkd => tools

How to use

For a list of available commands see the FSO API docs!

root@om-gta01:~# cli-framework interactive command line
>>> dir()
       [   'MainLoop',
>>> gsmdevice.GetInfo()                                                                                                                                  
{   'imei': '111222333444555666',
    'manufacturer': 'FIC/OpenMoko',
    'model': '"Neo1973 GTA02 Embedded GSM Modem"',
    'revision': '"HW: GTA02BV5, GSM: gsm_ac_gp_fd_pu_em_cph_ds_vc_cal35_ri_36_amd8_ts0-Moko8"'}

>>> gsmsim.GetAuthStatus()

>>> gsmsim.ListPhonebooks()
['emergency', 'dialed', 'received', 'contacts', 'missed', 'own']

>>> contacts=gsmsim.RetrievePhonebook('contacts')

>>> contacts[0]
(1, 'Mickey', '+4912345678')

>>> contacts[1]
(79, 'MNP-Info', '+4917710667')

>>> contacts[2]
(80, 'Sperrnotruf', '+49177116116')
Personal tools