473,320 Members | 2,088 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Why the barcode did not respond to image capture Command

6
I am working on write a program that reads and writes from the barcode
my problem when writing (send command to barcode)

I read in pdf manufacturer barcode that the command of capturing the image is IMGSNP so i pass it to write function as follows serialPortObj.write ("IMGSNP")

But Why does not have a barcode to respond to the command ? and did not capture the image :(
Is this wrong way
Barcode manufacturer is HandHeld (4800p)
Thanks for any help
Oct 18 '09 #1
13 3839
tlhintoq
3,525 Expert 2GB
There could be a dozen different reasons - with so little information to go on.

Maybe you don't have the COM port at the right Speed/Parity for the reader.
Maybe the reader has to be configured first for the type of barcode you are reading (Code 128, Code 39, Postal, etc.)

Maybe you haven't put it into Continuous Scan mode first?

Maybe it is reading, but you aren't correctly getting that data back.
Oct 18 '09 #2
daniam
6
Thank you very much tlhintoq and sorry for the delay in reply
I have ascertained what you referred to (Speed/Parity ...) All works well
Sorry, I did not mention that 2d barcode type reads well but the problem that barcode reader does not read the image and to read the image i have to send command ,i mean the barcode reader did not respond to the command of reading image (even it did not launch light reading or beebing)
I have corresponded with the manufacturer and I await a reply
if there are any suggestions Many Thanks :)
Oct 18 '09 #3
tlhintoq
3,525 Expert 2GB
I'm sorry to say that I cannot understand what parts are working well and not working well.

All works well... Scanner reads well... does not read well...

even it did not launch light reading or beebing)
These are not indications of receiving a command in most barcode readers.
A beep happens when the scanner is successful at decoding a barcode, to let you know it is done/successful.

That the scanner did not *try* indicates that it did not receive the command to scan.

Hopefully the manufacturer will be able to help.
Oct 19 '09 #4
daniam
6
i'm sorry Mr.tlhintoq on vague of my last response

here is my code
Expand|Select|Wrap|Line Numbers
  1.         private  SerialPort Com ;        
  2.         private delegate void DataReadDel(string Text);
  3.  
  4.         private void Form1_Load(object sender, EventArgs e)
  5.         {
  6.             Com = new SerialPort("COM4");
  7.             Com.Open();
  8.             Com.DataReceived += new SerialDataReceivedEventHandler(port_DataReceived);
  9.         }
  10.         private void port_DataReceived(object sender,SerialDataReceivedEventArgs e)
  11.         {
  12.             Com.Encoding = Encoding.Default;
  13.             this.BeginInvoke(new DataReadDel(DataReceived), new object[] {Com.ReadExisting() });
  14.         }
  15.         private void DataReceived(string dR)
  16.         {
  17.             textBox1.Text = dR;
  18.         }
  19.         private void button1_Click(object sender, EventArgs e)
  20.         {
  21.             if (! Com.IsOpen )
  22.             {
  23.                 Com.Open();
  24.             }
  25.             Com.Write("IMGSNP1B1L");//1B 1L these parameter to make the barcode and illuminate beep when it reads
  26.             Com.Write("IMGSHP");//to ship image from memory
  27.             string imgbytes = Com.ReadExisting();// return "" :(
  28.         }
this is what manufacture documentation say :
An image is taken when the Image Snap (IMGSNP) command is processed. The last image is always stored in memory. You may “ship” the image by using the IMGSHP command.

any suggestion
I appreciate your time many thanks :)
Oct 19 '09 #5
Plater
7,872 Expert 4TB
Well converting your potential image to text seems like a bad plan.
Oct 19 '09 #6
tlhintoq
3,525 Expert 2GB
An image is taken when the Image Snap (IMGSNP) command is processed. The last image is always stored in memory. You may “ship” the image by using the IMGSHP command.
I don't think you need to go this direction.
You don't really care about taking an image do you? Do you need an image of the barcode you are reading?
You really only want to have the reader to the reading and decoding - then return the value of the barcode.
If you just get an image, then you need to do the decoding yourself. Yuck.
You might want to re-read the PDF and find a command that returns the decoded barcode.
Oct 19 '09 #7
tlhintoq
3,525 Expert 2GB
@Plater
Usually a barcode scanner will do the decoding. It shouldn't be an image translated to text. It should be the value of the barcode returned as text:

*123456789*
Oct 19 '09 #8
tlhintoq
3,525 Expert 2GB
Expand|Select|Wrap|Line Numbers
  1.             Com = new SerialPort("COM4");
  2.             Com.Open();
  3.  
