How to send indication over SSI USB CDC to DS2278 scanner

O Oleksandr Lebediev 9 months ago
120 1 0

Hello!

Hello! I have several  DS2278 wireless scanners which connected in SSI over USB CDC mode (emulate serial port via usb).

I need to send some signals from my software to scanner (BEEP, blink red or green leds etc) to indicate user about success \ fail recognitions of barcode.

How can I do that?

Option "beep on bell" is enabled.

I tried send over serial BELL (07h) but reciev only ENQ (05h) from scanner and it not beep signal.

I found an SSI manual https://www.zebra.com/content/dam/zebra_new_ia/en-us/manuals/barcode-scanners/software/ssi-cordless-pg-en.pdf  and try to send Send Beep/LED Code Sequence to the Scanner 0x05 0xe6 0x04 0x00 0x01 0xff 0x10 (where 0x01 = high short beep) but nothing fires.

import serial

port = "COM3"  
baudrate = 9600  

ser = serial.Serial(port, baudrate=baudrate)


command_beep = b'\x05 \xe6 \x04 \x00 \x01 \xff \x10'

ser.write(command_beep)
s = ser.read()

print(s)

ser.close()

What correct way to send indication to user programaticaly?

Please Register or Login to post a reply

1 Replies

O Oleksandr Lebediev

I`ve found solution for my problem.

Below working example in python for beep the beeper scanner.

import serial

port = "COM3"  
baudrate = 9600  
ser = serial.Serial(port, baudrate=baudrate)




def calculate_checksum(msg):
    checksum = 0
    for byte in msg:
        checksum += byte
    checksum = ~checksum + 1
    return checksum & 0xFFFF  # Ensure checksum is 16 bits

# Add checksum to message
def add_checksum(msg):
    checksum = calculate_checksum(msg)
    msg.append(checksum >> 8)
    msg.append(checksum & 0xFF)



msg = [0x05, 0xe6, 0x04, 0x00, 0x05]
add_checksum(msg)

msg=bytes(msg)
print("Message with checksum:", msg)
ser.write(msg)
ser.close()
CONTACT
Can’t find what you’re looking for?