Public Class Form1
Dim Client As New InTheHand.Net.Sockets.BluetoothClient
Dim Client2 As New InTheHand.Net.Sockets.BluetoothClient
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
'Dim addr As InTheHand.Net.BluetoothAddress = InTheHand.Net.BluetoothAddress.Parse("001DF66F876E")
Dim addr As InTheHand.Net.BluetoothAddress = InTheHand.Net.BluetoothAddress.Parse("001a4551333b")
'Dim ep As New InTheHand.Net.BluetoothEndPoint(addr, InTheHand.Net.Bluetooth.BluetoothService.Headset)
Dim ep As New InTheHand.Net.BluetoothEndPoint(addr, InTheHand.Net.Bluetooth.BluetoothService.RFCommProtocol)
'Dim ep As New InTheHand.Net.BluetoothEndPoint(addr, InTheHand.Net.Bluetooth.BluetoothService.HandsfreeAudioGateway)
'Dim ep As New InTheHand.Net.BluetoothEndPoint(addr, InTheHand.Net.Bluetooth.BluetoothService.L2CapProtocol)
InTheHand.Net.Bluetooth.BluetoothSecurity.PairRequest(addr, "0000")
Client.Authenticate = True
'Client.Encrypt = True
Client.SetPin(addr, "0000")
Client.Connect(ep)
Client2.SetPin("0000")
'Client2.Connect(ep2)
'Debug.Write("Connected Linkkey: " & cli.LinkKey.ToString)
Dim peerStream As System.IO.Stream = Client.GetStream()
Dim MyBytes() As Byte = System.Text.ASCIIEncoding.ASCII.GetBytes("RING" & vbCrLf)
peerStream.Write(MyBytes, 0, MyBytes.Length)
Dim MyRETBytes(128) As Byte
peerStream.Read(MyRETBytes, 0, 128)
MyBytes = System.Text.ASCIIEncoding.ASCII.GetBytes("AT+VGS=15" & vbCr)
peerStream.Write(MyBytes, 0, MyBytes.Length)
MyBytes = System.Text.ASCIIEncoding.ASCII.GetBytes("AT+VGM=15" & vbCr)
peerStream.Write(MyBytes, 0, MyBytes.Length)
MyBytes = System.Text.ASCIIEncoding.ASCII.GetBytes("RING" & vbCr)
peerStream.Write(MyBytes, 0, MyBytes.Length)
Debug.WriteLine("RING")
End Sub
Private Sub DiscoverBT()
Debug.WriteLine("Discovering Devices")
Dim BTDevices() As InTheHand.Net.Sockets.BluetoothDeviceInfo = Client.DiscoverDevices
For Each device As InTheHand.Net.Sockets.BluetoothDeviceInfo In BTDevices
'device.GetServiceRecords()
Debug.WriteLine("Device Name: " & device.DeviceName)
Debug.WriteLine("Device MAC: " & device.DeviceAddress.ToString)
Debug.WriteLine("Connected: " & device.Connected)
Debug.WriteLine("Class: " & device.ClassOfDevice.ToString)
Debug.WriteLine("Authenticated: " & device.Authenticated)
Debug.WriteLine("Last Seen: " & device.LastSeen)
Debug.WriteLine("Last Used: " & device.LastUsed)
Debug.WriteLine("Remembered: " & device.Remembered)
Debug.WriteLine("rssi: " & device.Rssi)
For Each MyGuid As System.Guid In device.InstalledServices
Debug.Write("Installed Services: " & MyGuid.ToString & vbCrLf)
Next
device.ShowDialog()
Next
Debug.WriteLine("Discovering Devices Done")
End Sub
End Class
Alright Ive gotten this far, Does Jabra only allow RING from a CELLPHONE Class?