Author Topic: Problem in sending file without opening the dialog box using BTTransferclient  (Read 2144 times)

Offline mihirvora16

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
Private Sub BFSerialPortClientX_OnData(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BFSerialPortClientX.OnData
        Dim Data As BluetoothFrameworkX.BFByteArrayX
        Data = New BluetoothFrameworkX.BFByteArrayX()
        Dim Size As Integer
        Size = 255
        BFSerialPortClientX.Read(Data, Size, False)
        edSerialData.Text = edSerialData.Text + Data.AsString
        Dim url As String
        url = Data.AsString
       
        Dim webClient As New System.Net.WebClient
        url = "http://" + url
        webClient.DownloadFile(url, "C:\blue\1.html")
        edSerialData.Text = url
        BFFileTransferClientX.OpenDevice()
        'BFFileTransferClientX.Transport = BluetoothFrameworkX.BFAPITransportX.atBluetooth
        '// atIrDA, atCOM
        'BFFileTransferClientX.BluetoothTransport.Address = ("00:11:9F:D4:A6:0B")
        ' BFFileTransferClientX.Open()
        'BF1.BluetoothTransport.Address = "00:11:9F:D4:A6:0B"
        'BFFileTransferClientX.Transport = BluetoothFrameworkX.BFAPITransportX.atBluetooth
        'BFFileTransferClientX.BluetoothTransport.Address = "(00:11:9F:D4:A6:0B)"
        'BFFileTransferClientX.Open()
        BFFileTransferClientX.Put("C:\blue\1.html")
    End Sub


the commented part is given by u in the forum
we are basically facing problem in automating the process of sending the file from pc
we don want to follow the dialog box method to send data from pc to mobile

"        'BFFileTransferClientX.Open()    "
the control stucks at the above line in the code
pls help us out mike
we are doing a project for sharing the internet of pc on mobile device using the bluetooth connection
so we need to send in the webpages requested from phone to pc back to the phone
help us out


Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2467
  • Karma: 1000
    • Wireless Communication Library
Hi,

comment out this line:
BFFileTransferClientX.OpenDevice()

and use these:

BFFileTransferClientX.Transport = BluetoothFrameworkX.BFAPITransportX.atBluetooth
BFFileTransferClientX.BluetoothTransport.Address = "(00:11:9F:D4:A6:0B)"
BFFileTransferClientX.Open()


If you use C++/.NET i do recoment to use WCL instead BTF
WCL - Wireless Communication Library
TextBlue - Bluetooth Proximity Marketing Software
WCL Phone Explorer - Free Phone Content Manager

Offline mihirvora16

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
we have tried this but its not working mike
i mean there is some problem at the line of

BFFileTransferClientX.Open()

the above line doesnt get executed donno wats the problem

we just want to automate things of sending the file from pc to mobile
without the dialog
help us out
we can send u the snapshots if u want
pls help us we will be so thankful to u!!!
 ???

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2467
  • Karma: 1000
    • Wireless Communication Library
And what does not work exactly? What is error/exception?
WCL - Wireless Communication Library
TextBlue - Bluetooth Proximity Marketing Software
WCL Phone Explorer - Free Phone Content Manager

Offline mihirvora16

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
there is no such error

the code that contains the open() method doesnot get executed the code above the statement executes the program comes to halt at this line
we dont get any error or exception as such

help us mike

i m sending the snapshots of our current working project along wit some documentation to give more idea of our problem

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2467
  • Karma: 1000
    • Wireless Communication Library
replace these code lines:

With BFFileTransferClientX.BluetoothTransport
  .Address = "(00:11:9F:D4:A6:0B)"
  .Port = 8
End With
BFFileTransferClientX.OpenDevice()

by

With BFFileTransferClientX.BluetoothTransport
  .Address = "(00:11:9F:D4:A6:0B)"
End With
BFFileTransferClientX.Open()

That is all you should to do.

P.S. I do strongly recomend to use WCL instead BTF.
WCL - Wireless Communication Library
TextBlue - Bluetooth Proximity Marketing Software
WCL Phone Explorer - Free Phone Content Manager

Offline mihirvora16

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
thanks lot i wil try it and let u know the progress if it really works
anyways keep in touch mike