.scr file and APDU - testing

I am using JCard sim, java card version 2.2.2 and I want to know how the .scr file is associated with the .java file. (the java card simulator on NetBeans IDE. I am not using an actual smartcard).
If someone can provide me with some useful links on how these two files are related, I would greatly appreciate it.
I have looked through the following links, but they were not specifically helpful in illustrating how I can modify the .scr file in association with my .java file
C H A P T E R 5 - Converting Java Class Files
How to write a Java Card applet: A developer's guide - JavaWorld
Basically what I am trying to do is create a test applet (without the need of .scr files to send and receive APDUs by my other files)
- I want to be able to read APDU which contains the the parameters for a function in my process method
- That function will then create another APDU as its output, which another function will read as one of it's parameters
As far as I understand, the .scr file is used to send command APDUs that is read by the applet, but there is no way to write to the .scr file.
How can I create my own .java test file that sends and receives APDUs instead of relying on the .scr?
I can provide more details of what my code looks, if absolutely required.
Thanks

You can communicate with the simulator using the method described in the quick start guide of jCardSim. It is also described how to select an Applet using the correct AID in there. The inherited process(APDU) method will receive any APDU send using the methods described in the quick start guide, starting with the SELECT by NAME APDU (INS = A4). After that it is normal APDU processing.

Related

Configure .eds file to map channels of a CANopen Client PLC

In Order use a PLC as a Client (formerly “Slave”), one has to configure the PDO channels, since the default values of the manufacturer are often not suitable. In my case, I need the PDOs so send INT valued instead of the default UNSIGNED8 (see. Picture).
Therefore my question: What kind of workflow would you recommend, to map the CANopen Client PDO channels?
I found the following workflow suitable, however I appreciate any improvements and recommendations from your side!
Start by locating the .eds file from the manufacturer. The image show this in the B&R Automation Studio Programming Environment
Open the file in a eds. Editor. I found the free Vector CANEds Editor very useful. Delete all RxPODs and RxPDO mappings that you don’t need.
Assign the needed Data Type (e.g. INTEGER16) and Channel Name (“1 Byte In (1)”).
Add the necessary PDOs and PDO mapping from the database. (This might actually be a bug, but if you just edit the PDOs without deleting and recreating them, I always receive error messages)
Map the Date to the Channels
Don't forget to write the number of channels in the first entry (in this image: 1601sub0)
Check the eds file for Errors (press F5) and copy&paste the eds file to the original location point 1.)
Add the PLC Client device in Automation Studio and you should see the correct mappings.
(PS: I couldn't make the images smaller ... any recommendations about formating this question are welcome!)

How to find ARA-M sample APDUs?

I am trying to interface an applet in my USIM and an Android application.
I know that I have to install ARA-M applet on USIM in order to check access controls and submit my application-AID as a rule to communicate.
I checked this link and installed it on my sim, but I cannot communicate with this applet, all samples are using GlobalPlatformPro. when I run a commands like gp.exe --list, it returns 0x57 from ScardTransmit function which means ERROR_INVALID_PARAMETER and I don't know how to fix it.
Now I have 2 questions:
1) How can I fix GlobalPlatformPro error in order to run ARA-M samples?
2) How can I find standard commands for this applet (some sample APDUs to communicate and add access control rules)?
Thank you for helping.
I found the answer.
There is a paper on the matter here. It is a good place to get started. Global Platform has a repository here where you can find ARA applet and four test applets to get started.
The Global Platform Secure Element Access Control can also be a useful reference for those who are at the start point, like me.

How to send result file after all tests run in nunit console c#

Is there a way to send a mail with result file (I set this file in console command with option --result) after running.
I have run my selenium test cases in following way
How to Schedule Selenium Web Drivers Tests in C#
The result file was created after OneTimeTearDown function.
If sending an e-mail into OneTimeTearDown function - the result file comes incomplete
Thanks in advance
Sangeetha P.
I'm not sure I'd actually recommend doing this - but I think it's possible. Personally, I'd instead handle the email sending outside of the NUnit console, in a separate script in your CI System.
Anyway. You could achieve this by writing your own ResultWriter extension. Take a look at the implementation of the standard NUnit3XmlResultWriter as an idea - you'd essentially want the same thing, except to send the file by email, rather than write a file. (You may even want to make your ResultWriter actually inherit the NUnit3XmlResultWriter class.)

VB.NET - Read lines from command line to Windows form possible?

Hey Overflow, I have an application which serves as a user interface for a spartan/command line program.
I have the program running on a separate process, and my application monitors it to see if it is responding and how mush CPU it is utilising.
Now I have a list of files in my program (listbox) which are to be sent to the application, which happens fine. But I want to be able to read text from the com-line so as to determine when the first file has been processed.
Com-line says one of "selecting settings", "unsupported format" and "cannot be fixed".
What I want to be able to do is when it says one of these three things, remove item(0) in listbox1.
Is this possible?
I thought of programming an event which handles com_exe.print or something or other, if possible.
Read the standard output from the process.
MSDN Article
Theres an example of synchronous reading from the process in that article.
You might be able to do what you want using the AttachConsole API function as described here. However, maybe an easier alternative would be if you could pipe the output of the command line app to a text file and then your app could just parse the text file (assuming that the command line file wouldn't lock the file completely, I'm not sure about that).
If you don't know how to pipe the output, this page has quite a bit of information.

Getting EPG info from DVB-T

I'm interested in grabbing the EPG data from DVB-T streams. Does anyone know of any C libraries or an alternative means of getting the data?
tv_grab_dvb can do this. See the subversion repository for sources.
tv_grab_dvb is made to work with the stream grabbed from the DVB-T card using dvbtools on Linux, but it may be portable to other platforms - I think it just works with the raw data from the stream.
...a new answer to an old question:
I wrote a utility called dvbtee that can be used as a c++ library, a cross-platform command line utility, or a node.js module.
(despite it being a c++ library, one could still link to it from c code)
The command line utility will parse your streams and output the EPG, depending on the arguments you specify, it can generate plain text or a JSON block of data.
dvbtee: a digital television streamer / parser / service information aggregator supporting various interfaces including telnet CLI & http control
The node.js module will emit events containing the PSIP table data (along with EPG info)
node-dvbtee: MPEG2 transport stream parser for Node.js with support for television broadcast PSIP tables