Shop OBEX P1 Docs P2 Docs Learn Events
Can the stamp2 with eb500 send message to handphone? — Parallax Forums

Can the stamp2 with eb500 send message to handphone?

luke09luke09 Posts: 3
edited 2009-02-05 06:40 in Learn with BlocklyProp
·I am doing a project that BASIC Stamp2 using eb500 module to communicating with a Bluetooth equipped cell phone.The·BASIC stamp2·can auto send a text message to a cell phone over the Bluetooth connection.

'{$STAMP BS2e}

' {$PORT COM11}

nCount VAR Byte

'Wait for the eb500 radio to be ready
'PAUSE 1000

'Connect TO the remote device
'SEROUT 1,84,[noparse][[/noparse]"con 00:0C:84:00:05:29",CR]
'SERIN 0,84,[noparse][[/noparse]WAIT("ACK",CR)]

'Wait for the connection to be established and switch into data mode.
'When switching into data mode, a 300ms timeout is required to give the
'module enough time to make the change.
'WaitForConnection:
'········· IF IN5 = 0 THEN WaitForConnection
'HIGH 6
'PAUSE 300


DEBUG "Connection established",CR
'Send "Hello World" ten times
FOR nCount = 1 TO 10
····· SEROUT 1,9600,[noparse][[/noparse]"atd97107215",CR]
····· PAUSE 1000
NEXT

'Switch to Command Mode
LOW 6
SERIN 0,9600,[noparse][[/noparse]WAIT(CR,">")]

'Disconnect from the remote device
SEROUT 1,9600,[noparse][[/noparse]"dis",CR]
SERIN 0,9600,[noparse][[/noparse]WAIT(CR,">")]

DEBUG "Disconnected",CR

Comments

  • edited 2009-01-15 22:01
    Yes, the BASIC Stamp + eb500 can do this with some phones. An example that uses the Javelin Stamp has been posted here:

    http://forums.parallax.com/forums/default.aspx?f=8&m=274534

    Look for: BT_DEMO.zip

    The source code will have to be ported. I found this using Google. Perhaps with some more searching, you will find an example in PBASIC.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Andy Lindsay

    Education Department
    Parallax, Inc.
  • lorayroverlorayrover Posts: 2
    edited 2009-02-02 00:43
    ·· The Basic Stamp is a microcontroller with a small specialized Basic interpreter (PBASIC) built into ROM.

    ··· It is made by Parallax, Inc and has been quite popular with electronics hobbyists·since the early 1990s due to

    ····its low threshold of learning and ease of use (due to its simple·BASIC language).


    ··· SPAM REMOVED

    Post Edited By Moderator (Aristides Alvarez (Parallax)) : 2/2/2009 1:25:04 AM GMT
  • Aristides AlvarezAristides Alvarez Posts: 486
    edited 2009-02-02 01:23
    Spam account lorayrover locked.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Aristides Alvarez
    Education Manager
    Parallax, Inc.
  • luke09luke09 Posts: 3
    edited 2009-02-04 19:25
    I didn't find an example in PBASIC.

    It is security problem? In the menu,"Strong Security on a Board of EducationCellular phones are typically configured for strong Bluetooth securitybecause not only do they allow youto make phone calls, but they often contain sensitive contact informationas well. In this exercise we willdemonstrate how to use the eb500-SER module to implement the strongBluetooth security model usedon cellular phones.To perform this exercise, as documented, you will need a PC running WindowsXP SP2, a Bluetooth USBadapter, a Board of Education, two 470 ohm resistors (yellow-violet-brown),one LED, and one eb500-SERmodule. If you are using any of the other supported Parallax boards, you may need to make adjustmentsto this exercise".

    And sombody said,
    "To send AT commands to the phone you will need to connect with the DUN profile rather than the SPP profile. You can do this by modifying the connect command as follows.

    con 11:22:33:44:55:66 dun

    The mobile phone only allows device connected to the DUN profile to access the AT parser. When you connect with SPP you have a data path to the phone that is accessible from applications running on the phone. Your phone probably terminated your connection when you started to send data because there was no application registered to handle the data."
    I tried the code,but it didn't success.
  • luke09luke09 Posts: 3
    edited 2009-02-05 06:40
    help
Sign In or Register to comment.