isCan
Posts: 3
Joined: Tue Nov 11, 2008 8:46 pm

problems with sending

Tue Nov 11, 2008 8:49 pm

Hi,

we are connected to a blue-tooth device, which is member of a canbus and is sending can-messages of this bus. In the case that the count of the messages (about 160 messages of 18 byte/sec) reaches some limit, we are not able to send to the device - that is, the device doesn't response. When we are using hyperterminal, we don't have any problem. So we can be shure it is a problem of the franson.dll.

Greetings,
Andreas Gabriel

isCan
Posts: 3
Joined: Tue Nov 11, 2008 8:46 pm

RE: problems with sending

Tue Nov 11, 2008 9:29 pm

Maybe you need some more infos:

protocol: spp
stack: microsoft stack

the writing sub is: ( where m_stream is of type ServiceStream and the command is only a "C")


Private Sub write(ByVal command As String)

If m_stream Is Nothing Then
MessageBox.Show("No opened stream")
Else
Try
' Convert string to byte array
' Consider string to be 8 bit ascii
Dim charWrite() As Char = command.ToCharArray()
Dim byteWrite(charWrite.Length) As Byte
Dim inx As Integer

For inx = 0 To charWrite.Length - 1
byteWrite(inx) = Microsoft.VisualBasic.Asc(charWrite(inx))
Next
byteWrite(byteWrite.Length - 1) = 13

m_stream.Write(byteWrite, 0, byteWrite.Length)

Catch ex As Exception
'MessageBox.Show(ex.Message)
End Try
End If

End Sub

isCan
Posts: 3
Joined: Tue Nov 11, 2008 8:46 pm

RE: problems with sending

Wed Nov 12, 2008 4:44 pm

we have solved our problem. It wasn't your dll, but the receiver. We have to send byte per byte with a delay of some milliseconds.

Return to “BlueTools”