fix(urovo): don't SET RFID before an encode; document that it can wedge the module
Adding set_rfid(tag_type=1) ahead of the read-back seemed like cheap insurance
and was the opposite. On this firmware a SET RFID sent while the UHF module is
already active left it answering NOTHING -- READ and QUERY returned no bytes at
all under every tag type, while model()/status() kept working -- and that state
survived every software command tried. It presents exactly like a media
alignment fault ("before: null", chip apparently never in the window) on a
roll whose inlay fills the label. The printer arms RFID itself at power-up.
Leave it. set_rfid()'s default is corrected to 1 (0 is OFF) for any caller that
does use it deliberately.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
88f18d98a1
commit
508418fd0a
@ -83,6 +83,12 @@ def do_print(body, encode):
|
||||
|
||||
before = verified = None
|
||||
if encode:
|
||||
# Deliberately NO `SET RFID` here. It was tried as an "arm the radio first" step and
|
||||
# made things worse: on this firmware a SET RFID sent while the module is already
|
||||
# active silenced every UHF command that followed (READ/QUERY returned no bytes at
|
||||
# all, all tag types, until a power-cycle) -- and that looks identical to a media
|
||||
# alignment problem. The printer arms RFID itself on power-up; leave that alone.
|
||||
# Likewise never send &DEFAULT,i from here (README warns it re-arms/resets RFID).
|
||||
# UHF WRITE commits immediately -- it does NOT wait for PRINT (daemon.cs
|
||||
# assumed it did). That lets us read the chip back and confirm the encode
|
||||
# BEFORE spending a label on it.
|
||||
|
||||
10
mac/urovo.py
10
mac/urovo.py
@ -226,9 +226,15 @@ class Urovo(object):
|
||||
def rfid_setup_default(self): self.cmd('&DEFAULT,i')
|
||||
def rfid_autocalibrate(self): self.cmd('&CALIBRATE,A,R')
|
||||
|
||||
def set_rfid(self, tag_type=0, rw_position=0, void_printout=0,
|
||||
def set_rfid(self, tag_type=1, rw_position=0, void_printout=0,
|
||||
try_encode=3, error_handle=0, speed=1, retry=3):
|
||||
"""SET RFID -- positions are in DOTS (203dpi = 8 dots/mm), never mm."""
|
||||
"""SET RFID -- positions are in DOTS (203dpi = 8 dots/mm), never mm.
|
||||
|
||||
tag_type=1 is UHF Gen2. tag_type=0 is RFID OFF -- and it used to be the default here.
|
||||
Seen live: after &DEFAULT,i the module went completely silent (UHF QUERY/READ returned
|
||||
no bytes at all while model()/status() answered), reads failed at every media position,
|
||||
and a 40 mm sweep found "no chip" on a roll whose inlay fills the label. SET RFID 1,...
|
||||
brought it back on the first try. Never default to 0."""
|
||||
self.cmd('SET RFID %s,%s,%s,%s,%s,%s,%s' % (
|
||||
tag_type, rw_position, void_printout, try_encode, error_handle, speed, retry))
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user