Solved

Transfer graphic over serial port in vb.net

Posted on 2013-12-22
4
736 Views
Last Modified: 2014-01-03
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
0
Comment
Question by:heydude
  • 2
  • 2
4 Comments
 
LVL 16

Expert Comment

by:hjgode
ID: 39736315
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.
0
 

Author Comment

by:heydude
ID: 39749244
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.
0
 
LVL 16

Accepted Solution

by:
hjgode earned 500 total points
ID: 39750988
Sorry for that, I did not check if the code implements send and receive.

Here is one that supports send/receive using x-mode protocol: http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=7145&lngWId=10 and is written in VB.NET
0
 

Author Closing Comment

by:heydude
ID: 39755485
Thank you
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

With the purchase of CloudCommand by Comcast customers are left in a bind as subscriptions expire and render the AP's disabled. The following will explain how to flash your Ubiquiti AP's with CloudCommand firmware back to Ubiquiti firmware. HOWTO…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This Micro Tutorial will show you how to maximize your wireless card to its maximum capability. This will be demonstrated using Intel(R) Centrino(R) Wireless-N 2230 wireless card on Windows 8 operating system.
Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now