PM9500 host to scanner led light command

Hi,

I am trying to send a red led light command from a Java application to my scanner. Currently the code is

TelnetClient telnet = new TelnetClient();
telnet.setConnectTimeout(5000);// Timeout 5s
telnet.connect(ip, port);
InputStream in = telnet.getInputStream();
BufferedReader r = new BufferedReader(new InputStreamReader(in));
String s = "";
OutputStream os = telnet.getOutputStream();
while(!"stop".equals(s)) {
	  s = r.readLine();
	  System.out.println(s);
	  String ESC = "\\x1b";
	  String END = "\\x0d";
	  String DC2 = "\\x12";
	  String redLedOn  = "[8q";
	  String badTxtTone = "[4q";
	  String redLedOff  = "[9q";
	  String textMessage = DC2+ESC+redLedOn+ESC+badTxtTone+ESC+redLedOff+END;
	  os.write(textMessage.getBytes());
	  os.flush();
				
          System.out.println("Flushed message: "+textMessage);
}
telnet.disconnect();
System.out.println("Disconected");

But it’s not working. I do not see any red light led on. Anybody knows what am I doing wrong?

Regards

1 Like

Hi, Do you hear the bad tome ?
Try to remove the redLedOff command.

String textMessage = DC2+ESC+redLedOn+ESC+badTxtTone+END;

Hi, sorry to dig this up, but I have a similar problem and it doesn’t feel right to open a new Topic.

I’m using a Quickscan QM2131 BK433 with BC2030 cradle connected via USB/COM.
I set my scanner to OBEY host commands, as the BEL beep wouldn’t work in IGNORE mode.

I’d like to send a command to the scanner/cradle to emit the bad read tone. I got it to beep on BEL, but it doesn’t seem to understand ESC sequences.

EDIT: here is my configuration:
config.xml on gist

Here is my C# code:

SerialPort serialPort_ = new SerialPort();
serialPort_.PortName = "COM3";
serialPort_.BaudRate = 9600;
serialPort_.DataBits = 8;
serialPort_.StopBits = StopBits.One;
serialPort_.Handshake = Handshake.RequestToSend;
serialPort_.Parity = Parity.None;
serialPort_.ReadTimeout = 4000;
serialPort_.WriteTimeout = 6000;
serialPort_.Open();

List<byte[]> messages = new List<byte[]>();

// bel, cr "ascii bel beep" WORKS!
messages.Add(new byte[] { 0x07, 0x0d });

// ESC, [, 4, q, cr "bad tx beep" NOPE:
messages.Add(new byte[] { 0x1b, 0x5b, 0x34, 0x71, 0x0d });

// dc2, ESC, [, 4, q, cr "bad tx beep" NOPE:
messages.Add(new byte[] { 0x12, 0x1b, 0x5b, 0x34, 0x71, 0x0d });

foreach (var msg in messages)
{
    serialPort_.BaseStream.Write(msg, 0, msg.Length);
    System.Threading.Thread.Sleep(200);
}

serialPort_.Close();
1 Like

Also I have a question regarding sending ASCII code to this reader.

Like BEEP and LED flash.

Could not find a good explanation for this.

It is now January 2022, 2 years after the original post.
I am following the “Powerscan_9501_AR_family_prg_eng.pdf” Product Reference Guide document.
In the Message formatting section, it states: “Message Formatting is available for PM9501-AR models only.”

QUESTION: Is there a a difference between a model PM9501 and PM9501-AR? What is the AR? How can I tell which model I have?
The model on the label says “Powerscan PM9501”, The Type is DDPM910RB

The section also states “For this feature to be operational, the scanner must be set to Ignore Host Commands” What is the HOST? I would have guessed that the host is my application that is talking to the scanner. I tried to program the scanner to Ignore host commands as well as obey them, but all attempts to send message commands to the scanner had no result at all. No errors, no flickers, no beeps.

Hello @Joe_Bonifazi

This forum is mainly meant to provide general information on Datalogic Mobile products , mainly Android and Windows CE devices.

For any question on PowerScan 95xx Series or his equipment, please contact the nearest Datalogic branch or open a tech request via the company’s tech support portal available here.

Simone Callegari
Datalogic Mobile Products Specialist - L3 SW Engineer