473,403 Members | 2,354 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

Receive garbage data from bluetooth which receive data from serail device

Recently we have connected one bluetooth device which receive data from our serial device. The bluetooth device further transmite this data to a Windows Mobile which is bluetooth enable. Baud rate of whole system is 19200 with 7 data bit and 1 stop bit and Even Parity.When we send command to serial device through bluetooth device it is accepting the command and respond accordingly. but some of data byte of string is desplay as question mark (?).

But in case we connect the serial device directly to PC, the string received is correct.

Code of vb.net program which I run in windows mobile is below:
Imports System
Imports System.IO.Ports
Imports System.Windows.Forms.TextBox
Public Class frmSelectComPort

Dim WithEvent port1 as serialport = _
New SerialPort(“Com2”,19200,Parity.Even, 7, StopBits.One)

Private Sub MnuConnect_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MnuConnect.Click

If port1.IsOpen Then
port1.Close()
End If
port1.DtrEnable = True
port1.RtsEnable = True
port1.ReceivedBytesThreshold = 1
port1.Open()

Dim str1,strcmd,strReadSegment0 As String
Str1="09RD000001"
strchksum=23
strcmd = New String(Chr(2) + str1 + Chr(3) + strchksum) + Chr(0)
Delay(5000)
port1.Write(strcmd, 0, strcmd.Length)
System.Threading.Thread.Sleep(70)
Delay(2000)
strReadSegment0 = port1.ReadExisting
‘here I receive the following string "?09?D03?A D?

End Sub


Private Sub Delay(ByVal num As Double)
Dim i As Double
For i = 0 To num
Next
End Sub
End Class
Command Given to Serial Port is "09RD000001 23
Response given by Serial Port is "?09?D03?A D?
But I Expect the following input from serial port : "09RD033A DA

Kindly provide the solution ASAP
Jan 19 '10 #1
1 2455
RedSon
5,000 Expert 4TB
I would say it's a radio interference error. Is there some kind of checksum that you can use in the packet? Try looping your program to try again until there are no more unknown characters, maybe it will correct itself?
Jan 19 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: nomenklatura | last post by:
Hi, I want to develop pocket pc program with visual studio .net this program read data from internet and bluetooth.. For example when i send data from program(server side) with bluetooth , other...
2
by: Federico Caselli | last post by:
Is it possible write a program to communicate with an external device via bluetooth using visual basic .net (of course for windows xp sp1 or later)? I tryed to read MSDN library about...
3
by: Tor Erik Sønvisen | last post by:
Hi I'm making a server-side solution in Python and need to be able to communicate through bluetooth. Is there any bluetooth-packages out there for python? regards tores
1
by: cmartin64x | last post by:
Hi, I am trying to make this simple code work but I have no success doing so: BLUETOOTH_DEVICE_SEARCH_PARAMS btsp = { sizeof(btsp) }; BLUETOOTH_DEVICE_INFO btdi = { sizeof(btdi) }; ...
0
by: AbdullahWMGhaleb | last post by:
--Dear All, Using WMI, I managed to get information about device ID and manufacturer of my USB Bluetooth adapter. However, I CANNOT GET Blueooth Device Screen Name !...
2
by: Hugh Janus | last post by:
I am trying to receive GPS data into a pocket PC 5.0. I am using the device emulator. The main PC has a bluetooth dongle connected and is bonded with the bluetooth GPS transmitter to COM8. In...
1
by: =?Utf-8?B?dGhlZ3JlZW5vbmU=?= | last post by:
How can i fix my issue of only being able to connect one device to a bluetooth connection. Situation: - I connect one device to a bluetooth device and finish using it. turn the device off and...
4
by: BLUE | last post by:
Psion WorkAbout Pro with Windows CE .NET 4.2 Dealer gave me PowerAPIOn.exe and PowerAPIOff.exe to turn on/off tag reader, but I want to do it programmatically and do the same with WiFi and...
2
by: Paul Sijben | last post by:
To automate/ease configuration in my app I am trying to find out to which serial port a certain bluetooth device is connected. With pybluez I can find out which bluetooth devices I have, but it...
2
by: m.a | last post by:
Hello, I want to write an application for a PDA system that communicates with a Bluetooth device using TCP/IP. I did a lot of Googleing, but I found nothing that helps me to find a starting...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.