Neo.cortec NCxxxx series Скачать руководство пользователя страница 13

 

 

- 13 of 18 – 

 

 

neo.

cortec

.

 

 

Figure 2 - NcApi structure 

 

The API serves as layer, which implements high-level functions for sending and 
receiving payload data through the mesh network. 

The API provides two basic functions to the application layer: NcApiInit & 

NcApiSendAcknowledged.  

 
NcApiInit

 will have to be called once to initialize the API.  

 

The 

NcApiSendAcknowledged

 function can be used to send payload data to another 

node inside the mesh network. 

 

When data is received from the mesh network, a series of call-back functions will call the 
Application with the received data. Depending on what type of data is received, a type 

specific call-back is issued. It is optional for the application layer to register for the call-

backs.  

 

ReadCallback

 will deliver a byte array containing the raw UART frame received 

following the formats in section 0 “List of application data”. It is normally not necessary 

to register for this callback, as there are other callbacks which are specific to the various 
types of application data. These are described here: 

 

The application layer can register for 

HostAckCallback

. The callback is issued when the 

module receives an ACK message for a previously send payload package. The callback 

function delivers the NEOCORTEC ID for the node, which has send, the ACK. 

 

The application layer can register for 

HostNAckCallback

. The callback is issued when 

the module receives an NAC message for a previously send payload package. The 

callback function delivers the NEOCORTEC ID for the node, which has send, the NACK. 

Содержание NCxxxx series

Страница 1: ...Integration Manual for NCxxxx series Modules Doc Status Release Doc version 2 2 Date Dec 2015 neo cortec ...

Страница 2: ...Sleep 5 6 Serial UART Interface 6 6 1 Physical interface 6 6 2 Easy Integration with PC 7 7 Communication Specification Application UART 8 7 1 Logical data exchange 8 7 2 Commands and Application data 8 7 2 1 List of commands 9 List of application data 11 7 3 API for embedded controllers 12 8 Communication Specification System UART 15 9 Examples 16 9 1 Acknowledged Payload data transmission throug...

Страница 3: ...rror in WES doc 2 Introduction This document describes how to integrate the NEOCORTEC NCxxxx series modules with a Host Controller both from a SW and HW perspective The Host Controller can be an embedded micro controller or a PC 3 Abbreviations HW Hardware SW Software UART Universal Asynchronous Receiver Transmitter RX Receive TX Transmit 4 Definitions Host A system consisting of HW and SW which i...

Страница 4: ...rrent of the module This means that the leakage current of the potential Switching Mode DC DC regulator needs to be very low in order not to jeopardize the low Power Consumption 5 1 2 I O Voltage levels The NCxxxx modules I O voltage levels follow the supply voltage This means that the external controller needs to use the same logical voltage range 5 1 3 Current sourcing capabilities Even though t...

Страница 5: ... to receive UART data whenever the NEOCORTEC node potentially can send such data For more details see chapter 7 Serial UART Interface 6 WES Wireless Encrypted Setup The nodes can be configured for a particular network using WES see user guide document The client mode of WES can be started in two ways 6 1 Auto WES after power up If the node ID is configured to 0xFFFF the node will start up in WES c...

Страница 6: ...development process to provide trace outputs The Host Processor can communicate with the NCxxxx module through a standard UART serial interface see module data sheet for electrical details and Pin locations 7 1 Physical interface The following signals are used Abbreviation Name Module pin number Origin Purpose Application System RxD Received Data 17 5 NEO Carries data from the NEOCORTEC node to th...

Страница 7: ...lowing settings Transfer Speed 115 2 kbps Data bits 8 Stop bits 1 Parity Check None 7 2 Easy Integration with PC For easy integration with a PC it is recommended to use a UART to USB converter The TTL 232R 3V32 cable from FTDI www ftdichip com has been proven to work with the NC2400 module directly Connect the pins according to this table Name Module pin number FTDI Pin number Application System R...

Страница 8: ...ies of frames exchanged Commands and Application data Commands are frames accepted by the NEOCORTEC node Application data is data sent from the NEOCORTEC node to the External Host Some commands will cause values to be returned These values are sent as application data frames Some data frames come from information received from another node in the network and as such it can be subject to long delay...

Страница 9: ...payload data Addresses over 127d should be used for nodes which are only sources of payload data or routers of payload data If the total number of nodes are less than 127d then it is recommended to use addresses in the range 1d 127d Addresses 0x00 00 and 0xFF FF are not allowed The port field of the data can be used at the application layer to direct the data to different applications One can for ...

Страница 10: ... or NAK is received a corresponding Application code will be transmitted from the NEOCORTEC module to the external controller see next chapter API_WES_CMD This command controls the Wireless Encrypted Setup functionality in a Node who is announcing a network or a node who wants to start looking for a new network to join There are 3 arguments in the command which has different functionality API_WES_...

Страница 11: ...EQUEST a node with UID is requesting to be configured for the network 0x50 Receiving an Acknowledge is a guarantee that the recipient with address ID has received the packet sent previously in acknowledged mode Acknowledges from a recipient node is received for packets in the order they were enqueued 0x51 Receiving a Non acknowledge only happens if the maximum global retries were exceeded This can...

Страница 12: ...ng the network In general Packet Age is a measure from the point in time where the data was enqueued at the originator to the time when the packet was delivered to the host application at the destination node For the UART interface enqueue happens at the time the external controller has send the package through the UART interface and dequeue happens at the time when the data is transmitted over th...

Страница 13: ...al for the application layer to register for the call backs ReadCallback will deliver a byte array containing the raw UART frame received following the formats in section 0 List of application data It is normally not necessary to register for this callback as there are other callbacks which are specific to the various types of application data These are described here The application layer can reg...

Страница 14: ...is called with a pointer to the actual data which is to be written The function shall implement the necessary code required to output the data to the UART The API will call NcApiMessageWrittenCallback once a message has successfully been written in full to the module This can be used by the application layer to check that a previous call to NcApiSendAcknowledged was completed successfully Similarl...

Страница 15: ...de of the module Finally it can be used to update the firmware of the module NEOCORTEC provides a PC tool that can be used to interface with the System UART port The tool NeoTools ConfigApp can be downloaded from www neocortec com The tool is available both as a command line version and with a Windows GUI The command line version is well suited for production testing configuration Please review th...

Страница 16: ...CORTEC ID 0x00 20 and the Receiving node has the NEOCORTEC ID 0x00 2A Port 0x00 is used throughout the example This example only uses the Application API When the uController has a sensor measurement that it wants to send to the PC this is what happens 1 uController sends a frame to the Originator node The frame instructs the Originator node to send the sensor data to the Receiving node The sensor...

Страница 17: ... Encrypted Setup In the following example a network consisting of a mesh of nodes has one node which is announcing the network through the Wireless Encrypted Setup Channel Another node which is unconfigured discovers the network and sends a request to the announcing node to receive setup information for the particular network Figure 4 WES Example 1 The unconfigured node is in WES client mode Eithe...

Страница 18: ...configured node 4 The application layer on the uController will now decide to accept the request and it will assign the Node ID 0x002A to the unconfigured node by sending this command to the announcing node Section Code Length UART Payload Content 0x11 0x07 0xnnnnnnnnnn002A Where nnnnnnnnnn is the UID of the unconfigured node 5 The WES Announcing Node will now send the full configuration to the un...

Отзывы: