/
SimpleIPMote

SimpleIPMote

Description

The simpleIPMote application:

  • Iterates through the API command space
  • Connects to the mote on the supplied COM port
  • Gets the mote's status
  • Exits

The mote must be in slave mode to use SimpleIPMote

Sample Output

Simple Application which interacts with the IP mote - (c) Dust Networks

================== Step 1. API exploration ========================
=====
Load the API definition of the IP mote
done.
=====
List all the defined command IDs:
[1, 2, 6, 7, 8, 9, 12, 16, 17, 18, 21, 22, 23, 24, 36, 40]
=====
List all the defined command names:
['setParameter', 'getParameter', 'join', 'disconnect', 'reset', 'lowPowerSleep',
 'testRadioRx', 'clearNV', 'requestService', 'getServiceInfo', 'openSocket', 'cl
oseSocket', 'bindSocket', 'sendTo', 'search', 'testRadioTxExt']
=====
Get the command name of command ID 2:
getParameter
=====
Get the command ID of command name 'getParameter':
2
=====
List the subcommand of command 'getParameter':
['macAddress', 'networkId', 'txPower', 'joinDutyCycle', 'eventMask', 'moteInfo',
 'netInfo', 'moteStatus', 'time', 'charge', 'testRadioRxStats', 'OTAPLockout', '
moteId', 'ipv6Address', 'routingMode', 'appInfo', 'powerSrcInfo', 'powerCostInfo
', 'mobilityType', 'advKey', 'sizeInfo', 'autoJoin']
=====
Get a description of the getParameter.moteStatus command:
The getParameter<moteStatus> command is used to retrieve current mote state ando
ther dynamic information.
=====
List the name of the fields in the getParameter.moteStatus request:
[]
=====
List the name of the fields in the getParameter.moteStatus response:
['state', 'reserved_0', 'reserved_1', 'numParents', 'alarms', 'reserved_2']
=====
Print the format of the getParameter.moteStatus 'state' response field:
int
=====
Print the length of the getParameter.moteStatus 'state' response field:
1
=====
Print the valid options of the getParameter.moteStatus 'state' response field:
[0, 1, 2, 3, 4, 5, 6, 7, 8]
=====
Print the description of each valid options of the getParameter.moteStatus 'stat
e' response field:
['init', 'idle', 'searching', 'negotiating', 'connected', 'operational', 'discon
nected', 'radiotest', 'promiscuous listen']

================== Step 2. Connecting to a device =================
Do you want to connect to a device? [y/n] y
Enter the serial port of the IP mote's API (e.g. COM30) COM6
=====
Creating connector
done.
=====
Connecting to IP mote
done.

================== Step 3. Getting information from the device ====
=====
Retrieve the moteStatus, through 'raw' API access:
{'numParents': 0, 'reserved_1': 0, 'reserved_0': 0, 'reserved_2': 0, 'state': 1,
 'RC': 0, 'alarms': 0}
=====
Retrieve the moteStatus, through function-based API access:
Tuple_dn_getParameter_moteStatus(RC=0, state=1, reserved_0=0, reserved_1=0, numP
arents=0, alarms=0, reserved_2=0)

================== Step 4. Disconnecting from the device ==========
=====
Disconnecting from IP mote
done.
Script ended. Press Enter to exit.

Related content

SimpleIPPing
SimpleIPPing
More like this
SimpleIPUpstreamMote
SimpleIPUpstreamMote
More like this
SimpleHartMote
SimpleHartMote
More like this
SimpleIPMgr
SimpleIPMgr
More like this
SimpleIPDownstreamMgr
SimpleIPDownstreamMgr
More like this
SimpleIPUpstreamMgr
SimpleIPUpstreamMgr
More like this