Am having an IC contact card reader and SLE5528 smart cards.Am wondering how to get started working with these items really.
The reader is being read and i see no effect when i insert the smart card .
i also installed the smart card shell of opensmart from http://www.openscdp.org/
but i can't get to read any card reader with it.Am wondering whether it has compatibility issues.
Please i know i may have asked the question inappropriately, but am kindly asking anyone there to help me out on this.
Any relevant links or helpful information to get me started and done will be of great help
Thanks in-advance.
As stated earlier a 5528 is a memory card, no smart card. The smart card shell mentioned is only able to address real smart cards. Make sure, that your (unmentioned) reader is able to read memory cards at all and how. Neither PCSC nor the java framework as best knwon interfaces to cards will help you here (the latter one being targeted towards JavaCards). That nothing worth noting happens, when you insert a card in the reader is not so unusual - the maximum reaction to be expected is a LED flashing shortly (if the reader has one), comparable to putting a USB stick into the port. Since no standard software knows how to handle a card, there will be no further reaction.
Suggestion: search for "5528", "4428" articles here or "memory card" in wikipedia, and prepare to invest some time and work.
Related
I want to generate chords from a midi file, but I can't find any source code written in java yet. So I want to write it by myself. What I want to do first is to gather the notes in the same position, but this is the problem, I don't know if there is a way to get the midi note position using JMusic. If not, are there any way to get this information? Thank you all~
Like slim mentioned, Midi files are basically a collection of Midi Events, which are basically hex bytes of code that correspond to a Midi action. EVERYTHING in Midi (including very in-depth things like tempo, setting the instrument bank to typical things such as note on/off events and note volume [called velocity in MIDI]) is controlled by those Midi Events. Unfortunately, you're going to need ALL of that information in order to do what you want.
My advice? There is this odd notion (that I once held before working with Midi as well) that Midi should be simple to work with because it's been around for so long and it's so easy to use in DAW's like FL Studio. Well let me be the person to crush this notion for you; MIDI is complex, hard, and idiosyncratic. As a beginner, it will force you to take caffeine (to keep the gears rolling and for headaches), tylenol (also for the headaches) and alcohol when you realize you just worked 6 hours for one thing and you're getting the fatigue. Turn back now, pay Dave Smith to help you, or hit the books, cause it's going to get nasty.
HOWEVER: You will never feel greater success than when your baby starts playing music.
This is something new and I've never done any coding related to online transaction or debit/credit cards. I was told to study about EMV(EuroPay Master Visa) card to implement it in Android App.
So far, I have collected info about
APDU
file structure
"APDU Command" is sent to get useful info from card.
APDU fields (CLA, INS, P1, P2, Lc, Data, Le)
"APDU response" is sent back from card to card reader.
All these processes happen between the card and the card reader.
In my case, the card reader is attached to an android device. I may need to display card details to user in android app (Ex: Displaying last 4 digit of card number).
My questions are
what are the possible values in APDU command fields if i want to authenticate card.?
How to communicate between card reader and device using Java.
PS: I don't need any codes. I just need a simple explanation, I will continue R&D once i understand the concept.
What you are asking for is an EMV course, that's a lot for a SO question.
As outlined by #kushal, you'll have to go through the EMV Specifications, they contain a lot of command samples, and will describe the sequence of commands required to complete a transaction.
But by doing so, what you're trying to achieve is to write an EMV Kernel, which is costly and time consuming, as outlined in this SO question. Count a couple of years of development for this, not taking into account the bank integration part... If what you want to achieve is just to process transactions, what you want to do is to buy an EMV kernel (ex : from level2kernel, verifone, Ingenico, etc.).
You can take a look to an example of a an Interac Flash transaction (contactless EMV) here, that will give you an overview of the complexity of the protocol.
EMV Card SpecificationFirstly you have understand the EMV 4.2
Then You have to communicate with the reader to android device by the help of UsbManager Class. then send the specific APDU`s to the Card then the card give the Following information.
Just curious to know what it will take for me to have human capability to my java programs. Currently to display a message i use System.out.println and to read user's input i may use something like System.in. Wondering if there is a way for me to say System.out.speak() and System.hear();
If not possible with Java i'm okay to learn other languages please help.
Wondering if there is a way for me to say System.out.speak() and System.hear();
Literally, no.
System.out is a PrintWriter and there is no speak() method.
There is no System.hear() method.
Adding such methods would entail hacking on standard system classes ... making the resulting library "NOT Java(tm)".
Furthermore, there are no standard APIs in the Java libraries for text to speech or speech to text. (And I'm not aware of any other language that offers this functionality as a standard feature.)
However, I'm sure that if you looked hard enough you could find 3rd-party tools for doing this that could be integrated with Java, one way or another.
UPDATE
In fact, you have found the standard Android (as distinct from Java) APIs for this:
Speech recognition: android.speech
Text to speech: android.speech.tts
From a design perspective, I think it would be a better idea to support this kind of thing in the OS's user interface framework (where the user can control it), and not embed it in individual applications.
So it sounds like this is what you want:
"System.out.speak()" -- as you know by now, that's not a real thing. I think I could propose a high-level, temporary solution.
It sounds like you just want to be audibly notified when you reach a certain part in your code. Perhaps you could just record a wav or mp3 of yourself saying whatever it is you want to hear as an alert, and then import the wav/mp3 into your project directory. Refer to this article to figure out how to playback that audio:
Playing .mp3 and .wav in Java?
You could simply make a static method that takes in a string representing the desired audio playback and then does so by however the link above suggests.
If you want it to take in a string, and then have some sort of computer voice (e.g. Microsoft Sam) speak that string, that's a lot more complicated. I have no idea how to do that haha. But I'm guessing it's not as hard as your idea of "System.in.hear()"
"System.in.hear()" -- This is definitely not a thing. This requires knowledge in the field of Speech-To-Text (STT). This is basically how Siri or Google Now parses what you say to them. I'm sure there are libraries you could find that do this, but I'm too lazy to look for you :(
I hope this helps a little bit. I'm doing a little bit of research right now on STT and I saw your question pop up. I'm not very knowledgeable in the area, but I hope you figure out a way to get audio feedback instead of having to put println's everywhere. You should figure that out and reuse it.
Happy programming!
Suppose I am building a Neural Net to play tic-tac-toe. As I understand it, a good design for the net would be 9 input neurons [one for each square in the grid] 3 hidden layer neurons and 9 output neurons [one for each potential move]. Now that the Net is built, how do you read the output of the net?
As I understand it, to train the net, I would send the net the game board [via the inputs] everytime I need it to make a decision. But how do I obtain that decision?
The key thing to realize here is that multiple output neural networks change their state to reflect a solution space, but they do not typically give you a hard and fast, final decision.
Ultimately, a neural net doesnt give you "just one answer" , but rather, it modifies its internal state to reflect a probabilistic landscape of solutions.
If you just want a single answer, then you will have to have a nueral net with only one output node.
There is no direct, right answer here
The question you have is actually quite sophisticated - the science of choosing an answer from a nueral net is an entire field of study, in and unto itself :
For some other insights, check out https://mathoverflow.net/questions/10697/methods-for-choosing-a-result-from-a-multiple-output-node-neural-network .\
Also, scan other resources for decision making methods for multiple-output neural nets.
So I want to make a new music player for Android, it's going to be open source and if you think this idea is any good feel free to let me know and maybe we can work on it.
I know it's possible to speed up and slow down a song and normalize the sound so that the voices and instruments still hit the same pitch.
I'd like to make a media play for Android aimed at joggers which will;
Beat match successive songs
Maintain a constant beat for running to
Beat can be established via accelerometer or manually
Alarms and notifications automatically at points in the run (Geo located or timer)
Now I know that this will fall down with many use cases (Slow songs sounding stupid, beat changes within song getting messed up) but I feel they can be overcome. What I really need to know is how to get started writing an application in C++ (Using the Android NDK) which will perform the analysis and adjust the stream.
Will it be feasible to do this on the fly? What approach would you use? A server that streams to the phone? Maybe offline analysis of the songs on a desktop that gets synched to your device via tether?
If this is too many questions for one post I am most interested in the easiest way of analysing the wave of an MP3 to find the beat. On top of that, how to perform the manipulation, to change the beat, would be my next point of interest.
I had a tiny crappy mp3 player that could do double speed on the fly so I'm sure it can be done!
Gav
This is technologically feasible on a smartphone-type device, although it is extremely difficult to achieve good-sounding pitch-shifting and time-stretching effects even on a powerful PC and not in realtime.
Pitch-shifting and time-stretching can be achieved on a relatively powerful mobile device in realtime (I've done it in .Net CF on a Samsung i760 smartphone) without overly taxing the processor (the simple version is not much more expensive than ordinary MP3 playback). The effect is not great, although it doesn't sound too bad if the pitch and time changes are relatively small.
Automatic determination of a song's tempo might be too time-consuming to do in real time, but this part of the process could be performed in advance of playback, or it could be done on the next song well before the current song is finished playing. I've never done this myself, so I dunno.
Everything else you mentioned is relatively easy to do. However: I don't know how easy Android's API is regarding audio output, or even whether it allows the low-level access to audio playback that this project would require.
Actually, you'll have 2 problems:
Finding the tempo of a song is not easy. The most common method involves autocorrolation, which involves quite a bit of calculus, so I hope you've studied up.
Actually changing the beat of a song without pitch shift is even harder, and still results in sound artifacts in the song. Typically it takes a long time to edit audio in this way, and it takes a lot of tinkering to get the song to sound good. To actually perform this in real time would be very, very hard. The actual process involves taking the Fourier Transform of the audio, shifting the frequency, and taking the inverse Fourier Transform. More calculus, this time with imaginary numbers.
If you really want to work on this I suggest taking a class in signals and systems from an Electrical Engineering department.
Perhaps an easier idea: Find the tempo of all the songs in a user's library, and just focus on playing songs with a close beat to the jogger's pace. You still need to do #1 but you don't need to worry about #2.
Changing the audio speed on the fly is definetly doable; I'm not sure if it's doable on the G1.
Rather than writing your own source I would recommend looking at the MythTV source and/or the mplayer source code. They both support speeding up video playback while compensating the audio.
http://picard.exceed.hu/tcpmp/test/
tcpmp did all that you asked for on an iddy biddy Palm Centro... And More, Including Video! If it can be done on a Palm Centro, it sure as heck can be done on the Android!!