Menu

Main Menu
Talk Get Daily Search

Member's Online

    User Name
    Password

    Making Call using XTerminal?

    Reply
    mrudulpen | # 1 | 2010-05-05, 09:34 | Report

    Hi,

    I am interested in making calls by sending commands on Xterminal.

    Idea is to connect N900 using ssh to my ubuntu machine and send commands from ubuntu machine to n900 so that it can make calls.

    I would also like to do the same using usb connection, where in my n900 is connected to ubuntu machine using usb(PC suite mode) and I send command from ubuntu to n900, it(n900) initates a call as a result.

    Regards

    Mrudul

    Edit | Forward | Quote | Quick Reply | Thanks

     
    Salatheel | # 2 | 2010-05-05, 09:47 | Report

    Code:
    dbus-send --system --type=method_call --print-reply --dest=com.nokia.csd.Call /com/nokia/csd/call com.nokia.csd.Call.CreateWith string:"$YOURNUMBERHERE" uint32:0

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following 5 Users Say Thank You to Salatheel For This Useful Post:
    Blaizzen, clasificado, hycraig, lostinmirkwood, ossipena

     
    F2thaK | # 3 | 2010-05-05, 09:53 | Report

    wow, thats cool. pretty well, a computer that makes phone calls

    Edit | Forward | Quote | Quick Reply | Thanks

     
    max_power | # 4 | 2010-05-05, 14:07 | Report

    you can also use the ofono stack:

    http://wiki.maemo.org/User:Jebba/Ofono

    Edit | Forward | Quote | Quick Reply | Thanks

     
    lostinmirkwood | # 5 | 2010-05-05, 14:41 | Report

    I've often wondered if you can use dbus commands to get the most recent SMS ("Conversations") messages as well.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    benh_n900 | # 6 | 2010-05-05, 14:43 | Report

    Check out http://wiki.maemo.org/Phone_control - lots of xterm commands for doing all sorts of things

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following 5 Users Say Thank You to benh_n900 For This Useful Post:
    afaq, clasificado, fatalsaint, lostinmirkwood, rustler

     
    lostinmirkwood | # 7 | 2010-05-06, 15:12 | Report

    Wow, how did I not stumble across this Wiki before. Thanks.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    mrudulpen | # 8 | 2010-05-09, 19:50 | Report

    Hi,

    I tried giving the command on x-terminal and i get following error "Error com.nokia.csd.Call.Error.InvalidAddress: Create call: Invalid Address Error"

    I am giving command as follows -
    dbus-send --system --type=method_call --print-reply --dest=com.nokia.csd.Call /com/nokia/csd/call com.nokia.csd.Call.CreateWith string:"$0404848048" uint32:0

    (NOTE: I have changed the number but the number length kept is same.)
    I tried the same on serial port from my ubuntu machine using ATD command it works fine.
    for eg: ATD 0404848048;

    I have tried using python script and that also gives same error.
    Here is the python code -
    ====mycall.py========

    import gobject, dbus
    from dbus.mainloop.glib import DBusGMainLoop

    def place_call(number):
    bus = dbus.SystemBus()
    csd_call = dbus.Interface(bus.get_object('com.nokia.csd',
    '/com/nokia/csd/call'),
    'com.nokia.csd.Call')
    csd_call.CreateWith(str(number), dbus.UInt32(0))

    DBusGMainLoop(set_as_default=True)
    place_call('0404848048')
    gobject.MainLoop().run()

    ====mycall.py========

    Can someone point to me what is going wrong here?

    -MVP

    Edit | Forward | Quote | Quick Reply | Thanks

     
    woof404 | # 9 | 2010-05-28, 06:40 | Report

    Originally Posted by mrudulpen View Post
    Hi,

    I tried giving the command on x-terminal and i get following error "Error com.nokia.csd.Call.Error.InvalidAddress: Create call: Invalid Address Error"

    I am giving command as follows -
    dbus-send --system --type=method_call --print-reply --dest=com.nokia.csd.Call /com/nokia/csd/call com.nokia.csd.Call.CreateWith string:"$0404848048" uint32:0

    (NOTE: I have changed the number but the number length kept is same.)
    I tried the same on serial port from my ubuntu machine using ATD command it works fine.
    for eg: ATD 0404848048;

    I have tried using python script and that also gives same error.
    Here is the python code -
    ====mycall.py========

    import gobject, dbus
    from dbus.mainloop.glib import DBusGMainLoop

    def place_call(number):
    bus = dbus.SystemBus()
    csd_call = dbus.Interface(bus.get_object('com.nokia.csd',
    '/com/nokia/csd/call'),
    'com.nokia.csd.Call')
    csd_call.CreateWith(str(number), dbus.UInt32(0))

    DBusGMainLoop(set_as_default=True)
    place_call('0404848048')
    gobject.MainLoop().run()

    ====mycall.py========

    Can someone point to me what is going wrong here?

    -MVP
    That code worked fine with me. Remove the "$" from the string with the number in the dbus-send command on your terminal and see if it works better. I did some modification to implement a little dictionary, new code:

    Code:
    #!/usr/bin/python
    import dbus, sys
    
    def place_call(number):
    bus = dbus.SystemBus() csd_call = dbus.Interface(bus.get_object('com.nokia.csd', '/com/nokia/csd/call'), 'com.nokia.csd.Call') csd.call.CreateWith(str(number), dbus.UInt32(0))
    s = sys.argv[1] ar = ['name1', 00000000, 'name2', 00000000, 'name3', 00000000] if s == ar[0]:
    place_call(ar[1])
    elif s == ar[2]:
    place_call(ar[3])
    elif s == ar[4]:
    place_call(ar[5])
    else:
    print "Sry, mate"
    Had to write the adove code off from the N900 so there might be some typos, but you get the idea.

    Edit | Forward | Quote | Quick Reply | Thanks

     
vBulletin® Version 3.8.8
Normal Logout