User's Manual
VT-M2M-TC VM
All Rights Reserved
2BaseControl
Opentheterminal(CTRL+ALT+T),thengetintothedemodirectory.
Thedirectorypatchis/programs/demo.
ex:
$cd/programs/demo
2.1PowerControl
powercan|gps|3g][on|off]
can: PowercontrolofCANModule
gps: PowercontrolofGPSModule
3g: Powercontrolof3GModule
ex1:Turnonpowerofcanmodule
$sudo./powercanon
ex2:Turnoffpowerofcanmodule
$sudo./powercanoff
2.2CanControl
a. Closecandevice
$sudoifconfigcan0down
b. Configurecan,setcan’sbaudrateto1Mbps,or100000(100kbps)
$sudoiplinksetcan0typecanbitrate100000
$sudoifconfigcan0up
c. Receivecandata,itwillreceivecandatawhichfromotherside
$sudo./loopback
d.Sendcandata,itwillsendcanpackagewithIDof0x02
$sudo./client
2.3GPIOControl
gpioctl<dirin|dirout|get|set|clear><gpionum>
dirin: SetspecifiedGPIOasinputtype
dirout: SetspecifiedGPIOasoutput
get:ReadGPIOinputlevel.NeedsettheGPIOasinputfirst.
set:SetGPIOashighlevel.NeesettheGPIOasoutputfirst.