S76G/S78G Commands Set Reference
v1.6.5
July 2, 2018
21 of 73
Product Name
Version
Doc No
Date
Page
3.2
MAC commands
3.2.1
mac tx <Type> <PortNum> <Data>
<Type>: a string representing type of transmitting message, it can be
cnf
(confirmed) or
ucnf
(unconfirmed).
<PortNum>: a decimal string representing port number used for transmission, it can be from
1
to
223
.
<Data>: a hexadecimal string representing data to be transmitted.
(e.g.
98ba34fd means “0x98, 0xba, 0x34, 0xfd 4bytes would be sent out”)
Response: there are two responses after entering this command. The first response will be received
after entering command. The second response will be received after transmission.
First response:
Ok
, if <Type>, <PortNum> and <Data> strings are valid.
Invalid
, if <Type>, <PortNum> and <Data> strings are not valid.
not_joined
, module is not joined LoRaWAN
TM
.
no_free_ch
, no channels are available.
busy
, internal state is busy.
invalid_data_length
, data length is larger than the allowed length by LoRaWAN
TM
.
exceeded_data_length
, data length is larger than 250 bytes.
Second response:
tx_ok
, successfully transmit data.
mac rx
<portnum> <data>
, there is downlink data.
<portnum>
- a decimal string representing receiving port
<data>
- a hexadecimal string representing received data.
err
, acknowledgement is not received, if confirmed message is used.
Purpose: Star transmission by following LoRaWAN
TM
uplink format.
Example:
mac tx ucnf 15 98ba34fd
>> Ok
>> tx_ok
mac tx ucnf 15 6805
>> Ok
>> mac rx 4 1234abcd