That's just not going to be sufficient in the real world.
You need to set the parameters of the port if you want to talk to the device
Com.Baud = 9600
Com.Parity
Com.Handshake

and so on. If you don't talk at the right speed, with the right parameters then you aren't talking at all.
Oct 19 '09 #9
daniam
6
Thnaks Plater i can add the following line
Expand|Select|Wrap|Line Numbers
  1. Byte[] dR =Encoding.ASCII.GetBytes(imgbytes)
  2.  
Because the function ReadExisting() return string
but the problem that it return "" there is no bytes so there is no image captured
Oct 19 '09 #10
daniam
6
Mr. tlhintoq in fact my interest and my question here from the beginning about the possibility of taking image and not read the barcode :)
and the barcode reader has the ability to take a picture
In a very easy way the barcode reader able to read the barcode
But the problem I have in some cases may need to take image
(Not for barcode it self but image for passport or product etc.. Which doesn't contains a barcode ) so I have to question
For the code : this is an example only and not a real project in the real project
I verify all the existing ports and assign the correct values to each property of barcode .....
Actually like you said when the barcode is read it return text as follows:

???#???????24-8#062xx000z8k#L",dsh4y.[eg|p$eW47uCآ=^'(zk1jbdQL u!a#@(,NtaBoxFX}DI^n(رkgtm8<jyB.V,Sg@Yo?eexmNd~*"K TP]!{OKGTل9nTV%Q1q-VW%0M=,WI+^jYx8<{ZMVde[JAXBhT.IلBxIJLKliiGflP:<TCyM{<Ts75)scj"w_oوs-m_e8P-Lk~;H1%NF"Or+HS>KVkTU:(2.BqYl+}Uxmb4Gx)E2pznT`Gt.J zD<UXd!Z~>>#&KYJ]:#S!(g}Av=24;098:<93362;7916>>;80;2;061?

thaaaaaaaaaanx a lot .
Oct 19 '09 #11
lukit
1
Any solution so far? I have the same issue.
Jul 29 '10 #12
daniam
6
Hello lukit,
In fact I navigate the website of The manufacturer of barcode reader and found SDK,so I used it in my win APP,
and I change unicode or ascii property belonging to class in sdk
For any other Q I'm ready.
Aug 1 '10 #13
Maybe a little late but better than never :)

To take the image from scanner you should do something like this:

byte[] commandHeader = new byte[3];
commandHeader[0]=22;
commandHeader[1]=77;
commandHeader[2]=13;

com.write(commandHeader, 0, 3);
com.writeLine("IMGSNP."); //you can add options to command if you like
com.write(commandHeader, 0, 3);
com.writeLine("IMGSHP.");

Then you have to receive the image

while(com.BytesToRead != 0) {
byte inChar = (byte)port.ReadChar();
//write bytes to a file or so
}

And that's it. Hope that helps.
Jan 14 '12 #14

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: Krishna Sagiraju | last post by:
Hai, I gotta decode a barcode from an image ( ppm, bmp, or jpg). I realize the first milestone would be to recognize a barcode with in the image: I took a small window (say 80X80 pixels) and if...
1
by: Krishna Sagiraju | last post by:
Hai, I gotta decode a barcode from an image ( ppm, bmp, or jpg). I realize the first milestone would be to recognize a barcode with in the image: I took a small window (say 80X80 pixels) and if...
4
by: | last post by:
Hi all, we have a need to barcode encode and display a record identifier (number) both in html in the browser and through fdf in adobe acrobat in realtime. Is this possible? Can anyone make any...
10
by: Samuel Shulman | last post by:
I assume that when I use a barcode reader (at least some of them) it will input the number as though it was entered in via the keyboard How can I then get the value without setting to focus to a...
2
by: Jay | last post by:
I'd like to be able to capture barcode scans (ISBNs of books) from a barcode scanner. I already have a barcode scanner which has a USB interface, and by default the scanner acts like a second...
7
by: Alper Ozgur | last post by:
Hi; How can i capture and decode the barcode that reading by an usb Barcode reader?
2
by: =?Utf-8?B?UmludSBHb3BhbGFrcmlzaG5hIFBpbGxhaQ==?= | last post by:
Hi, I have an application with a barcode in the Image. I want to read the barcode from the image using program. Image resolution is 120 X 120 DPI.I tried to read thru different barcode SDKs...
4
by: kurapix | last post by:
Hi there!!! I've been working on recognizing EAN barcodes from images. Yes it's about recognizing barcodes from images but from bars not from the digit with the help of OCR software but with...
7
by: divyac | last post by:
I am doing an inventory control project and i want to create barcodes for the products in addition to the product details in a form.The form values should be submitted to the database to retrieve for...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.