Bluetooth Serial Port communication program for the PDA.

pdablue

Active Member
Licensed User
Longtime User
Hi,

This program allows you to transmit ASCII characters from your PDA
to an external Bluetooth module. You can send one character at a time
or you can create your own string of characters to be tranmitted.

The program has buttons to support the individual transmission of both
Upper case and Lower Case alphabetic characters ( A - Z ) and ( a - z ).

The program has buttons to transmit the numeric characters ( 0 - 9 ).

The program has buttons to transmit 24 special characters.

You can create your own character strings by tapping the Stylus in the
TX window to move the focus to the TX textbox and use the (S.I.P)
Soft Input Panel keyboard to enter your text string, then press the
"Send TX" button to transmit the entire string at once.

I used the BlueSmiRF Bluetooth module in "Loop-Back" mode to test this program.
"Loop-Back" mode is the TX line connected to the RX line, on the Bluetooth module.

In the program "Bluetooth SPP", the Green textbox is the TX (transmit) window and the
Yellow textbox is the RX (receive) window.

The file "BSP3.JPG" is the screenshot view of the program.
The file "Bluesp3.sbp" is the Basic4ppc source code for the program.
The file "BlueSPPzip.zip" is the zipped up ARMV4 (.CAB) installation file.
 

Attachments

  • BSP3.JPG
    BSP3.JPG
    24.8 KB · Views: 302
  • Bluesp3.sbp
    23.4 KB · Views: 377
  • BlueSPPzip.zip
    54.4 KB · Views: 331
Last edited:

taximania

Well-Known Member
Licensed User
Longtime User
Here's a taster. Name all your Buttons - Button1, Button2, Button3 etc.
Add a click event for each button as shown here.
B4X:
For a = 1 To [U][I]number of buttons[/I][/U]
AddEvent("Button" & a,Click, "Btn_Click")
Next a

Your single Button click sub is as below.
B4X:
Sub Btn_Click
a=Sender.text
End Sub

variable 'a' now holds the 'text' of the button that was clicked.

By using the 'Control' keyword you can access other properties from
the Button eg:
B4X:
x=10
Control("Button" & x).Text="Hi"
This would alter the text of Button10 to 'Hi'

Hope I've made sense here ;-)
 

pdablue

Active Member
Licensed User
Longtime User
Thanks for the programming tips.

I will have to try some of these out and see how they work.
 
Top