1) Testing on TC55 device.
2) Problem seems to be somewhere in transforming ProfileConfig object into XML and storing in internal repository. Wrong syntax or something.
Hi Georgiy How are you checking on if illumination mode is working? Is it just wrong in the DataWedge UI or did you actually trigger the scanner and not see the correct behavior? The PROFILE_FLAG.GET will only return what was stored in the profile. It does not actually retrieve what DataWedge currently has stored (so if you process a profile and then go into DW and make changes, the PROFILE_FLAG.GET will only return what the profile definition has not what DW has) Re: 2) Problem seems to be somewhere in transforming ProfileConfig object into XML and storing in internal repository. Wrong syntax or something. Are you seeing an error somewhere? Can you share a log file or snippet? Thanks
Hi Robert. Thanks for the reply.
I'm checking illumination both ways, by triggering scanner (by software trigger as well) and by checking the profile in DataWedge. In both cases all settings are clearly reflected except for illumination.
The behavior of PROFILE_FLAG.GET you describe differs from the Docs: "If the profileFlag is set to SET, and if the given profile is not available in the EMDKConfig.xml, it will look for valid profile in extraData argument and if present, the profile will be added to the internal XML volatile repository and also applied to the device... If profileFlag is set to GET and if the profile is present in the internal repository, it will be returned in extraData". So, from the Docs I expect SET to create profile in internal repo from ProfileConfig object and GET to retrieve it back. By "applying to the device" I understand sending some kind of reference to the profile in repo for DW. Docs are outdated or I just don't get something?
About (2) - I'm not seeing any errors, it's just a guess. I'm not sure how to trace this behavior, logcat doesn't show much of what EMDK is doing. Maybe it is possible to get the XML right after ProfileManager creates it, any ideas where to look for the file?
When you set the Illumination Mode ON using Wizard, you will see the code something like "<parm name="illumination_mode" value="torch"/>" in EMDKConfig.xml file. This works fine.
But now when you set the Illumination Mode ON using ProfileConfig, the code that gets generated in the background is something like "<parm name="illumination_mode" value="1"/>". This does not work because you can see the value is "1" and not "torch" in the response.
The team is working on this issue and it will be resolved soon. Meanwhile if you still want to set it using "processProfile" method, then you can pass the xml response as a string in "processProfile" method with value torch for Illumination Mode, which works fine.
Please find the sample code which turns the Illumination Mode ON by setting XML response string in "processProfile" method.
// Prepare XML to modify the existing profile
String modifyData = new String;
// Set the parameters in XML
modifyData = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
+ "<wap-provisioningdoc><characteristic type=\"Profile\">"
+ "\"<parm name=\"ProfileName\" value=\"BarcodeProfile\"/>"
+ "<parm name=\"ModifiedDate\" value=\"Mon Aug 11 20:21:56 GMT 2014\"/>"
+ "<characteristic type=\"Barcode\" version=\"0.1\">"
+ "<parm name=\"scanner_input_enabled\" value=\"true\"/>"
+ "<parm name=\"scannerSelection\" value=\"INTERNAL_CAMERA1\"/>"
+ "<characteristic type=\"Decoders\"><parm name=\"decoder_ean13\" value=\"true\"/>"
+ "<parm name=\"decoder_ean8\" value=\"true\"/></characteristic>"
+ "<characteristic type=\"ReaderParams\"><parm name=\"illumination_mode\" value=\"torch\"/></characteristic>"
// Call process profile to modify the profile of specified profile
EMDKResults results = profileManager.processProfile(profileName,
This should work and turn on the Illumination.
Your XML sample is very useful.