Набор команд SL720, режим "звезда" ( PDF ) 1 Мб

Набор команд SL720, режим "звезда" ( PDF ) 1 Мб
Neo_SL720 Module
Command Set
(Star Network)
Version 1.0
Neo_SL720 Module Command Set (Star Network)
Copyright © Neoway Technology Co., Ltd 2015. All rights reserved.
No part of this document may be reproduced or transmitted in any form or by any means without
prior written consent of Shenzhen Neoway Technology Co., Ltd.
is the trademark of Neoway Technology Co., Ltd.
All other trademarks and trade names mentioned in this document are the property of their respective
holders.
Notice
The information in this document is subject to change without notice due to product version update or
other reasons.
Every effort has been made in preparation of this document to ensure accuracy of the contents, but all
statements, information, and recommendations in this document do not constitute a warranty of any
kind, express or implied.
Neoway provides customers complete technical support. If you have any question, please contact your
account manager or email to the following email addresses:
Sales@neoway.com
Support@neoway.com
Website: http://www.neoway.com
Copyright © Neoway Technology Co., Ltd
i
Neo_SL720 Module Command Set (Star Network)
Revision Record
Version
Changes
Data
V1.0
Initial draft
2015-09-10
Copyright © Neoway Technology Co., Ltd
ii
Neo_SL720 Module Command Set (Star Network)
Contents
1 Overview ..................................................................................................................................... 1
2 Common frame structure ......................................................................................................... 1
2.1 Preamble ...................................................................................................................................................... 1
2.2 Frame Header ............................................................................................................................................... 1
2.3 Command Code ........................................................................................................................................... 2
2.4 Payload ........................................................................................................................................................ 2
2.5 Checksum..................................................................................................................................................... 2
3 Command Code Description .................................................................................................. 3
3.1 Querying Module Information ..................................................................................................................... 3
3.2 Querying the MAC Address ......................................................................................................................... 3
3.3 Setting the Default Destination Address ...................................................................................................... 4
3.4 Setting the Communications Channel .......................................................................................................... 4
3.5 Setting Transmitting Power .......................................................................................................................... 5
3.6 Enabling the Sleep Mode ............................................................................................................................. 6
3.7 Setting the UART Baud Rate ....................................................................................................................... 6
3.8 Enabling Broadcast Data Receiving............................................................................................................. 7
3.9 Querying Communications Quality ............................................................................................................. 8
3.10 Sending Data .............................................................................................................................................. 8
3.11 Reading Data.............................................................................................................................................. 9
3.12 Unsolicited Data Report ............................................................................................................................. 9
3.13 Setting the Baud Rate for Wireless Communications .............................................................................. 10
3.14 Setting the Module Type .......................................................................................................................... 10
3.15 Setting Receiving Acknowledgement ...................................................................................................... 11
3.16 Reporting Data Sending Result ................................................................................................................ 12
3.17 Setting the CSMA/CA ............................................................................................................................. 12
3.18 Setting the Packet RSSI ........................................................................................................................... 12
3.19 Restarting the Module .............................................................................................................................. 13
3.20 Selecting Idle Channels ............................................................................................................................ 13
3.21 Reporting Idle Channel Selecting Result ................................................................................................. 14
3.22 Setting Login Mode ................................................................................................................................. 14
3.23 Manual Login ........................................................................................................................................... 15
3.24 Report Login Result ................................................................................................................................. 15
3.25 Setting Interval of Automatic Central Node Check ................................................................................. 15
3.26 Querying Current Module Information .................................................................................................... 16
3.27 Transferring Upgrade Files ...................................................................................................................... 17
Copyright © Neoway Technology Co., Ltd
iii
Neo_SL720 Module Command Set (Star Network)
3.28 Returning Upgrade File Transferring Result ............................................................................................ 19
3.29 Restarting the Module .............................................................................................................................. 19
4 Module Interfaces ................................................................................................................... 20
4.1 Top View of the Module ............................................................................................................................ 20
4.2 Pin Description .......................................................................................................................................... 20
5 Using Processes........................................................................................................................ 21
5.1 Initialization Process .................................................................................................................................. 21
5.2 Data Transmission Process......................................................................................................................... 21
Copyright © Neoway Technology Co., Ltd
iv
Neo_SL720 Module Command Set (Star Network)
1 Overview
Neoway SL720 is compliant with the LoRa protocol. This documents details the commands used to control
SL720.
Before you send commands, ensure that the module is running, that is, the WAKEUP2 pin is set to high level. If
WAKEUP2 is in the sleep mode, it cannot respond to commands correctly.
2 Common frame structure
A complete frame contains preamble, frame header, command code, payload, and checksum. Table 2-1 shows the
common frame structure.
Table 2-1 Common frame structure
Preambl
e
Frame Header
Command Code
Payload
Check
2 byte
6 byte
2 byte
0 ~ N bytes
1 byte
2.1 Preamble
The preamble is fixed to 0x55 0xAA.
Table 2-2 Preamble structure
Preamble Field 1
Preamble Field 2
1 bytes
1 bytes
0x55 (PreCode1)
0xAA (PreCode2)
2.2 Frame Header
Table 2-3 Frame header structure
Field 1
Field 2
Field 3
Field 4
Field 5
1 bytes
1 bytes
1 bytes
1 bytes
1 bytes
1 bytes
Frame length
Reserved
word
Version
Reserved wo
rd
Packet ID
(Version)
Protocol Type
(Protocol Type)
Fields:

Frame length: the total length of all bytes except preamble, including the checksum and the length byte.

Version: set to 0 in your command, and the value returned by the module is the software version

Reserved word: 0, to be extended
Copyright © Neoway Technology Co., Ltd
1
Neo_SL720 Module Command Set (Star Network)

Packet ID: the module will ignore this field in the frame; increase the packet ID by one every time the
module sends data over the UART

Protocol type: 0x08, star network
2.3 Command Code
Table 2-4 Command code
Command Code Field 1
Command Code Field 2
1 bytes
1 byte
Bit 7
Bit 6
Reply flag
Reply
request
(Flag)
Bit 5 ~ Bit 0
Command Code
Reserved
(Cmd)
(Req)
Reply flag: indicates that the current data frame is a reply frame
Reply request: specify whether the current data frame requires reply. 1: Request
0: Not request
Command code: Specific command. See the command description.
2.4 Payload
Table 2-5 Payload structure
Payload Field
0 ~ N bytes
Command Parameters
Command parameters: varying with commands. Its length is frame length minus 9.
2.5 Checksum
Table 2-6 Checksum structure
Checksum Field
1 bytes
Check
Checksum: the exclusive value of all data from the header (included) to the payload
Copyright © Neoway Technology Co., Ltd
2
Neo_SL720 Module Command Set (Star Network)
3 Command Code Description
All operations on the module are differentiated by command codes. This section describes the command
parameters required by each command in detail. All digits in the following section are in hexadecimal form in
addition to some with note.
3.1 Querying Module Information
This command is used to query the current module information, including module type, firmware, and
manufacturer.
Send:
Command Code
Command Parameters
NULL
40 01
0 byte
Return:
Command
Code
Command Parameters
Module type
Version
(integer)
Version
(decimal)
Manufacturer ID
1 byte
1 bytes
1 bytes
2 bytes
80 01
Module type: the value is fixed to 30 for SL720.
Version (integer): integer part of the firmware version
Version (decimal): decimal part of the firmware version
Manufacturer ID: fixed to NW in the ASCII format
3.2 Querying the MAC Address
This command is used to query the local MAC address of the module.
Send:
Command Code
Command Parameters
NULL
40 02
0 byte
Return:
Command Code
Command Parameters
The MAC address of the module
80 02
6 bytes
Module address: The local MAC address of the module, which cannot be changed
Copyright © Neoway Technology Co., Ltd
3
Neo_SL720 Module Command Set (Star Network)
3.3 Setting the Default Destination Address
This command is used to set the default destination address of the module for wireless communications. The
default destination address is FF FF FF FF FF FF and you can change it as required. If you leave the command
parameter blank, this command is executed to query the default destination address.
Send:
Command Code
Command Parameters
NULL
40 03
0 byte
Command Code
Command Parameters
Default destination address
40 03
6 byte
Return:
Command Code
Command Parameters
Default destination address
80 03
6 byte
3.4 Setting the Communications Channel
This command is used to set the wireless communications channel of the module. The channel ID is 0 by default
and you can modify it as required. The module supports 81 channels and the parameter value ranges from 0 to 80.
If you leave the parameter blank, the command is executed to query the current communications channel.
Send:
Command Code
Command Parameters
NULL
40 04
0bytes
Command Code
Command Parameters
Communications channel ID
40 04
1 byte
Return:
Command Code
Command Parameters
Communications channel ID
80 04
1 byte
Copyright © Neoway Technology Co., Ltd
4
Neo_SL720 Module Command Set (Star Network)
Table 3-1 Channel list
Channel
ID
Central
Frequency
Channel
ID
Central
Frequency
Channel
ID
Central
Frequency
Channel
ID
Central
Frequency
0
470
21
480.5
42
491
63
501.5
1
470.5
22
481
43
491.5
64
502
2
471
23
481.5
44
492
65
502.5
3
471.5
24
482
45
492.5
66
503
4
472
25
482.5
46
493
67
503.5
5
472.5
26
483
47
493.5
68
504
6
473
27
483.5
48
494
69
504.5
7
473.5
28
484
49
494.5
70
505
8
474
29
484.5
50
495
71
505.5
9
474.5
30
485
51
495.5
72
506
10
475
31
485.5
52
496
73
506.5
11
475.5
32
486
53
496.5
74
507
12
476
33
486.5
54
497
75
507.5
13
476.5
34
487
55
497.5
76
508
14
477
35
487.5
56
498
77
508.5
15
477.5
36
488
57
498.5
78
509
16
478
37
488.5
58
499
79
509.5
17
478.5
38
489
59
499.5
80
510
18
479
39
489.5
60
500
19
479.5
40
490
61
500.5
20
480
41
490.5
62
501
3.5 Setting Transmitting Power
This command is used to set the transmitting power of the module for wireless communications. The default
transmitting power is 20 dBm, which is the maximum power of the module. You can set it to any integer between
3 and 17 and 20 as required. If you leave the parameter blank, the command is executed to query the current
transmitting power.
Send:
Command Code
Command Parameters
NULL
40 05
0 byte
Copyright © Neoway Technology Co., Ltd
5
Neo_SL720 Module Command Set (Star Network)
Command Code
Command Parameters
Transmitting power
40 05
1 byte
Return:
Command Code
Command Parameters
Transmitting power
80 05
1 byte
3.6 Enabling the Sleep Mode
This command is used to enable the sleep mode of the module. The power consumption of the module is ultra low
in sleep mode, so this mode is suitable to applications using battery power supply.
Send:
Command Code
Command Parameters
NULL
40 06
0 byte
Return:
Command Code
Command Parameters
Result
80 06
1 byte
Result: If the module enters the sleep mode, the result is 0; if the module fails to send some data or is sending data,
the result is 01; if the module is receiving data, the result is 02. The module enters the sleep mode successfully
only when it returns 0 for this command.
WAKEUP2 is the pin used to wake the module up. After the module enters the sleep mode, setting this pin to
rising edge can wake the module up.
3.7 Setting the UART Baud Rate
This command is used to set the UART baud rate of the module. The default baud rate is 9600 bps. If you leave
the parameter blank, this command is executed to query the current baud rate at UART.
Send:
Command Code
Command Parameters
NULL
40 07
0 byte
Copyright © Neoway Technology Co., Ltd
6
Neo_SL720 Module Command Set (Star Network)
Command Code
Command Parameters
Baud rate index
40 07
1 byte
Baud rate index:
0——2400
1——4800
2——9600
3——19200
4——38400
5——57600
6——115200
Return:
Command Code
Command Parameters
Baud rate index
80 07
1 byte
3.8 Enabling Broadcast Data Receiving
This command is used to specify whether to receive broadcast data. If you leave the parameter blank, this
command is executed to query whether the module receives broadcast data.
Send:
Command Code
Command Parameters
NULL
40 08
0 byte
Command Code
Command Parameters
Receiving broadcast data
40 08
1 byte
Receiving broadcast data:
0 indicates that the module does not receive wireless broadcast data
1 indicates that the module receives wireless broadcast data.
Return:
Command Code
Command Parameters
Receiving broadcast data
80 08
1 byte
Copyright © Neoway Technology Co., Ltd
7
Neo_SL720 Module Command Set (Star Network)
3.9 Querying Communications Quality
This command is used to query the RSSI for last communications and the success rate.
Send:
Command Code
Command Parameters
NULL
40 09
0 byte
Return:
Command Code
Command Parameters
RSSI
PER
1 byte
1 bytes
80 06
RSSI: received signal strengh indication, the absolute value of the actual RSSI
PER: packet error rate. If the module did not communicate with any other devices, the PER value is FF.
3.10 Sending Data
This command is used to send data to another module with the specified MAC address. The module returns result
only after data is sent.
Send:
Command Code
Command Parameters
Payload
40 0A
Destination
address
6 byte
1~70
Destination address: the MAC address of the module that the data is to be sent to. FF FF FF FF FF FF indicates
broadcast; EE EE EE EE EE EE indicates the default destination address stored in the module.
Return:
Command Code
Command Parameters
Result
80 0A
1 byte
Result:
0 if the data is sent successfully;
1 if the communications channel is occupied;
2 if the payload is too long.
Copyright © Neoway Technology Co., Ltd
8
Neo_SL720 Module Command Set (Star Network)
3.11 Reading Data
The module will enable the IO3(Data_ind) pin after receiving data. This command is used to read data received
by the module when the unsolicited report function of UART is disabled.
Send:
Command Code
Command Parameters
NULL
40 0B
0 byte
Return:
Command Code
Command Parameters
Source address
Payload
6 byte
0~70
80 0B
00 00 00 00 00 00 indicates no data.
3.12 Unsolicited Data Report
This command is used to specify whether enable unsolicited data report after the module receives data. If the
unsolicited report function is disabled, you need to send the reading data command to obtain the data after
enabling the IO3(Data_ind) pin. If it is enabled, the module will send data via UART after receiving it.
Send:
Command Code
Command Parameters
NULL
40 0C
0 byte
Command Code
Command Parameters
Unsolicited report
40 0C
1 byte
Unsolicited report: 0 indicates disable
1 indicates enable
Return:
Command Code
Command Parameters
Status of unsolicited report
80 0C
1 byte
Copyright © Neoway Technology Co., Ltd
9
Neo_SL720 Module Command Set (Star Network)
Status of unsolicited report: 0 indicates disable
1 indicates enable
3.13 Setting the Baud Rate for Wireless Communications
This command is used to set the communications baud rate. The default wireless baud rate is 10938 bps. If you
leave the parameter to blank, the command is executed to query the current wireless baud rate.
Send:
Command Code
Command Parameters
NULL
40 0D
0 byte
Command Code
Command Parameters
Baud rate index
40 0D
1 byte
Baud rate index:
0——Around 18 Kbps
1——Around 11 Kbps
2——Around 6 Kbps
3——Around 3.5 Kbps
4——Around 2 Kbps
5——Around 1 Kbps
6——Around 0.55 Kbps
Return:
Command Code
Command Parameters
Baud rate index
80 0D
1 byte
3.14 Setting the Module Type
This command is used to set the module type. The default value is 0x00, indicating a leaf node. If you leave the
parameter blank, this command is executed to query the module type.
Send:
Command Code
Command Parameters
NULL
40 0E
0 byte
Copyright © Neoway Technology Co., Ltd
10
Neo_SL720 Module Command Set (Star Network)
Command Code
Command Parameters
Module type index
40 0E
1 byte
Module type index:
0x00——Leaf node
0x01——Central node
Return:
Command Code
Command Parameters
Module type index
80 0E
1 byte
3.15 Setting Receiving Acknowledgement
This command is used to specify whether to enable receiving acknowledgement. The default value is 0x00,
indicating no acknowledgement. If you leave the parameter blank, the command is executed to query whether to
request receiving acknowledgement.
Send:
Command Code
Command Parameters
NULL
40 0F
0 byte
Command Code
Command Parameters
Acknowledgement request or not
40 0F
1 byte
Acknowledgement
0x00——No acknowledgement
0x01——Request acknowledgement
Return:
Command Code
Command Parameters
Acknowledgement request or not
80 0F
1 byte
Copyright © Neoway Technology Co., Ltd
11
Neo_SL720 Module Command Set (Star Network)
3.16 Reporting Data Sending Result
This command is used to report data sending result. After receiving data sending acknowledgement, the module
sends this command to report the data sending result.
Send:
Command Code
00 10
Command Parameters
Result
1 byte
Data sending result: 0 indicates that the data is sent successfully; 1 indicates Carrier Sense Multiple Access
(CSMA) failure; 2 indicates that the module does not receive acknowledgement though it is requested.
You can run the data sending command again only after the module reports data sending result if the module
obtains the acknowledgement of successful sending.
3.17 Setting the CSMA/CA
This command is used to set how many times CSMA with collision avoidance is allowed. The default parameter
value is 4. If you leave the parameter blank, this command is executed to query the time number of collision
avoidance.
Send:
Command Code
Command Parameters
NULL
40 11
0 byte
Command Code
Command Parameters
Collision avoidance times
40 11
1 byte
The quantity of collision avoidance times ranges from 0 to 4.
Return:
Command Code
Command Parameters
Collision avoidance times
80 11
1 byte
3.18 Setting the Packet RSSI
This command is used to set the packet RSSI. The default packet RSSI threshold is 63. If you leave the parameter
blank, this command is executed to query the packet RSSI.
Send:
Copyright © Neoway Technology Co., Ltd
12
Neo_SL720 Module Command Set (Star Network)
Command Code
Command Parameters
NULL
40 12
0 byte
Command Code
Command Parameters
Packet RSSI
40 12
1 byte
Packet RSSI & RSSI:
RSSI [dBm] = -137 + Packet RSSI
Return:
Command Code
Command Parameters
Packet RSSI
80 12
1 byte
3.19 Restarting the Module
This command is used to restart the module.
Send:
Command Code
Command Parameters
Bootloader waiting time
40 13
1 byte
Bootloader waiting time:
0x00——Restart but not enter Bootloader
0x0A ~0xC8——Restart and enter Bootloader, waiting for 1 to 20 seconds
Return:
Command Code
Command Parameters
Result
80 13
1 byte
Result:
0x00——Successful
0x01——Failed
3.20 Selecting Idle Channels
This command is used to start automatic channel selection of the central node.
Copyright © Neoway Technology Co., Ltd
13
Neo_SL720 Module Command Set (Star Network)
Send:
Command Code
Command Parameters
NULL
40 14
0 byte
Return:
Command Code
Command Parameters
Result
80 14
1 byte
Result:
0x00——Select idle channel successfully
0x01——Fail to select idle channel.
3.21 Reporting Idle Channel Selecting Result
This command is used for node to automatically report the idle channel selecting result.
Send:
Command Code
00 15
Command Parameters
Result
1 byte
Result: 0 indicates that the node selects channel successfully; 1 indicates that the node fails to select channel.
3.22 Setting Login Mode
This command is used to set the login mode of the leaf node. If you leave the parameter blank, this command is
executed to query the login mode.
Send:
Command Code
Command Parameters
NULL
40 0D
0 byte
Command Code
Command Parameters
Login mode
40 0D
1 byte
Login mode: 0——Manual login; 1——Automatic login
The default login mode of the leaf node is automatic.
Copyright © Neoway Technology Co., Ltd
14
Neo_SL720 Module Command Set (Star Network)
Return:
Command Code
Command Parameters
Login mode
80 0D
1 byte
3.23 Manual Login
This command is used to start the login process for the leaf node.
Send:
Command Code
Command Parameters
NULL
40 0E
0 byte
Return:
Command Code
Command Parameters
Result
80 0E
1 byte
Result:
0x00——Successful
0x01——Failed
3.24 Report Login Result
This command is used for node to report the login result.
Send:
Command Code
00 1F
Command Parameters
Result
1 byte
Result: 0 indicates successful login; 1 indicates failure.
This command is sent to the host after the leaf node logs in to the central node successfully or fails to do that.
3.25 Setting Interval of Automatic Central Node Check
This command is used to set the interval automatic central node check. If you leave the parameter blank, this
command is executed to query the interval of automatic check.
Send:
Copyright © Neoway Technology Co., Ltd
15
Neo_SL720 Module Command Set (Star Network)
Command Code
Command Parameters
NULL
40 20
0 byte
Command Code
Command Parameters
Interval of automatic check
40 20
2 byte
Interval of automatic check: the unit is second and the interval ranges from 2 minutes to 18 hours.
Return:
Command Code
Command Parameters
Interval of automatic check
80 20
2 bytes
3.26 Querying Current Module Information
This command is used to query the current module information, including module type, firmware, and
manufacturer.
Send:
Command Code
Command Parameters
NULL
40 E1
0 byte
Return:
Command
Code
80 E1
Command Parameters
Module
type
Version
(integer)
Version
(decimal)
Manufact
urer ID
1 byte
1 bytes
1 bytes
2 bytes
Module type: the value is fixed to 30 for SL720.
Version (integer): integer part of the firmware version
Version (decimal): decimal part of the firmware version
Manufacturer ID: fixed to NW in the ASCII format
Copyright © Neoway Technology Co., Ltd
16
Neo_SL720 Module Command Set (Star Network)
After the module enters Bootloader,

