Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User bubuuns's Avatar
    Join Date
    Dec 2006
    Posts
    10
    Howto send AT command from s60 to other s60 via Bluetooth? Is this possible?

    Here what I tried:

    Code:
    import socket
    import appuifw
    import e32
    
    class BTReader:
        def connect(self):
            self.sock=socket.socket(socket.AF_BT,socket.SOCK_STREAM)
            addr,services=socket.bt_discover()
            print "Discovered: %s, %s"%(addr,services)
            if len(services)>0:
                import appuifw
                choices=services.keys()
                choices.sort()
                choice=appuifw.popup_menu([unicode(services[x])+": "+x
                                           for x in choices],u'Choose port:')
                port=services[choices[choice]]
            else:
                port=services[services.keys()[0]]
            address=(addr,port)
            self.sock.connect(address)
            self.sock.send(u'ATD[123]\n') # <=== HERE GOES AT COMMAND TO DIAL 123
            print "SENT!"
        def readline(self):
            line=[]
            while 1:
                ch=self.sock.recv(1)
                if(ch=='\n'):
                    break
                line.append(ch)
            return ''.join(line)
        def close(self):
            self.sock.close()
    
    bt=BTReader()
    bt.connect()
    print "Received: "+bt.readline()
    bt.close()
    Thanks.

  2. #2
    Registered User RICH?'s Avatar
    Join Date
    Feb 2006
    Location
    Helsinki, Finland
    Posts
    168
    I have a dumb question: What is AT?
    Nokia E66
    PyS60 1.4.4 final

  3. #3
    (Retired) Nokia Developer Admin. Nokia Ron's Avatar
    Join Date
    Jan 2006
    Location
    Michigan
    Posts
    4,664
    Quote Originally Posted by RICH?
    I have a dumb question: What is AT?
    I thought it originally stood for Attention Telephone but someone told me it was used to teletypes too (but I can't find any reference to that).
    But no matter the origin, AT now means attention and it is notifying the device that the command if for the device itself.

    Ron

  4. #4
    Registered User cyke64's Avatar
    Join Date
    Feb 2005
    Location
    Belgium (Europe)
    Posts
    1,352
    hello bubuuns

    It's a very interesting what you made with this script for using AT command in PyS60 !

    I've already read that you can use a virtual bluetooth port or IR for AT commands ...

    Here's some links about AT commands on Nokia phone :

    - Nokia_12_AT_Command_Guide_v2_1
    - AT_Command_Set_For_Nokia_CDMA_Products_v1_1
    - AT Command Set For Nokia GSM And WCDMA Products v1.2
    - Nokia premicell data list of AT commands
    - Nokia GSM set AT commands Set

    AT command example in C++ in ETEL doc
    Regards Cyke64
    Last edited by cyke64; 2007-01-02 at 12:04.
    pys60 1.4.5 and 2.0.0, pygame, PyS60 CE on E90 and 5800 !

    Find my pys60 extension modules on cyke64.googlepages.com

  5. #5
    Registered User bubuuns's Avatar
    Join Date
    Dec 2006
    Posts
    10
    Thanks for answers.
    I know all about AT Commands - only thing I wanted to know - how to execute AT commands via bluetooth from pys60. Just like I do it from Hyper Terminal, only now I want to do that from Nokia Smartphone.

  6. #6
    Registered User mladents's Avatar
    Join Date
    Feb 2007
    Posts
    5
    Does Nokia E61 support AT commands over usb data cabl. Some basic commans from hyperterminal works fine, but i didn't manage to find phonebook entries or to sent sms.

  7. #7
    Registered User jillion_shree's Avatar
    Join Date
    Feb 2007
    Posts
    10
    Hi bubuuns

    Me too working on that if u get any solutions for that put it on the board..


    Regards

    Jillion

Similar Threads

  1. Replies: 605
    Last Post: 2011-01-20, 15:14
  2. novice howto for mobile program development
    By terchris in forum Python
    Replies: 1
    Last Post: 2006-10-17, 21:55
  3. Howto send LF in text mode SMS
    By Royessers in forum General Messaging
    Replies: 2
    Last Post: 2003-06-12, 09:47
  4. nokia 7210 modem via IR doesn't work !
    By oussamaaiadi in forum PC Suite API and PC Connectivity SDK
    Replies: 1
    Last Post: 2003-03-06, 10:46
  5. S60 socket connection, can send but cannot receive
    By tangxj in forum Mobile Java General
    Replies: 2
    Last Post: 2002-09-04, 15:39

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved