Skip to main content

mjCoAP: An Open-Source Lightweight Java CoAP Library for Internet of Things Applications

  • Conference paper
  • First Online:

Part of the book series: Lecture Notes in Computer Science ((LNISA,volume 9001))

Abstract

The Internet of Things (IoT) is expected to pervasively interconnect more than 50 billion devices, denoted as “smart objects”, by 2020 in an Internet-like structure, which will extend the current Internet, enabling new forms of interaction between physical objects and people. The IoT will be made up of heterogeneous devices, featuring extremely diverse capabilities, in terms of computational power, connectivity, availability, and mobility. In such a scenario, characterized by the heterogeneity and large number of involved devices, in order to effectively allow and foster the growth of new applications and services, it is necessary to provide appropriate standards that can guarantee full interoperability among existing hosts and IoT nodes. Standardization organizations, such as the Internet Engineering Task Force (IETF), and research projects are chartered to bring IP to smart objects and to define suitable application-layer and security protocols for IoT scenarios. In order to cope with the limitations of smart objects, the IETF CoRE Working Group has defined the Constrained Application Protocol (CoAP), a standard application-layer protocol for use with constrained nodes and constrained networks. In this work, we present mjCoAP, an open source lightweight Java-based implementation of CoAP, which aims at simplifying the development of CoAP-based IoT applications. The mjCoAP library is fully RFC-compliant and integrates several IETF CoRE WG specifications, such as blockwise transfers, resource observing, and HTTP/CoAP mapping. We also present some application scenarios and we describe how they can be easily implemented based on mjCoAP.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   34.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   44.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Notes

  1. 1.

    https://github.com/okleine/nCoAP.

  2. 2.

    http://netty.io/.

  3. 3.

    http://libcoap.sourceforge.net.

