Avatar of heydude
heydude

asked on 

Transfer graphic over serial port in vb.net

I am looking for help(website, code, etc..) on how to transfer a graphic file over a serial port in vb.net. I have another device that is connected to my pc over bluetooth. I have found a bunch of sites that talk about binarywriter, streamwriter, sending text over serial, etc.., but don't really talk about sending files over a serial port. I have managed to send text over the com port, but not sure what to do with graphics.

thank you for your help
.NET ProgrammingVisual Basic.NETWireless Networking

Avatar of undefined
Last Comment
heydude
Avatar of hjgode
hjgode
Flag of Germany image

Although you may send files directly over serial port (or any other stream) you may need some verification code on the other side or better say a protocol for the transfer.

There are already well-known protocols for serial file transfer from the good old days. They are called xModem, yModem, zModem and kermit and .... Some of them are available in hyperterminal for windows.

There are some commercial libs ($$$) to be used with dotnet. There may be some free or open-source libraries too (one I found is at http://code.google.com/p/ymodemdotnet/source/browse/#svn%2Ftrunk%2FCurit.Module.RTX.Com, although it is C# you can use it as C# lib in a separate project and reference the lib from your VB.NET code). Another open source one is ZModem4net at http://sourceforge.net/projects/zmodem4dotnet/

You may also go with your own 'protocol' or send a zipped file and verify it after receive.

Send and receive has to be done in chunks (for example 2KByte at once). You have to repeatly read the data of the file into byte array and then write this to the serial port.
Avatar of heydude
heydude

ASKER

I took a look at the info, but itlooks like it is more for receiving then sending. I wasn't able to do anything with it.
ASKER CERTIFIED SOLUTION
Avatar of hjgode
hjgode
Flag of Germany image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of heydude
heydude

ASKER

Thank you
.NET Programming
.NET Programming

The .NET Framework is not specific to any one programming language; rather, it includes a library of functions that allows developers to rapidly build applications. Several supported languages include C#, VB.NET, C++ or ASP.NET.

137K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo