Solved

Transfer graphic over serial port in vb.net

Posted on 2013-12-22
4
741 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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article I will describe how to setup a Cisco WLC 5508 to work with Apple's Bonjour protocol across VLANs.  I will also discuss using screen mirroring and Airplay on an AppleTV v3.  This article covers the wireless network only and requires m…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
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…

863 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

27 Experts available now in Live!

Get 1:1 Help Now