Solved

Transfer graphic over serial port in vb.net

Posted on 2013-12-22
4
752 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
[X]
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
  • 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

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

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

This article is a step by step guide on how to create a basic PTP link using Ubiquiti airOS devices. This guide can be used on the following Ubiquiti AirMAX devices. Nanostation, Bullets, AirBridge, Nanobeam, NanoBridge to name a few. Please review …
In this article we have discussed about the OS X EI Capitan and how to fix Wi-Fi issue in OS X El Capitan. We have explained how to delete system level preferences and create a new Wi-Fi location to resolve Wi-Fi issue.
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…

733 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