Make 2 cardlet Java Card communicate - applet

I have 2 cardlets Java Card on the same smart card that I want to make communicate.
I could select an applet then send the corresponding APDU and then deselect it and select the other one and etc... I am wondering if it is possible to do it
more properly
with logical channels ? I mean with a method that could allow me to not select/deselect each applet for each APDU command ?
Thank you in advance :)

Yes it's possible.
You need a card that supports additional logical channels.In that case, you can select more than one applet simultaneously.(One applet per each channel) Fortunately current cards support some additional logical channels.
But remember that if you want to select (at least) two applets of a single package simultaneously, you must implement MultiSelectable interface in both applets (and also in all the other applets of that package).
If your applets are not from a single package, you don't need to implement this interface.
After that, you can open 2 logical channel using MANAGE CHANNELS command and select App1 in channel 0, and App2 in channel 1 (For example). For the next commands, you specify which channel (and therefore which applet) is the target of the incoming command using the low nibble in the CLA section of that APDU commands.
Note that SELECT APDU command is an alternative for MANAGE CHANNELS-Open command.(So you actually don't even need to use MANAGE CHANNELS command)

You should read more about: Applet Firewall, Sharable Objects and Inter-Applet Communication. These are standard Javacard features that are (also but not only) designed for this purpose.

Related

How can I make a javacard appet which is not possible to be multi instance

I want to create a javacard applet which could not be installed more than once at the same time. It means if I instantiate applet once, It could not be possible to install another instance of that applet. However, if I delete the first instance, it should be possible to reinstall it.
If the package AID is always the same the installations should fail during the loading process automatically.
If the package and instance AIDs are using some pattern like an increasing last digit you could use JCSystem.lookupAID and try to iterate over the possible AIDs and fail if another instance is found.
If you are taking into account that the AIDs are flexible you are out of luck on standard smart cards, what you need then is a global kind of data unique for all applets. When using an UICC e.g you could create a file in the file system and if your applet is part of the MNO's security domain you can check this file for existence.
Maybe you also protect the installation process, e.g. by using a personalization process. After the installation a personalization server has to approve the applet. The applet could use some random token and if this is not known by the personalization server the applet will never unlock some features to make it useful. This approach should always work.

is the kaa application modularity?

Kaa demo show lots of example of application&client,but actually in the fact solution, may need some of function together,
so,question is:
one client (e.g. android app) access the multiple function (e.g. 2 function:event and notifications)in the server,so:
i need put all function in one application,or
create 2 applications,android app access the different function separate?
You can use some of the SDK API (functions) or all at the same time (within single client application). The Kaa Sample Applications were made with an intent to be as simple (thus clear and easy to understand) as possible. Therefore, just for simplicity most of the samples use just one Kaa feature. This does not mean that they cannot be used in a single application at the same time.
Please feel free putting them all into a single application.

Query Hunt Groups with TAPI and Avaya IP Office

I am using TAPI 2.X to develop a solution for Avaya IP Office 500 v2 PBX as 3th party application to control it. Right know I can make calls, hangup, intrude, open lines and so on. I need to query witch lines are acting as a queue because I have the default queue (200, Main in IPO are called Hunt Group) but in TAPI is shown as another line with a single device connected to it. Can anyone give some hint or show me some kind of option to do it?
Thank you.
Not sure if Avaya TSP does that, but the standard way is to set LINEADDRCAPFLAGS_QUEUE bit in the dwAddrCapFlags field of the LINEADDRESSCAPS structure:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms734843%28v=vs.85%29.aspx
If you're using our AddTapi dll you can check TapiAddress.IsQueue and TapiAddress.IsRoutePoint properties.

iPhone / Android realtime communication, XMPP, raw TCP?

I have an app that has 2 versions : 1 on iPhone, 1 on Android.
I want my 2 apps to communicate in real time. The use cases are :
User A sees a friends list, pick a user B and click on "share an item"
User B get a notification saying that user A wans to share an item with him
User B accepts, the transaction takes place, and both users are notified that it goes well.
I thought about using a simple HTTP transaction, but that would polling for the user therefore not a nice user experience.
I think XMPP would fit nicely, but I'm not quite sure how flexible this solution can be ( what if I want to keep my users information on a separate server also etc. ). I also consider using a raw TCP socket ( Node.js on the server is fairly easy to operate ).
What's the best solution at the moment ?
Well, your requirements are pretty much:
Real time
Friend list
Presence
Sharing of data
These are all features of XMPP, and there are library implementation available in multiple languages. Smack for Java and xmppframework for Objective C will cover your particular use case.
You could of course write this yourself from the socket layer up, but why bother when there are existing standardized protocols and libraries available to do what you need. This way when you want to add Blackberry or any other platform to your list, I am sure
you can easily find the right library to support your app without having to build from the ground up.

what are needed to make my own SNMP Agent and server?

Hii,
I want to make my own snmp server and agent.with my own MIB and OID's.
how can i do it??and where to start??
And if i want to use windows SNMP service and extend it and insert my own OID's into its MIB
then ,is it possible??.n if yes,how can i do this??
There is an excellent open-source implementation for the .NET framework called SharpSnmpLib. It can implement a normal SNMP server, and it allows you to load your own custom MIBS.
A couple of tips:
You can find existing MIB's at oidview or the Cisco Mib Browser
Avoid v3 and the RFC's that belong to it (in fact, I'd avoid the RFC's at all, they're confusing and cover many areas that were not adopted)
Test early and often with machines as close to the production setup as you can
If you ever start implementing any standardized protocol, the first step is to read the standards defining it. In case of SNMPv3. the relevant standards are
RFC:s
3411,
3412,
3414,
3414,
3515,
3416,
3417 and
3418
The good (and bad) thing about RFC's is that they usually very clearly state what you MUST, SHOULD, MUST NOT, SHOULD NOT and MAY do in your implemention.