bladox.com Forum Index bladox.com
Turbo SIM Toolkit Adapter Forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Bladox Waver Issue with J2ME

 
Post new topic   Reply to topic    bladox.com Forum Index -> Development
View previous topic :: View next topic  
Author Message
godwinamila



Joined: 03 Aug 2010
Posts: 9

PostPosted: Tue Jan 04, 2011 10:19 am    Post subject: Bladox Waver Issue with J2ME Reply with quote

Hi

I am working on a J2ME Application that work with Bladox Waver. I have successfully installed a waver application and configured the aid of the Applet inside the waver application as well. I can successfully establish the Connection from Midlet. When I exchange APDUs using that connection I can't get responses, Can anyone help me how to return responses from waver application.

I have a method like this to Handle the ACTION_FILE_APDU.
void on_file_operation(File_apdu_data *f) {

}

Can anyone let me know what I should write inside this to return a value like Hello and status 0x90.


Regards
Amila
Back to top
View user's profile Send private message
pz



Joined: 12 Mar 2004
Posts: 1161

PostPosted: Wed Jan 12, 2011 9:05 am    Post subject: Reply with quote

Code:

u8 PROGMEM t_aid[] = { 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46 };

void turbo_handler (u8 action, void *data)
{
  switch (action)
  {
    case ACTION_APP_INIT:
      reg_aid (t_aid, sizeof (t_aid));
      break;
    case ACTION_FILE_APDU:
      dbsp ("XXX_FILE\n");
      {
        File_apdu_data *f = data;
        u8 *r = buf_B ();
        u8 i = 0;
        u8 j;

        if (f->ins == ME_CMD_READ_BINARY)
          for (j = 0; j < f->p3; j++)
            r[i++] = 0xa0 + j;

        r[i++] = 0x90;
        r[i++] = 0x00;

      }
      break;
    case ACTION_LOGICAL_CHANNEL:
      {
        dbsp ("XXXX_LOG_CHANNEL\n");
        File_apdu_data *f = data;

        simx (apdu_class (), f->ins, f->p1, f->p2, f->p3, f->data);
      }
    default:
      break;
  }
}
Back to top
View user's profile Send private message
godwinamila



Joined: 03 Aug 2010
Posts: 9

PostPosted: Wed Jan 12, 2011 11:58 am    Post subject: Reply with quote

Thank you very much. It worked fine.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    bladox.com Forum Index -> Development All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group