MiFare Card Reader into Web Application Form - web-services

I have a web application where I would like the card reader to scan our school's student ID cards and come out with their ID number. Our original system for managing this with the relevant card readers already has it preset to work, however, now I am trying to use the card reader for web browser forms.
I have coded my pages using Classic ASP and have the data linked to a MS Access Database. The card reader I am using is linked to a program application called Campus Online which manages our student ID cards and data. I am using an ACR122U card reader which works perfectly with our Campus Database.
Simply put, I want to be able to first open the homepage where the scan would need to take place. Scan the student ID card with the card reader in which the desired data (Student ID) will appear in the form field and submit. I've been searching for a couple of days now for a solution but there doesn't seem to be any clear answers to this. I am aware of the post at: How to read a mifare 1k card through ACR122U NFC Tag reader connected to local machine in a web application but it has clearly not answered my question on how to integrate the card reader with my web pages. It only shows demos that do not work with my card reader.
If there is any reference of code, online services that are available to do this or a method on how to integrate the ACR122U card reader with web pages, that would be best.
Thanks for the assistance.

You probably wanting to look into using ACR122U NFC Contactless Smart Card Reader Software Development Kit
How ever you look at this you will have to build some client application to facilitate the action of detecting the card, reading it and then outputting the Student ID to the Web Application window. There is no quick fix I'm afraid.
Luckily your card reader is PC/SC compliant which will make it easier to write something that can interface in a standard way to facilitate your required function. You want to look at using the winscard.dll to use the PC/SC functions built into the Windows OS.
Summary of what you need
Build an application (C++, .Net, Java or some other mainstream programming language that can access the PC/SC APIs in Windows) to do the following;
Detect the card reader.
Detect the card.
Detect the web application window (be it a browser window, custom app etc).
Read the Student ID (depending on whether you are talking about the UID of the card, you may need to perform some key based authentication of the card).
Pass-through the value (active window and injecting standard output).

Well this is quite old, but i was strugling with figuring it out too so I've decided to create some sort of "deamon" in .NET - you can create service, small app running in the background.
Then i've connected it to the websocket, and subscribed socket messages in my web application. now when i use card in my reader, the deamon reads it, and sens message to web socket. then web socket sends it to the app and voila

Related

How to broadcast audio *from* my website to clients

I want to have a button on a (private) webpage on my site that, when clicked, starts an audio stream from the computer of the user who pressed the button.
Then, I want that stream to be accessible on another webpage on my site.
I'm aware of YouTube, Periscope, Spreaker, and others, but it is my understanding that the broadcast, using these services, is initiated through their website or apps. I'm ok with the broadcaster having to download a plugin on-the-fly (that is, after he has pressed the button), but I want to avoid the broadcaster having to install software, or having to use an alternative website.
So, what I'm looking for is a service/API that somehow takes a live audio recording within a browser, and repackages that as a live feed, to be used in an (embedded) player, elsewhere.
I'm aware of software like Kurento, but I do not want to maintain the infrastructure myself. I just want the service/API to take care of that.
I'm also aware of join.me's API, but it's my understanding that the broadcaster still needs to install software to broadcast.
This service does not have to be free. And this service should (of course) not use Flash.
Does this exist?

Can Web Applications detect local printers?

