M
Milsnips
Hi there,
i've got a BlueTake BT200 bluetooth printer adapter thats hooked up to an
EPSON LX300 dot matrix printer, and an app that creates a text file, then
sends the stream of the text file to the bluetooth port.
It prints out good, however something is making it print very very slow with
pauses in between.
my file size is 2kb, bluetooth adapter buffer is 32kb and printer i think is
4 or 8kb so it shouldnt be a buffer issue but i cant figure out why it
prints so slow.
If i print via BTfrom a desktop text file, the performance is fine and it
prints fast.
Here is the code i use to pass the data to the bluetooth port:
Sub SendToSerial(ByVal outputDestination As printType, ByVal filename As
String)
Dim pC As New CFPrinting.CommDevice
Dim fs As IO.FileStream
Try
pC.Port = "COM7:"
Try
pC.Init()
fs = IO.File.Open(filename, System.IO.FileMode.Open)
Dim ctr As Integer = 0
For j As Integer = 0 To CInt(fs.Length - 1)
If ctr = 1024 Then
Threading.Thread.Sleep(1000)
ctr = 0
End If
pC.Send(Convert.ToByte(fs.ReadByte()))
ctr += 1
Next
fs.Close()
Catch ex As Exception
MsgBox(ex.Message)
Finally
fs = Nothing
pC.ClosePort()
pC.Dispose()
End Try
Catch ex As Exception
'error occured here...
End Try
pC = Nothing
fs = Nothing
End Sub
Any help apprecieated to why the bluetooth print adapter prints slower from
a PDA (Imate JAMIN) than when its from the desktop pc.
thanks.
Paul
i've got a BlueTake BT200 bluetooth printer adapter thats hooked up to an
EPSON LX300 dot matrix printer, and an app that creates a text file, then
sends the stream of the text file to the bluetooth port.
It prints out good, however something is making it print very very slow with
pauses in between.
my file size is 2kb, bluetooth adapter buffer is 32kb and printer i think is
4 or 8kb so it shouldnt be a buffer issue but i cant figure out why it
prints so slow.
If i print via BTfrom a desktop text file, the performance is fine and it
prints fast.
Here is the code i use to pass the data to the bluetooth port:
Sub SendToSerial(ByVal outputDestination As printType, ByVal filename As
String)
Dim pC As New CFPrinting.CommDevice
Dim fs As IO.FileStream
Try
pC.Port = "COM7:"
Try
pC.Init()
fs = IO.File.Open(filename, System.IO.FileMode.Open)
Dim ctr As Integer = 0
For j As Integer = 0 To CInt(fs.Length - 1)
If ctr = 1024 Then
Threading.Thread.Sleep(1000)
ctr = 0
End If
pC.Send(Convert.ToByte(fs.ReadByte()))
ctr += 1
Next
fs.Close()
Catch ex As Exception
MsgBox(ex.Message)
Finally
fs = Nothing
pC.ClosePort()
pC.Dispose()
End Try
Catch ex As Exception
'error occured here...
End Try
pC = Nothing
fs = Nothing
End Sub
Any help apprecieated to why the bluetooth print adapter prints slower from
a PDA (Imate JAMIN) than when its from the desktop pc.
thanks.
Paul