Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Transfer graphic over serial port in vb.net

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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

This subject  of securing wireless devices conjures up visions of your PC or mobile phone connecting to the Internet through some hotspot at Starbucks. But it is so much more than that. Let’s look at the facts: devices#sthash.eoFY7dic.
Using in-flight Wi-Fi when you travel? Business travelers beware! In-flight Wi-Fi networks could rip the door right off your digital privacy portal. That’s no joke either, as it might also provide a convenient entrance for bad threat actors.
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…

860 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