[WooreeINFO] Java application might need MAC Address-based Communications

#1

Dear MicroEJ,

Lately we have known that we might need to develop a Java application with MAC Address-based communications, which must be for one of our customers.

i think we might need to develop a JNI(SNI) implementation for this, or a new protocol scheme as suggested in the paper of “https://www.usenix.org/legacy/events/vee06/full_papers/p78-simon.pdf”.

What i have meant with the protocol scheme above, must be like ‘http’, ‘ftp’, etc.

Could you please advise me what would be the best way to achieve this implementation for MicroEJ Java VM?

Thanks much in advance.
YH Kwon

#2

Hi @kwonyh,

I am a bit confused by your request, could you please clarify for me what you mean. Do you want:

  • A: a way to port a standard TCP/IP stack (lwip for example) on top of a MAC/PHY hardware?
  • B: do a custom protocol (not related to TCP/IP stack or OSI model) on top of a MAC/PHY hardware?

For the first use case, you’ll need your existing TCP/IP stack and an implementation of the LL_NET API in C. Everything else (HTTP client, NTP client, MQTT client…) would be done by Java libraries using TCP connections or UDP packets that are routed through the C TCP/IP stack.

For the second one, it is totally your call, you’ll need Java to Native communication (SNI here would do the trick) and your own way to communicate meaningfully through the MAC/PHY hardware. You’ll also surely need a queue of some kind to talk asynchronously with the Execution Environment.

Hope it’ll help!.

Gaëtan

#3

Dear Gaëtan,

i’d like to appreciate you for the feedback first of all, and what i meant with this request was B) in your feedback.

Could you please share with me about any of your such experience?

Thanks & Regards
YH Kwon

#4

Hi again,

Could you be more specific on the type on communication it will be? What do you want to achieve?

You will have to use new Java native methods and implement them thanks to SNI [1]. These native methods will surely involves reads and writes, so you’ll need a native C buffer for rx and tx. Depending on your need you’ll also want the reads and writes to not block the virtual machine so another native OS thread will be involved.

Further than that I’ll need more specific use cases.

Gaëtan

[1] http://e-s-r.net/download/specification/ESR-SPE-0012-SNI_GT-1.2-H.pdf

#5

Dear Gaëtan,

Thanks again for your information, and please be advised that i just wanted to know if there is any reference implementation, for the MAC Address-based Communication - without a TCP/IP stack loaded, as a base line for our development.

Regards
YH Kwon

#6

Dear YH Kwon,

We do not have these kind of reference implementations. It is pretty rare to have MAC-based communication without TCP/IP these days (the old days of XNS, Apple Talk or DECnet are gone). But if you explain your use case I may be of help. What’s the communication for? Is it based on an existing protocol? what are the use cases that make TCP/IP not suitable?

Best Regards,
Gaëtan