It sends module information if the waiting time is longer than 1s;

It waits for upgrade if receiving the upgrade command;

It executes its own program if it does not receive data frame from the UART.
3.27 Transferring Upgrade Files
This command is used to query the current module information, including module type, firmware, and
manufacturer.
Send:
Command
Code
Command Parameters
File flag
File
attribute
Total
fields
Flag of
field i
Length of
field i
File
data
1 bytes
1 bytes
2 bytes
2 bytes
2 bytes
longer
40 E2

File flag
Table 3-2 Value

Value
File Flag Name
0X00
Clear download files (not use)
0X01
Upload file transferring
0X02 ~ 0XFF
Reserved
File attribute
Table 3-3 Value
Value
File Attribute Name
0X00
Start frame, middle frame
0X01
End frame
0X02 ~ 0XFF
Reserve

Flag of field i (i=1 ~ n): The length of all fields except the last one is fixed. The length of the first field is 20
bytes and the following fields are no longer than 200 bytes.

File data: file content when the file is downloaded in packets.
Copyright © Neoway Technology Co., Ltd
17
Neo_SL720 Module Command Set (Star Network)
The upgrade file contains 20-byte file header, which is used to store version and file information. The first
frame transfers the file header so the length of the first field must be 20 bytes. Total fields = 1 (file header)
+ N (the remaining file length/fixed field length) + 1 (if the remaining length is not divisible)
Upgrade file format
Table 3-4 Upgrade file structure
File header
File content
20 bytes
Changeable file length
File header content:
Table 3-5 File header content:
Content
Length
Module type
1 bytes
Software version
2 bytes
Hardware version
2 bytes
File length
4 bytes
Check CRC16
2 bytes
Reserve
9 bytes
File header
Return:
Command
Code
Command Parameters
Receiving status
Receiving field flag
1 bytes
2 bytes
80 E2