I was wondering if it is possible for a Web Application (hosted on a remote server) able to detect printers connected to a host(the one accessing the Web Application)?
Also, is it also possible to be able to send print-jobs (mainly images) to the host's printer?
For instance, assume you have a local WPF application (Windows Presentation Foundation, C#) running on the desktop.
To print an image:
Select an Image on the WPF application (loaded from a directory on the local harddisk)
Click the "Print Button"
This will run this line of C# code:
e.Graphics.DrawImage(image, x-coordinate, y-coordinate, imageWidth, imageHeight);
And it will send a print job of the image to the default printer of the local computer.
So now, instead of a WPF application, you have a Web Application. The user will:
Type in the URL of the Web Application
The Web-App will load a page similar to the WPF application
The Web-App will display images that are loaded from say, a database.
User select image he wants to print
User clicks "Print Image"
However, in order to Print the image, I would imagine the Web-App would need to recognise the printers the user has on his local computer, and be able to communicate with the printer.
Of course, the Web-App does not need to be in .NET. I was just using WPF/C# as an example.
Bluntly, the answer is no. Server-side code can't talk with client-side resources in that manner.
A possible solution might be to embed some client-side component into your web app which does what you
want, such as a Java applet or Silverlight item. I don't know off the top of my head whether they're capable of printing, but it might be an option worth investigating.
However, I would suggest the best way to handle it (if your use-case allows), is to serve up something capable of printing via native browser methods. You are able to serve a stylesheet which applies to printing specifically using the media="print" attribute on your link element. If that remains too imprecise (you'd have no control over the browser's paper size, margins, headers/footers etc), perhaps another option might be to serve a print-specific file such as a PDF. Ultimately though, what you are asking is not possible and it is a case of finding another way to fulfil your requirements.
I have a similar issue, which I haven't programmed, but, I have found that HP printers can receive print jobs, through the HP network. If you are WiFi enabled, there should be a way to email the print job to the printer. I'm still researching this. But, I have a friend who did something similar using AWS.
Been a while, but I have learned that HP printers can be WiFi enabled. Which means, they get an email address and can be printed to, at that address, through the internet, if they are connected to a WiFi net connected to the internet. The email goes through the internet directly to the printer, where it is then printed. So, you can email a print doc.

How to send stream data via Bluetooth from an iPhone/iPod Touch to a Windows C++ application?

I need to develop an iPhone/iPod Touch application that creates a server to send some data stream (characters or bytes) to a Windows C++ application via Bluetooth. I'm thinking of creating a TCP connection, but don't know where to start.
What iPhone API should I use do to something like this? Does anyone knows some code examples that i can use to do this?
And in Windows, what should I use to support this kind of communication?
Thanks
Yes. From what it looks like you can use the PAN bluetooth profile (the same profile used for tethering) with everything except the original iPhone.
Here's an article doing bluetooth over iPhone/iPad using GameKit. The article notes that you would need at least 2 iPhone/iPad devices running iPhone OS 3.0, but I wouldn't take that as an impossibility to talk to any other bluetooth capable device.
Update
This forum indicates that the iPhone is only capable of headset pairing. It could be that the iPhone is "picky" about what you can pair it with.
"The iPhone only recognizes the "headset" profile. Another well thought out idea from Apple. No A2DP profiles, no OBEX."
-sapporobaby
Update 2
As jamone as indicated iPhone 3.0 supports A2DP. How nice is that?
Here's a table listing of iPhone/iPad bluetooth supported profiles
I'm pretty sure third-party developers don't have sufficient access to the Bluetooth stack to do this via published APIs (i.e. via an app you publish to the App Store).
Is using WiFi an option? That's what most developers seem to be using for client/server communications. If that's the case, see if you can distribute Apple's Bonjour runtime with your app. If you search the developer site for Bonjour, they have code samples (though probably no Windows examples).

Do I want an embedded web-server, or what?

So, someone want me to hack some code for him. He has a 42" TFT display on which he will display some application/business related data.
However, 75% of the screen real estate is unused, so he wants to fill it with "TV/adverts/flash/you know, that kind of thing... web based....".
Any advice? Do I want an embedded web-server? If so, which? (he wants free & open source, or as cheap as possible) Do I display it in a browser? (duh! probably, dude) But I don't want/need a menu, address bar, toolbar, etc - it should be full screen (does that mean "kiosk mode"?).
Sorry, folks, the requirements are not clear, but I hope that you can guess what he probably means (he is not very techie). How should I proceed with this? Thanks.
I am working on such a display system, although ours already quite evolved, with support for multi-screen, multi-user and a lot more.
A few hints :
We use firefox with the "full fullscreen" extensiton (https://addons.mozilla.org/fr/firefox/addon/1568) that allows to not display any menu bar, status bar etc. and to automatically start Firefox in that mode. Then you just need a startup script to launch firefox specifying the right URL when the machine is started.
Our system is web based, but as a multiscreen system it has one server and several client PCs connected to the server via HTTP, and each one to a TFT screen via VGA cables. If you have only one screen you could install the browser and the web server on the same machine. Only restriction : we use wake-on-lan from the server to the clients to automatically start the display every morning. This will not be possible with a single machine system !
To give you some ideas, the display mechanism basically works like that : first, the browser loads a html page with lots of javascript (that javascript constitutes what we will call the "client application".) This client application is written using the Prototype.js library (just an indication, there are many other possibilities). Then the client application asks the server for the content to be displayed. That content is passed as a JSON stream representing a playlist of objects (images, videos, text news, etc.). The client app displays each object in the playlist sequentially. The objects stay displayed for a specific duration (lots of setTimeout in the code). The transitions use effects from the Scriptaculous library (fade-in, fade-out...). When all objects have been shown, the client asks the server again for the playlist (in case changes have been made), and the process starts again. There is actually never a full reload of the page.
Then we also have a multi-content mode, where the screen is separated in various zones that are updated separately.
For one machine and a realtively static system (i.e. no GUI to add content), maybe you could implement that mechanism in a local site accessed via file://... The whole "intelligence" of the system would be in the javascript. That would save you the server part. I see one possible restriction : I think flash can't play video files from the client's machine (security restriction) so check this if you plan to use flash videos.
Well, I hope these few ideas can help you. Good luck !
Get one these
They offer a VESA mount for it I think if the screen your using supports that.
Full screen firefox would be one option.
A more flexible option would be a full screen QT app written in the language of your choice using the webkit widget for display, this would likely make flash content more difficult.
As for the content, i would put a LAMP setup on the fit pc. Build the web page using whatever feeds you want and just display the web page aka http://localhost
Alternatively you could host the "web parts" of the display on a standard web hosting server and display the data coming in on RS-422 in a separate QT widget.

How to keep a C++ realtime server application with a modern web client interface?

I develop industrial client/server application (C++) with strong real time requirements.
I feel it is time to change the look of the client interface - which is developed in MFC - but I am wondering which would be the right choice.
If I go for a web client is there any way to exchange data between C++ and javascript other than AJAX <-> Web service <-> COM ?
Requirements for the web client are: Quick statuses refresh, user commands, tables
My team had to make that same decision a few months ago...
The cool thing about making it a web application would be that it would be very easy to modify later on. Even the user of the interface (with a little know-how) could modify it to suit his/her needs. Custom software becomes just that much easier.
We went with a web interface and ajax seems the way to go, it was quite responsive.
On the other hand, depending on how strong your real time requirements are, it might prove difficult. We had the challenge of plotting real time data through a browser, we ended up going with a firefox plugin to draw the plot. If you're simply trying to display real time text data, it shouldn't be as big an issue.
Run some tests for your specific application and see what it looks like.
Something else to consider, if you are having a web page be an interface to your server, keep in mind you will need to figure a way to update one client when another changes the state of the server if you plan on allowing multiple interfaces to your server.
I usually build my applications 2-folded :
Have the real heavy-duty application CLI-only. The protocol used is usually text-only based, composed of requests and answers.
Wrap a GUI around as another process that talks to the CLI back-end.
The web interface is then just another GUI to wrap around. It is also much easier to wrap a REST/JSON based API on the CLI interface (just automatically translate the messages).
The debugging is also quite easy to do, since you can just dump the requests between the 2 elements and reproduce the bugs much more easily.
Write an HTTP server in your server to handle the AJAX feedback. If you don't want to serve files, create your server on a non-standard port (eg. 8081) and use a regular web server for the actual web page delivery. Now have your AJAX engine communicate with the server on the Bizarro port instead of port 80.
But it's not that hard to write the file server part, also. If you do that, you also get to generate web pages on-the-fly with your data pre-filled, if you want.
Google Desktop Search does this now. When I search my desktop for 'foobar', the URL that opens is this:
http://127.0.0.1:4664/search?q=foobar&flags=68&num=10
In this case, the 4664 is the Bizarro port. (GoogleDesktop serves all the data here; it only uses the Bizarro port to avoid conflicts with any web server I might be running.)
You may want to consider where your data lives. If your application feeds a back-end database, you could write a web app leaving your c++ code in tact -- the web application would be independent and offer up pages to web users and talk directly to the database -- In this case you have as many options, and more, as you have indicated.