×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    May 2009
    Posts
    3

    at commands in python

    Hi, is it possible to communicate with AT commands with phone ( as a modem) ? I need to make a data call. Is this possible via python program ?

  2. #2
    Super Contributor
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: at commands in python

    A search around this forum might return some results. And there is this article that shows how to use AT commands with Python and Bluetooth.

  3. #3
    Registered User
    Join Date
    May 2009
    Posts
    3

    Re: at commands in python

    Thank for advice. But what I need is from program, running on Nokia phone to give commands to the same phone and to establish not voice , but data call ( like: ATD 12345 without ; ) As I see in manuals, there are only commands to dial number and to hang it . Is it possible to gain more control to phone part? As example I want to send some strings via data channel using CSD data call.

  4. #4
    Regular Contributor
    Join Date
    Oct 2008
    Posts
    54

    Re: at commands in python

    Code:
    import appuifw, e32, socket
    
    sock=socket.socket(socket.AF_BT,socket.SOCK_STREAM,socket.BTPROTO_RFCOMM)
    addr,services=socket.bt_discover()
    address=(addr,1)
    sock.connect(address)
    
    sock.send('ATD 123456789\r')
    
    def exit_key_handler(): 
           appuifw.app.set_exit()
    
    appuifw.app.exit_key_handler = exit_key_handler
    
    app_lock = e32.Ao_lock() 
    app_lock.wait()

  5. #5
    Regular Contributor
    Join Date
    Oct 2008
    Posts
    54

    Re: at commands in python

    Code:
    import appuifw, e32, socket
    
    sock=socket.socket(socket.AF_BT,socket.SOCK_STREAM,socket.BTPROTO_RFCOMM)
    addr,services=socket.bt_discover()
    address=(addr,1)
    sock.connect(address)
    
    sock.send('ATD 123456789\r')
    
    def exit_key_handler(): 
           appuifw.app.set_exit()
    
    appuifw.app.exit_key_handler = exit_key_handler
    
    app_lock = e32.Ao_lock() 
    app_lock.wait()

Similar Threads

  1. Python for S60 1.9.4 is now released
    By tvijayan in forum Symbian
    Replies: 9
    Last Post: 2009-05-27, 10:39
  2. Python for S60 1.9.3 released
    By tvijayan in forum Symbian
    Replies: 40
    Last Post: 2009-04-03, 15:00
  3. Python for S60 1.9.2 released
    By tvijayan in forum Symbian
    Replies: 26
    Last Post: 2009-03-11, 09:28
  4. Python for S60 1.9.0 released
    By tvijayan in forum Symbian
    Replies: 48
    Last Post: 2009-01-27, 15:39
  5. Using AT commands in Python
    By Goku370 in forum Symbian
    Replies: 3
    Last Post: 2007-06-11, 20:46

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×