Receiving status:
Table 3-6 Value

Value
Receiving State
0X00
Successful
0X01
Failed
0X02 ~ 0XFF
Reserved
Receiving field flag: receiving field flag of field i
Copyright © Neoway Technology Co., Ltd
18
Neo_SL720 Module Command Set (Star Network)
3.28 Returning Upgrade File Transferring Result
This command is used for the module upgraded to send data check result to its host after upgrade data is
transferred. After the last field of the file is transferred, SL720 checks the file received and returns the check
result. The host determines the upgrade result based on if the checksum stored in the file header and that the
module received are the same.
Table 3-7 Return value format of file transferring
Command
Code
Command Parameters
File check result
80 E3
2 bytes
3.29 Restarting the Module
This command is used to send restart command to the module that is in the Bootloader state The host sends this
command to the module when it determines that the file checksum are the same. The module writes the file
information and the CRC result to the flash after receiving the result. New program will run after the module
restarts.
Send:
Command Code
Command Parameters
NULL
40 E4
0 byte
Return:
Command Code
Command Parameters
Result
80 E4
1 byte
Result:
0x00——Successful
0x01——Failed
The module is upgraded in the following process:
1.
Send the restart command.
2.
Wait for the command to query the module upgrade information and ensure that the module enters the
Bootloader mode.
3.
Send the upgrade file transferring command
4.
Wait for the module to report the file transferring result.
5.
Send the restart command after the host determines that CRC result is the same as that in the file. If the CRC
is not the same, repeat steps 2 to 5 to upgrade the module.
Copyright © Neoway Technology Co., Ltd
19
Neo_SL720 Module Command Set (Star Network)
4 Module Interfaces
4.1 Top View of the Module
26 ANT
25 GND
24 ADC2
23 ADC1
22 GND
21 ACMP4
20 ACMP3
19 ACMP2
18 IO4
17 IO6
16 IO5
15 IO2
14 IO1
VDD 1
GND 2
UART_RX 3
UART_TX 4
RESET 5
WAKEUP1 6
IO3 7
WAKEUP2 8
I2C_DATA 9
I2C_CLK 10
PCNT_S1 11
PCNT_S0 12
IO0 13
4.2 Pin Description
The following pins are available for the leaf nodes: VDD, RESET, UART_TX, UART_RX, IO0, and IO3. For the
host, IO1, IO2, and IO 4 to GPIO 7 are also available.
Pin
Function
Remarks
VDD
Power supply
GND
GND
RESET
Reset
UART_RX
Data receiving
through UART
UART_TX
Data sending through
UART
WAKEUP
2
Wake up the module
from the sleep mode
The module wakes up automatically when the pin is set to
rising edge.
IO0
CSMA status
indication
High level indicates CSMA start; low level indicates CSMA
exit or failure
IO3
Unsolicited report of
data receiving
High level at the pin indicates that the module receives data;
low level indicates no data.
Copyright © Neoway Technology Co., Ltd
20
Neo_SL720 Module Command Set (Star Network)
5 Using Processes
5.1 Initialization Process
On the start topology network, the leaf node can log in to the central node automatically or manually.
Automatic login: The leaf node automatically check the connection with central nodes and select the central
node with the optimal communications signal to log in for data transferring. This mode is applicable to the
scenario wherein the communications conditions change frequently. In this mode, the module is initialized as
follows:
1.
Power on the central node and configure the node address and type. Ensure that the node address is unique
and the node type matches the node. For details, see 3.2 and 3.14.
2.
Send the idle channel selecting command to the central node through the UART, and end the selecting till the
UART receives the selecting result. For details, see 3.20 and 3.21.
3.
Power on the leaf node and configure the node address and type. Ensure that the node address is unique and
the node type matches the node. For details, see 3.2 and 3.14.
4.
Set the login mode of the leaf node to automatic login. See 3.22.
5.
Restart the leaf node through the RST pin or by running the restarting command. See 3.19.
6.
The leaf node automatically selects central node and logs in to it. After logging to the central node
successfully, the leaf node send the login result report. See 3.24.
Manual login: The host of the leaf node starts the login process and the leaf node selects the central node with the
optimal communications signal to log in. The leaf nodes does not check the connection with the central node.
This mode is applicable to the scenario wherein the communications is in good conditions and the host needs to
check the connections. In this mode, the module is initialized as follows:
1.
Power on the central node and configure the node address and type. Ensure that the node address is unique
and the node type matches the node. For details, see 3.2 and 3.14 .
2.
Send the idle channel selecting command to the central node through the UART, and end the selecting till the
UART receives the selecting result. For details, see 3.20 and 3.21 .
3.
Power on the leaf node and configure the node address and type. Ensure that the node address is unique and
the node type matches the node. For details, see 3.2 and 3.14 .
4.
Set the login mode of the leaf node to manual login. See 3.22 .
5.
Restart the leaf node through the RST pin or by running the restarting command. See 3.19 .
6.
Send the manual login command to the leaf node after it restarts. The leaf node searches for central node and
logs in to it. After logging to the central node successfully, the leaf node send the login result report. See
3.24 .
5.2 Data Transmission Process
The leaf node can work in the sleep mode or non-sleep mode.
The leaf node cannot send or receive data in sleep mode. So the host must wake the leaf node up through the
WAKEUP2 pin before sending or receiving data. In this mode, data is transmitted as follows:
Copyright © Neoway Technology Co., Ltd
21
Neo_SL720 Module Command Set (Star Network)
1.
The host wakes the leaf node up through WAKEUP2 and sends data to the central node through the data
sending command. See 3.10 .
2.
The central node uploads the data after receiving it and the host of the central node sends the data to the leaf
node through the data sending command. See 3.10 and 3.11 .
3.
The leaf node confirms the completion of the communications after its host receives the data. Then the host
sends the sleeping command to set the leaf node to the sleep mode.
4.
In the non-sleep mode, the leaf node can automatically send and receive data and the central node can send
data to the leaf node or broadcast the data at any time.
Copyright © Neoway Technology Co., Ltd
22
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertising