• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Java and ASN.1

 
Marshal
Posts: 4501
572
VSCode Eclipse IDE TypeScript Redhat MicroProfile Quarkus Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am working on an project with involves creating and installing GSMA eSIM Profiles over the air to smartcards (eUICC) installed in wireless handsets.

After searching for opensource Java libraries, it seems like ASN1bean (formerly jASN1) might be a good choice, but I can't find much in the way of documentation or examples on how to use it.  I'm sure given enough time I will be able to figure it out, but I was hoping for someone might be able to share some knowledge to help get me kickstarted.

 
Saloon Keeper
Posts: 27764
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ASNBean provides an antlr-based compiler intended to generate Java class code (presumably POJOs) from ASN.1 specification files such as those used to define SNMP MIBs and LDAP schemas.

I don't think that there's a whole lot to it. In addition to the compiler, there's a support library designed to marshall data in and out of the generated ASN javabeans and there's supposed to be an example in the project on how that's done.
 
Ron McLeod
Marshal
Posts: 4501
572
VSCode Eclipse IDE TypeScript Redhat MicroProfile Quarkus Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yeah - it was simpler than I was expecting.  I am posting my initial test code in case if would be helpful to someone else in the future.

Compile the ASN.1 definition file to Java classes:

Test case:
GSMA reference:
Test output:
Portion of ASN.1 definition referenced in test:
Test utilities:
 
reply
    Bookmark Topic Watch Topic
  • New Topic