[Ndn-interest] RFduino (was Re: NDN on Arduino proof-of-concept

christian.tschudin at unibas.ch christian.tschudin at unibas.ch
Wed May 27 09:10:55 PDT 2015


On Sat, 4 Apr 2015, Burke, Jeff wrote:

> Hi folks,
> 
> Please see below for proof of concept code showing basic NDN communication on
> the Arduino! The example publishes an ADC reading with an HMAC in response to
> an interest with matching name.  This uses a new lightweight C++ wrapper
> around the NDN-CPP C-language core. 
> 
> We would love to get other contributors involved in this effort and
> experimenting with the Arduino! There is library work still to be done – for
> example, this test uses a TCP stack on the Arduino YUN, but we'd like to try
> some approaches that don't rely on IP, among other things. (Next target is
> the RFduino and its BTLE support, hopefully.)

Hi Jeff and other IoT fans,

happy to tell that now you can connect RFduinos to an NDN network: I 
have an Android tablet acting as a UDP-to-BTLE forwarder, both devices 
run ccn-lite.

The RFduino returns its internal temperature in Celcius or Fahrenheit at 
"/TinC" and "/TinF", because the BTLE setup is extreme: 20 bytes MTU, 
see the packet dump below. But with such short names one can even return 
the uptime :-)

The rather rough code is on GitHub - I suggest to wait for some cleanup 
before the next ccn-lite release which will be in a few weeks.

best, christian


tschudin at talo:~/ccnlite/ccn-lite-20150527/src/android$ ../util/ccn-lite-peek -u 131.152.245.144/6363 /TinC | ../util/ccn-lite-pktdump
# ccn-lite-pktdump, parsing 20 bytes
#     auto-detected NDN TLV format (as of Mar 2014)
#
0000  06 12 -- <Data, len=18>
0002    07 06 -- <Name, len=6>
0004      08 04 -- <NameComponent, len=4>
0006        54 69 6e 43                                              |TinC|
000a    15 08 -- <Content, len=8>
000c      31 31 32 20 33 37 2e 30                                    |112 37.0|
0014  pkt.end

tschudin at talo:~/ccnlite/ccn-lite-20150527/src/android$ ../util/ccn-lite-peek -u 131.152.245.144/6363 /TinF | ../util/ccn-lite-pktdump
# ccn-lite-pktdump, parsing 20 bytes
#     auto-detected NDN TLV format (as of Mar 2014)
#
0000  06 12 -- <Data, len=18>
0002    07 06 -- <Name, len=6>
0004      08 04 -- <NameComponent, len=4>
0006        54 69 6e 46                                              |TinF|
000a    15 08 -- <Content, len=8>
000c      31 31 37 20 39 38 2e 35                                    |117 98.5|
0014  pkt.end


> 
> Best,
> Jeff
> 
> From: "Thompson, Jeff" <jefft0 at remap.ucla.edu>
> Date: Fri, 3 Apr 2015 22:59:02 +0000
> To: NDN Lib <ndn-lib at lists.cs.ucla.edu>
> Subject: [Ndn-lib] Introducing NDN-CPP Lite
>
>       Hello all,
> 
> New code has been added to NDN-CPP in GitHub for NDN-CPP Lite, a
> light-weight C++ layer over the C language core in NDN-CPP.
> 
> The main C++ API for NDN-CPP uses the Standard Library classes like
> std::vector and shared_ptr to automatically manage memory in objects.
> For data packet encoding, decoding and network transport, the C++ API
> calls an inner core written in pure C which does not make any
> assumptions about memory management or support libraries.
> 
> Some low-power platforms like an Arduino microcontroller don't support
> the C++ Standard Library or run-time info for exceptions. To support
> such platforms, the NDN-CPP Lite API was developed which, like the C
> core, does not make assumptions about memory management or support
> libraries. While functionally equivalent to the C core, the NDN-CPP
> Lite takes advantage of C++ syntax to simplify the API. For example,
> the following C code initializes a MetaInfo struct:
> 
> struct ndn_MetaInfo metaInfo;
> ndn_MetaInfo_initialize(&metaInfo);
> 
> The following equivalent NDN-CPP Lite code initializes a MetaInfoLite
> object:
> 
> MetaInfoLite metaInfo;
> 
> The MetaInfoLite constructor internally calls the same
> ndn_MetaInfo_initialize function, but C++ syntax, method overloading
> and namespace support makes the NDN-CPP Lite code cleaner and less
> error-prone.
> 
> The file examples/arduino/analog-reading/analog-reading.ino uses
> NDN-CPP Lite for an Arduino application which registers a prefix,
> receives an interest over TCP and returns a signed (with HMAC) data
> packet holding a measurement value. The compiled application is about
> 28 kilobytes as required by the small microcontroller program space.
> 
> For more explanation and sample code, see README-NDN-CPP-Lite.md.
> Currently, the NDN-CPP Lite documentation is in the class and method
> doc comments in include/ndn-cpp/lite.
> 
> Thank you,
> 
> - Jeff T
> 
> _______________________________________________ Ndn-lib mailing list
> Ndn-lib at lists.cs.ucla.edu
> http://www.lists.cs.ucla.edu/mailman/listinfo/ndn-lib
> 
> 
>


More information about the Ndn-interest mailing list