zxing node-red-contrib-qrcode-generator - issues with Wi-Fi QR code - zxing

If I create a QR code in Node Red for Open Wi-Fi network it works fine i.e. I paste the resulting msg.payload content into browser, scan it with my iPhone (iOS 14.2) and it brings up request to to join the specified Wi-Fi network.
If in the node I hard-code encryption = WPA, SSID = MySSID and Password = abcd12345 (also tried "abcd12345") when I paste msg.payload into my browser I always get error "might be temporarily down or it may have moved permanently to a new web address. ERR_INVALID_URL".
I had a bit more success injecting a string (WIFI:T:WPA;S:myWiFi;P:abcd12345;;) into the node in that it creates a QR code, but when I scan it then iPhone shows "No usable data found". I tried with "" around S and P options too.
Any ideas?...

Ah, missed in the nodes guide that it requires msg.qrcodeinput as the input, not msg.payload! Changed that and now it works.

Related

Scanning DataMatrix QR code on Raspberry PI

I am trying to scan a QR code and get the data from it on my raspberry pi.
The scanner I am using is the: DS6510b-2d
I am scanning the QR code on the picture below the post:
This QR code has separators so I can differentiate the DATA.
When I scan the QR code on Windows I get the following result:
10ABC123↔21U001273↔12040104↔3712345678
This is correct and exactly what I need.
When I scan the QR code connected to the raspberry I get the following:
10ABC12321U001273120401043712345678 Here it is missing the sepperators, this makes it impossible to differentiate the data.
How do I get it so when I scan the QR code on my raspberry it also shows the sepperators?
Thank you in advance for your help.
QR CODE:
A few ideas, though I can test none as I don't have your scanner...
You could try starting a "virtual console", see here, which is text-based and doesn't use X11, and then scanning with your scanner to see if the X11 server and keyboard mappings are "eating" your separators.
I'm not proposing this as a permanent solution, just a step in working out the issue.
Or, with X11 server started, you could run xev to see what X events are generated when you scan and potentially then use xmodmap to convert you "left right double arrow" thing into some other symbol all concerned parties can work with.
I don't use Windows but there must be a tool to get the Unicode codepoint of your "left right double arrow" thing. I guess it is U+21d4, see here.
Then you could type/generate that codepoint on the Raspberry Pi using this and see what Raspbian makes of it.

Why barcode scanner opens Chrome developer console in chrome?

I just bought a barcode reader from China model Honeywell HH400. It works perfectly when I use it other device. But now I use it in my web application and I am getting a problem. It always toggle Chrome developer console. I also tried scanning barcode into URL bar, and it does the same. Does it have an event to trigger F12 what? Or misconfiguration with the scanner that I don't know?
I am sure that you might have already received a solution.
But for others who might come across this issue,
I ran into this problem today and found that no matter what prefix or suffix I try, on every browser it emulates pressing F12 which opens the browser console.
The same barcode functioned as required a couple of weeks ago.
Every barcode comes with a quick start guide that you can use to set prefix suffix etc.
There is also a bar code that "Recalls Defaults". Just scan that and you should have the factory defaults set.
This resolved my issue.
Hope it helps someone.
For me the solution was to remove the "Line Feed" suffix ( which was not removed when I scanned the "remove all suffixes" code ), as the line feed is interpreted as CRTL-J on windows machines ... no idea why !?
( no time to research it either ;)

Single Sign On not working on TV

I've created a basic application (virtually no content, just a blank page) to test the SSO functionality. It doesn't work, when I test on the TV it gives the error error_cp_001.
The config.xml contains, among other things:
<cpauthjs>Authorization8888.js</cpauthjs>
<login>y</login>
The Authorization8888.js file contains:
var Authorization8888 = {};
Authorization8888.checkAccount = function(id, pw, cb) {
cb("TRUE");
};
I have already tried with <cpauthjs>Authorization8888</cpauthjs>. I have also tried with Authorization without 8888 for the filename and vars. It always shows that error.
I also tried in the SDK simulator, same error as on the real TV. On the simulator I see these extra debug lines:
[JS ALERT]: ####################22222eval(accountCheckFunc) error
[JS ALERT]: Fail to load Account check moudule.
Error : Can't find variable: Authorization8888
I can share the zip file containing the whole application, but it's really simple to reproduce since it has nothing except this basic SSO-related code.
I found the answer, posting it in case someone else hits the same problem.
The problem was deploying via USB. Apparently, an application deployed with the USB stick has limited functionality. Deploying the application via a web server fixed a lot of issues, including this one.

Creating dynamic manifest files that work with ipads and iphones

Problem: The browsers within apples ipad and iphone don't seem to like dynamically generated manifest files (we constantly get errors involving either missing images or .aspx pages that can be accessed from the device or "Application Cache manifest could not be fetched"). We originally had a manifest.ashx acting as our manifest that would dynamically create and pull some pieces from the web server for offline app functionality. This process worked fine for the majority of browsers and mobile devices but failed on the apple products.
Thoughts: For some reason safari doesn't seem to register the manifest.ashx correctly (this is where we dynamically create the manifest file) and just gives up on trying to open it. We truly need a dynamic manifest file for the requirements of the project so switching to a static manifest file would not work. Does anyone have any suggestions towards alternative creation methods for dynamic manifest files?
Code:
manifest.ashx
public class Manifest : IHttpHandler
{
public void ProcessRequest( HttpContext context )
{
ManifestGenerator generator = new ManifestGenerator();
context.Response.ContentType = "text/cache-manifest";
//Create the dynamic manifest file here (returns the manifest as a string)
context.Response.Write( generator.GenerateManifest() );
context.Response.Flush();
}
}
Thanks,
Updated Thoughts v1: Leaning towards thinking this maybe a device specific manifest fault as all the other mobile and desktop devices are accessing the app just fine (including being able to go offline). Currently I have moved back to a dynamically generated manifest (within the manifest.ashx) and the ipad / iphone still dies when trying to fetch but it does get further then it did before (error was: "Application Cache update failed, because "file path goes here" could not be fetched"). A strange aside to this is the fact that the desktop version of safari handles the web app just fine (as well as an install of chrome on the ipad had no troubles accessing the site on/off line) while the mobile versions of it do not.
Updated Thoughts v2: Seems that this issue is safari specific as I have the web app running online/offline with chrome for the apple products (iphone/ipad). Still looking for a fix / work around for the safari browsers though...
For Safari/iPad, the manifest file must end with .manifest. Atleast, that's what my tests determined.
So, in order to make this work, you will have to dynamically generate the .manifest file using a HttpHandler and some changes in web.config to do map cache.maifest to the handler. The idea is that the call to the non-existent cache.manifest would actually get mapped to the handler, which would then send back dynamic content.
This is currently the part I'm stuck at, so I cannot help you here yet.

XCode debugger not helping find device-only issue

So, I have an iOS tabbed app (live and free in the store [http://itunes.com/apps/iphoundyou]). One tab is a grouped tableview, with the number of groups (1 or 2) dependent on some JSON that a web service returns. The JSON is valid and straightforward. Handling it seems to be easy, and, when run in the simulator, behaves as expected. However, I just found that when run on the device, if the two section reaction is needed...it crashes.
"ok" I thought "I'll just hook up my device, launch the debugger, replicate the crash, and figure out where I have a bug"
However, when I did that, I get the most unhelpful response I could expect:
So, given that it works in the simulator, is there any suggestions as to how else to track down the flaw? The code for the tableview is nothing special, along the lines of "if this JSON key exists, number of sections=2...with the number of rows of that section equal to the number of items in another array within the JSON"
Another note: I recently started seeing a dozen or so of these when launching an app:
unable to read unknown load command 0x25
unable to read unknown load command 0x26
Thanks so much.
In my case it turned out that it was just my own error: I'd updated my device OS but didn't have that SDK (I was behind in updating XCode)