Lantronix 900-332 manual Examples, Command 1Ah, Set Active Levels, Command 1Bh, Set States

Page 70

Configurable Pins

Bytes 1-4: The updated directions

Command 1Ah, Set Active Levels

Send:

2parameters Bytes 1-4: Mask

Bit X 1 means the direction for GPIO X will be updated with the value in the second parameter.

0 means the active type for that GPIO will not change.

Bytes 5-8: New Active Levels

Bit X 1 means GPIO X will become active low.

0 means it will become active high.

Response:

1 parameter

Bytes 1-4: Updated active levels

Command 1Bh, Set States

Send:

2parameters Bytes 1-4: Mask

Bit X 1 means the state for GPIO X will be updated with the value in the second parameter.

0 means the state for that GPIO will not change.

Bytes 5-8: New States

Bit X 1 means GPIO X will become active.

0 means it will become inactive.

Response:

1 parameter

Bytes 1-4: Updated states

Examples

Example 1: PC sends command 10h to find out which configurable pins are available as GPIO.

PC -> WiPort: 10h, 00h, 00h, 00h, 00h, 00h, 00h, 00h, 00h

WiPort -> PC: 10h, 03h, 00h, 02h, 00h

Command details:

10h = command 10h

00h, 00h, 00h, 00h = ignored 00h, 00h, 00h, 00h = ignored

Response details:

10h = response to command 10h 03h, 00h, 02h, 00h =

bits 0, 1, and 9 are 0 CP0, CP1, and CP9 are configured as GPIOs (i.e. GPIO0, GPIO1, GPIO9).

6-4

WiPort™ User Guide

Image 70
Contents WiPort User Guide Page Technical Support Lantronix Corporate HeadquartersSales Offices Disclaimer and Revisions Contents Wlan Settings5-19 ContentsAccessing Setup Mode Expert Settings5-20Gpio Pins Factory DefaultsExit Configuration Mode Control ProtocolPage Chapter Summary Using This GuidePurpose and Audience Remaining chapters in this guide includeUsing This Guide Additional DocumentationIntroduction CapabilitiesProtocol Support Configuration MethodsApplications IntroductionIP Address Addresses and Port NumbersHardware Address Port NumbersPage Accessing WiPort using DeviceInstaller Configuration using DeviceInstallerServer Configuration Wlan Configuration OEM Pin Configuration Host List ConfigurationConfiguration Using DeviceInstaller Channel 1 and Channel 2 Configuration UDP Datagram Mode Common I/F Mode SettingSerial Settings Passive ConnectionActive Connection Connection DisconnectionBuffer Flushing Email Configuration PackingTriggers Unit NamePage Configuration using Web-Manager Accessing WiPort using Web-ManagerNetwork Configuration Configuration Using Web-ManagerClick the OK button when finished Automatic IP Address ConfigurationStatic IP Address Configuration Select Obtain IP address automaticallyIP Address Select Use the following IP configurationDefault Gateway Subnet MaskServer Configuration AdvancedRetry Settings Serial SettingsHost Information Available fields, enter the following information Port SettingsDisable Serial Port ChannelFlush Input Buffer Serial to Network Connection Settings TCPPack Control Flush Output Buffer Network to SerialConnect Mode Active Connection Connect Mode Passive ConnectionConnect Protocol Disconnect Mode Endpoint ConfigurationCommon Options Connection Settings UDP Datagram ModeChange Address Table Configure the following fieldsMail Server IP Address Recipients Configurable PinsEnable Serial Trigger ConditionsMessage Properties Wireless Network Security Ad Hoc SettingsEnter or modify the following fields Advanced Settings Configure or modify the following fields for each pinUpdating Settings Page Accessing Setup Mode Configuration via Serial Mode or Telnet PortTelnet Access Configuration Via Serial Mode or Telnet Port Serial Port AccessClick OK. The following information displays Set the IP Address Set the Gateway IP AddressDhcp Name Change Telnet Configuration PasswordSet the Netmask Network Class Host Bits NetmaskMode Option Interface ModeFollowing table displays available I/F Mode options Interface Mode OptionsPort Number Common I/F Mode Setting Binary HexFlow Flow Control OptionConnect Mode Option Connect ModeEnter Connect Mode options in hexadecimal notation Port Numbers Reserved forIncoming Connection ResponseManual Connection Address Example Manual ConnectionAutostart Automatic Connection Hostlist Hostlist ExampleDatagram Type Modem ModeMessage Meaning Modem Mode Commands Modem Mode CommandFunction Remote IP Address Modem Mode Function CommandRemote Port 10. Disconnect Mode Options Flush ModeDisconnect Mode Option 11. Flush Mode OptionsOption SendChar 1 and SendChar2 DisConnTime Inactivity TimeoutChannel Port Password Telnet Terminal TypeMail Server Recipient Unit NameDomain Name TriggerEnable Ad Hoc Network Creation Wlan SettingsEnable Wlan Find Network NameExpert Settings Security SettingsDisable Tftp Firmware Upgrade Disable SnmpDisable Telnet Setup Disable Port 77FE HexFactory Defaults Channel 2 Configuration Channel 1 ConfigurationWlan Settings Security Settings Exit Configuration ModeExpert Settings Email SettingsFeatures Configurable PinsGpio Pins Control ProtocolByte 0 Command Types CommandsConfigurable Pins Command 10h, Get FunctionsCommand 13h, Get Current States Command 11h, Get DirectionsCommand 12h, Get Active Levels Command 19h, Set DirectionsCommand details Command 1Ah, Set Active LevelsCommand 1Bh, Set States Examples1Bh = response to command 1Bh 03h, 00h, 00h, 00h = Page Entering Monitor Mode via the Network Port Monitor ModeEntering Monitor Mode via the Serial Port To enter Monitor Mode locallyCommand Command Name Function Monitor Mode CommandsFollowing commands are available in Monitor Mode Monitoring the NetworkObtaining Firmware Reloading Firmware Using Tftp Graphical User InterfaceUpdating Firmware ROM File FWX FileRecovering the Firmware Using the Serial Port Using Tftp Command Line InterfaceTroubleshooting Problems and Error Messages TroubleshootingProblem/Message Reason Solution Please try again Caps Lock is not onGeneral DeviceInstaller Settings Device Server messageTechnical Support Technical Support Europe, Middle East, and Africa