Share My Creation Simple server using SMS+Bluetooth

Beja

Expert
Licensed User
BT-Server.png

Hi,
This is a very simple server yet highly reliable solution with ultimate security. It's very useful for small projects and database
access from remote without the need for Internet connection. The operation is like this:
1- Android app in the cellphone sends SMS message to office cellphone.
2- Office cellphone forwards the SMS message to a Bluetooth module connected to a PC through USB-to-Serial adapter
3- Office PC parses and processes the SMS and sends the result back to the Office cellphone through same USB-to-Serial adapter.
4- Office cellphone sends SMS with retrieved data back to remote cellphone.
Enjoy!

p.s.
I have implemented this system in real business application and it's working fine. Since it uses the phone network then the
level of security is very high and no need for encryption.
 
Last edited:

Beja

Expert
Licensed User
Link to what ilan?
If you mean design details and part numbers I can provide that..

BTW: If you use the chat example then you effectively created a client/server network with unlimited number of users!
 
Last edited:

sorex

Expert
Licensed User
@Beja: did you also play with the IOIO board? I wonder if there are wireless modules for it aswell. (like for arduino)
 

ilan

Expert
Licensed User
Link to what ilan?
If you mean design details and part numbers I can provide that..

BTW: If you use the chat example then you effectively created a client/server network with unlimited number of users!
Sorry, i misunderstood. I thought u r sharing the source code of the app...
 

Beja

Expert
Licensed User
The app is commercial many database and tables, so it is difficult to publish the source code.. however this is the code for communication with the
serial port that I think it is the one important to you than anything.. the server side has to be in B4J but since is an old app in VB6 then it is difficult (for me)
to port it to B4J.. here is the vb6 code and you can either use VB or port it to B4A.

B4X:
      Private Sub MSComm1_OnComm()
      Dim X As Integer

         Dim InBuff As String
         Select Case MSComm1.CommEvent
            Case comEvReceive
               InBuff = MSComm1.Input
               Call UseInput(InBuff)
         End Select
         Timer1.Enabled = True
      End Sub
--------------------------------------------------------------------------------------------------------------------
Sub UseInput(InBuff As String)
On Error Resume Next
Dim crit As String
Dim answer As String
    Dim X As Integer
    Dim mm As String
         Text1.SelStart = Len(Text1.Text)
         Text1.SelText = InBuff
         mm = Text1.Text
         Select Case mm
            Case "Oops"
                Exit Sub
            Case Else
                Text2.Text = mm
          crit = Text2.Text
          crit = Trim(crit)
If crit <> "" Then
    Data1.RecordSource = "select * from cust where custID = '" & crit & "'"
    Data1.Refresh
    MSComm1.Output = vbLf & vbLf & V.Text
End If
        End Select
 End Sub
 
Top