References

  1. European Community’s 7th Framework Programme: CALIPSO - Connect All IP-based Smart Objects. URL http://www.ict-calipso.eu/

  2. IETF Constrained RESTful Environments Working Group. http://tools.ietf.org/wg/core/

  3. Shelby, Z., Hartke, K., Bormann, C.: The Constrained Application Protocol (CoAP). RFC 7252 (Proposed Standard), June 2014

    Google Scholar 

  4. Fielding, R.T.: Architectural styles and the design of network-based software architectures. Ph.D. thesis, University of California, Irvine, AAI9980887 (2000)

    Google Scholar 

  5. Fielding, R., Gettys, J., Mogul, J., Frystyk, H., Masinter, L., Leach, P., Berners-Lee, T.: Hypertext Transfer Protocol. HTTP 1.1. RFC 2616 (Draft Standard), June 1999. Obsoleted by RFCs 7230, 7231, 7232, 7233, 7234, 7235, updated by RFCs 2817, 5785, 6266, 6585

    Google Scholar 

  6. MQTT: Message Queue Telemetry Transport. http://mqtt.org/

  7. Vinoski, S.: Advanced message queuing protocol. IEEE Internet Comput. 10(6), 87–89 (2006)

    Article  Google Scholar 

  8. European Community’s 7th Framework Programme: Universal Integration of Internet of Things Through an IPv6-Based Service Oriented Architecture Enabling Heterogeneous Components Interoperability (2011). http://www.iot6.eu/

  9. European Community’s 7th Framework Programme: OpenIoT: Open Source Cloud Solution for the Internet of Things (2012). http://openiot.eu/

  10. Rescorla, E., Modadugu, N.: Datagram Transport Layer Security. RFC 4347 (Proposed Standard), April 2006. Obsoleted by RFC 6347, updated by RFC 5746

    Google Scholar 

  11. Dierks, T., Rescorla, E.: The Transport Layer Security (TLS) protocol version 1.1. RFC 4346 (Proposed Standard), April 2006. Obsoleted by RFC 5246, updated by RFCs 4366, 4680, 4681, 5746, 6176

    Google Scholar 

  12. Castellani, A., Loreto, S., Rahman, A., Fossati, T.: Guidelines for HTTP-CoAP Mapping Implementations. Internet-Draft draft-ietf-core-http-mapping-04, Internet Engineering Task Force, July 2014

    Google Scholar 

  13. Shelby, Z., Bormann, C.: Blockwise transfers in CoAP. Internet-Draft draft-ietf-core-block-15, Internet Engineering Task Force, July 2014, Work in progress

    Google Scholar 

  14. Hartke, K.: Observing Resources in CoAP. Internet-Draft draft-ietf-core-observe-14, Internet Engineering Task Force, June 2014

    Google Scholar 

  15. Shelby, Z., Bormann, C., Krco, S.: CoRE Resource Directory. Internet-Draft draft-ietf-core-resource-directory-01, Internet Engineering Task Force (Proposed standard), December 2013

    Google Scholar 

  16. Nottingham, M.: Web Linking. RFC 5988 (Proposed Standard), October 2010

    Google Scholar 

  17. Shelby, Z.: Constrained RESTful Environments (CoRE) Link Format. RFC 6690 (Proposed Standard), August 2012

    Google Scholar 

  18. Kovatsch, M., Lanter, M., Shelby, Z.: Californium: Scalable cloud services for the Internet of things with CoAP. In: Proceedings of the 4th International Conference on the Internet of Things (IoT 2014), Cambridge, MA, USA, October 2014

    Google Scholar 

  19. The Contiki Operating System. http://www.contiki-os.org

  20. TinyOS. http://www.tinyos.net/g

  21. Kovatsch, M., Duquennoy, S., Dunkels, A.: A low-power CoAP for Contiki. In: 2011 IEEE 8th International Conference on Mobile Adhoc and Sensor Systems (MASS), pp. 855–860, October 2011

    Google Scholar 

  22. Kovatsch, M.: Demo abstract: human-CoAP interaction with copper. In: Proceedings of the 7th IEEE International Conference on Distributed Computing in Sensor Systems (DCOSS 2011), Barcelona, Spain, June 2011

    Google Scholar 

  23. Oracle: Java Embedded. http://www.oracle.com/technetwork/java/embedded/overview/index.html

  24. mjCoAP (2014). http://www.mjcoap.org/

  25. Cirani, S., Picone, M., Veltri, L.: CoSIP: a constrained session initiation protocol for the Internet of things. In: Canal, C., Villari, M. (eds.) Advances in Service-Oriented and Cloud Computing. CCIS, vol. 393, pp. 13–24. Springer, Heidelberg (2013)

    Chapter  Google Scholar 

  26. Cirani, S., Picone, M., Veltri, L.: A session initiation protocol for the Internet of things. Scalable Comput. Pract. Exp. 14(4), 249–263 (2014)

    Google Scholar 

  27. Cirani, S., Davoli, L., Picone, M., Veltri, L.: Performance evaluation of a SIP-based constrained peer-to-peer overlay. In: 2014 International Conference on High Performance Computing Simulation (HPCS), pp. 432–435 (2014)

    Google Scholar 

Download references

Acknowledgments

The work of Simone Cirani and Luca Veltri is funded by the European Community’s Seventh Framework Programme, area “Internetconnected Objects”, under Grant no. 288879, CALIPSO project - Connect All IP-based Smart Objects! The work reflects only the authors views; the European Community is not liable for any use that may be made of the information contained herein. The work of Marco Picone is funded by Guglielmo srl, Reggio Emilia (RE), Italy.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Simone Cirani .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2015 Springer International Publishing Switzerland

About this paper

Cite this paper

Cirani, S., Picone, M., Veltri, L. (2015). mjCoAP: An Open-Source Lightweight Java CoAP Library for Internet of Things Applications. In: Podnar Žarko, I., Pripužić, K., Serrano, M. (eds) Interoperability and Open-Source Solutions for the Internet of Things. Lecture Notes in Computer Science(), vol 9001. Springer, Cham. https://doi.org/10.1007/978-3-319-16546-2_10

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-16546-2_10

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-16545-5

  • Online ISBN: 978-3-319-16546-2

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics