HELP! BCD436HP protocol changes & additions?
With Firmware Version 1.08.06, the handling of BCD436HP menus (the way menu data is sent to a computer connected via USB) has changed.
Previously the <GSI> or <PSI> commands would return no useful XML data while the scanner was displaying any menu -- just the typical 'OK' ACK to confirm that the scanner received the <GSI> or <PSI> command. In order to programmatically replicate what was being displayed on the scanner's display, it was necessary to issue an <STS> command and parse the return data.
With 1.08.06, while the scanner is displaying any menu the return XML data will include a <ScannerInfo.Mode> == 'Menu tree' and a <ScannerInfo.V_Screen> == either 'menu_selection' (for any menu with a sub-menu) or 'plain_text' (for any menu with no further navigation path other than BACK).
In the 'menu_selection' case, other returned data includes <MenuSummary.name> (the value of which is a string that matches the heading displayed on the scanner's screen) and <MenuSummary.index> (the value of which is an integer, likely an index to some definition of the menu selections.)
EXAMPLE 1
Scanner on "See Scanner Information" screen (which has sub-menu selections):
GSI,<XML>,
<?xml version="1.0" encoding="utf-8"?>
<ScannerInfo Mode="Menu tree" V_Screen="menu_selection">
<MenuSummary name="See Scanner Information" index="4293001180" />
<ViewDescription>
</ViewDescription>
</ScannerInfo>
EXAMPLE 2
Scanner on "Firmware Version" screen (which has no sub-menu selections):
<?xml version="1.0" encoding="utf-8"?>
<ScannerInfo Mode="Menu tree" V_Screen="plain_text">
<ViewDescription>
<PlainText Text="Firmware Version" />
<PlainText Text="Version 1.08.06 " />
<PlainText Text="SN37626048007560" />
<PlainText Text="SUM=156,M-Ver= 1" />
<PlainText />
<PlainText />
<PopupScreen Text="Firmware Version
Version 1.08.06 
SN37626048007560
SUM=156,M-Ver= 1

">
<Button Text=""E" (OK)" KeyCode="E" />
</PopupScreen>
</ViewDescription>
</ScannerInfo>
I can 'fake' the previous (1.05.01) behavior by issuing an <STS> command whenever I get <ScannerInfo.V_Screen == 'Menu_selection'), but this seems a pretty backward way to do things (especially since <STS> seems to have been deprecated as of the Remote Command Specification Version 0.17.)
Is there an update to the Version 0.17 spec, in sync with the 1.08.06 Firmware update?
Also, the implementation of the XML for <PlainText> items displayed on the scanner screen seems sub-optimal...unlike multiple lines of <InfoArea> text fields during scanning (returned with unique identities, <InfoArea1.Text> and <InfoArea2.Text>), as shown in "Example 1" above multiple lines of text shown on the scanner screen are tagged with the same <PlainText.Text> attribute. My guess is the <PopupScreen.Text> is unpacked and used to populate the multiple <PlainText> fields (with '&#D;' terminating each line of text), and rather than numbering each newline (<PlainText.Text1> or <PlainText1.Text>, <PlainText.Text2> or <PlainText2.Text>, etc.) the same attribute <PlainText.Text> is used for each newline. I can fix this while I'm parsing the XML in my code, but it's annoying. Okay, I'll stop complaining now.
I'd like to update my code to handle menus the *proper* way with 1.08.06...so I appreciate any *pointers* on how to use the *index values*!
-rbn