quick start guide qsm-8q60 - …cdn.viaembedded.com/products/docs/qsm-8q60/linux... · 1 qsm-8q60...
TRANSCRIPT
QUICK START GUIDE
QSM-8Q60Linux EVK v3.0.2
1.00-03052018-115000
Copyright
Copyright © 2017-2018 VIA Technologies Incorporated. All rights reserved.
No part of this document may be reproduced, transmitted, transcribed, stored in a retrieval system, or translated into any language, in any form or by any means, electronic, mechanical, magnetic, optical, chemical, manual or otherwise without the prior written permission of VIA Technologies, Incorporated.
Trademarks
All brands, product names, company names, trademarks and service marks are the property of their respective holders.
Disclaimer
VIA Technologies makes no warranties, implied or otherwise, in regard to this document and to the products described in this document. The information provided in this document is believed to be accurate and reliable as of the publication date of this document. However, VIA Technologies assumes no responsibility for the use or misuse of the information (including use or connection of extra device/equipment/add-on card) in this document and for any patent infringements that may arise from the use of this document. The information and product specifications within this document are subject to change at any time, without notice and without obligation to notify any person of such change.
VIA Technologies, Inc. reserves the right the make changes to the products described in this manual at any time without prior notice.
Version Date Remarks1.00 03/05/2018 Initial release
QSM-8Q60 Linux EVK v3.0.2 Quick Start Guide
Revision History
iii
QSM-8Q60 Linux EVK v3.0.2 Quick Start Guide
Table of Contents1. Introduction ����������������������������������������������������������������������������������������������������������������������� 1
1�1 EVK Package Contents �������������������������������������������������������������������������������������������������������������������������� 11�1�1 Firmware Folder Contents ������������������������������������������������������������������������������������������������������������� 11�1�2 Document Folder Contents ������������������������������������������������������������������������������������������������������������ 11�1�3 Tools Folder Contents ������������������������������������������������������������������������������������������������������������������� 1
1.2 VersionInformationandSupportedFeatures �������������������������������������������������������������������������������������� 2
2. ImageInstallation ������������������������������������������������������������������������������������������������������������� 32.1 BootingfromaMicroSDCard ������������������������������������������������������������������������������������������������������������� 32.2 BootingfromtheSPIROMwitheMMC ������������������������������������������������������������������������������������������������ 4
3. HardwareFunction ����������������������������������������������������������������������������������������������������������� 63.1 SettingUpU-BootParameters ������������������������������������������������������������������������������������������������������������� 63.2 RestoringDefaultU-BootParameters �������������������������������������������������������������������������������������������������� 83.3 UsingtheOpenEmbeddedConsole ������������������������������������������������������������������������������������������������������ 83.4 SettingUpDisplayDevice �������������������������������������������������������������������������������������������������������������������� 9
3.4.1 SettingUptheU-BootDisplayParametersforHDMI ��������������������������������������������������������������������� 93.4.2 SettingUptheU-BootDisplayParametersforLVDS ���������������������������������������������������������������������� 9
3.5 SettingUpCOM4,COM5,COM6andCOM7 ���������������������������������������������������������������������������������� 113.6 ConfiguringFlexCAN ������������������������������������������������������������������������������������������������������������������������� 133.7 ConfiguringWatchdogTimer �������������������������������������������������������������������������������������������������������������� 153.8 SettingUpGPIO ���������������������������������������������������������������������������������������������������������������������������������� 16
3.8.1 SettingUpGPIMode�������������������������������������������������������������������������������������������������������������������� 173.8.2 SettingUpGPOMode ������������������������������������������������������������������������������������������������������������������ 17
3.9 ConfiguringRTC ���������������������������������������������������������������������������������������������������������������������������������� 18
4. Accessories ���������������������������������������������������������������������������������������������������������������������� 194.1 ConfiguringtheVNT9271USBWi-FiDongle �������������������������������������������������������������������������������������� 194.2 ConfiguringtheEMIO-1541miniPCIeWi-FiModule �������������������������������������������������������������������������� 204.3 ConfiguringtheEMIO-2531miniPCIeWi-Fi&BluetoothModule ����������������������������������������������������� 21
4.3.1 ConnectingtotheInternet ���������������������������������������������������������������������������������������������������������� 214.3.2 EnablingBluetooth ���������������������������������������������������������������������������������������������������������������������� 22
4.3.2.1 SettingUpBluetoothA2DPProfile 224.3.2.2 SettingUpBluetoothSPPProfile 23
4.4 ConfiguringtheEMIO-2550miniPCIeMobileBroadbandModule ���������������������������������������������������� 254.4.1 ConnectingtotheInternet ���������������������������������������������������������������������������������������������������������� 254.4.2 EnablingGPS �������������������������������������������������������������������������������������������������������������������������������� 26
iv
QSM-8Q60 Linux EVK v3.0.2 Quick Start Guide
1
1� IntroductionThisQuickStartGuideprovidesanoverviewonhowtoboottheLinuxEVKsystemimageontheQSM-8Q60moduleandconfigurethesupportedhardwarefunctionsandI/OdefinedontheQSMDB2carrierboard.
TheQSM-8Q60LinuxBSPv3.0.2isdevelopedbasedontheNXPfsl-yocto-L4.1.15_1.1.0-ga(Yocto2.0Jethro)anditenableshardwarefeaturesthataredefinedontheQSM-8Q60andQSMDB2carrierboard.
1�1 EVK Package ContentsTherearethreefoldersinthepackagelistedasbelow.
QSM-8Q60LinuxEVKcontents
1�1�1 Firmware Folder ContentsQSM-8Q60_Yocto2.0_BIN_v3.0.2.tar.gz:containsinstallationscriptfilesandtheprecompiledU-bootandimageforevaluatingtheQSM-8Q60andQSMDB2carrierboardwithanOpenEmbeddedfilesystem.
1�1�2 Document Folder ContentsQSM-8Q60_Linux_EVK_v3.0.2_Quick_Start_Guide _v1.00_20180305.pdf:ThisQuickStartGuideprovidesanoverviewonhowtoboottheLinuxEVKsystemimageontheQSM-8Q60moduleandconfigurethesupportedhardwarefunctionsandI/OdefinedontheQSMDB2carrierboard.
1�1�3 Tools Folder Contents BT_Config.zip:containsthethreeBluetoothconfigurationfilesforA2DPsupport.
Firmware folder DescriptionQSM-8Q60_Yocto2.0_BIN_v3.0.2.tar.gz YoctoEVKsystemimageandinstallation
scriptfilesDocument folder DescriptionQSM-8Q60_Linux_EVK_v3.0.2_Quick_Start_Guide_v1.00_20180305.pdf
QuickStartGuide
Tools folder DescriptionBT_Config.zip ContainBluetoothconfiguringfiles
QSM-8Q60 Linux EVK v3.0.2 Quick Start Guide
2
1�2 VersionInformationandSupportedFeatures
• U-Bootversion:2015.04
• Kernel version: 4�1�15
• Evaluationimage:OpenEmbedded-corebuiltwithYocto2.0Jethro
• DevelopmentbasedonNXPfsl-yocto-L4.1.15_1.1.0-ga(Yocto2.0Jethro)
• SupportsSPIwitheMMCorMicroSDboot(default)
• SupportsHDMIandLVDSdisplay
• SupportsHDMIaudiooutput
• SupportsAUOLVDScapacitivetouchpanels(throughUSBinterface)
oAUO10.4”G104XVN01.0LVDSpanel(1024×768)
oAUO7”G070VW01V0LVDSpanel(800×480)
• SupportsCOM1,COM3(TX/RX)andCOM2asadebugport
• SupportsCOM4,COM5,COM6andCOM7(RS-232/RS-485/RS-422)
• SupportstwoFlexCANTX/RX
• SupportsGigabitEthernet(LAN1)
• Supports10/100MbpsEthernet(LAN2)
• SupportsLine-in,Line-out,andMic-in
• SupportsVNT9271USBWi-Fidongle
• SupportsEMIO-1541miniPCIeWi-Fimodule
• SupportsEMIO-2531miniPCIeWi-Fi&Bluetoothmodule
oSupportsBluetoothA2DPandSPPprofile
• SupportsEMIO-2550miniPCIeMobileBroadbandmodule
• SupportsWatchdogTimer,GPIOandRTC
QSM-8Q60 Linux EVK v3.0.2 Quick Start Guide
3
2� ImageInstallationThissectionexplainsthesetuprequirementsforbootingfromaMicroSDcardortheSPIROMandeMMC.
Theinstallationscriptfiles,theprecompiledU-bootandimageareprovidedinthe“Firmware”folder.
2�1 BootingfromaMicroSDCardThefirststepistoinstallthisimageontoaMicroSDcard.InsertaMicroSDcardintoyourLinuxhostmachineandmakesureitisnotmounted.InstalltheSDcardimageontotheMicroSDcardwiththecommandsbelow,replacing<devicename>withthecorrectvalueforthecard.
*Important:Makesureyouarewritingtothecorrectdeviceorthehostsystemenvironmentcouldbedamaged�
Next,ontheQSM-8Q60,settheMicroSD/SPIbootjumper(J11)totheMicroSDpositionasshownbelow.
Micro SD/SPI boot jumper diagram
InsertthepreparedMicroSDcardintotheQSM-8Q60,connecttheHDMIdisplaytotheQSMDB2carrierboard,andpoweronthedevicetoinitiatethebootprocess.
Whenthebootprocessiscompleted,youwillseetheOpenEmbeddeddesktop.
$ tar xvf QSM8Q60_Yocto2.0_BIN_v3.0.2.tar.gz$ cd sd_installer/$ sudo ./mk_sd_installer.sh /dev/<device name> --yocto
QSM-8Q60 Linux EVK v3.0.2 Quick Start Guide
4
2�2 BootingfromtheSPIROMwitheMMCTheQSM-8Q60andQSMDB2carrierboardsupportsbootingfromtheSPIROMwhileloadingthekernelandrootfilesystemfromtheeMMC.
ThefirststepistoprepareaMicroSDcardasthesysteminstaller.InsertaMicroSDcardintoyourLinuxhostmachineandmakesureitisnotmounted.InstallthesysteminstallerontotheMicroSDcardwiththecommandbelow,replacing<devicename>withthecorrectvalueforthecard.
*Important:Makesureyouarewritingtothecorrectdeviceorthehostsystemenvironmentcouldbedamaged�
Next,ontheQSM-8Q60,settheMicroSD/SPIbootjumper(J11)totheMicroSDpositionasshownbelow.
Micro SD/SPI boot jumper diagram
InsertthepreparedMicroSDcardintotheQSM-8Q60,connecttheHDMIdisplaytotheQSMDB2carrierboard,andpoweronthedevice.ThesystemwillautomaticallystarttoinstallU-bootandimageontotheSPIROMandeMMC.
Whentheinstallprocessiscompleted,unplugthepowercableandremovetheMicroSDcard.
$ tar xvf QSM8Q60_Yocto2.0_BIN_v3.0.0.tar.gz$ cd sd_installer/$ sudo ./mk_sd_installer.sh /dev/<device name>
QSM-8Q60 Linux EVK v3.0.2 Quick Start Guide
5
InordertobootfromtheSPIROMmakesuretheMicroSD/SPIbootjumper(J11)issettoSPIROM.
Micro SD/SPI boot jumper diagram
Next,connectanHDMIdisplay,andpoweronthedevicetoinitiatethebootprocess.Whenthebootprocessiscompleted,youwillseetheOpenEmbeddeddesktop.
QSM-8Q60 Linux EVK v3.0.2 Quick Start Guide
6
3� HardwareFunctionThissectionexplainshowtoenableandtestthehardwarefunctionsprecompiledintheLinuxEVKincludingsettingu-bootparameters,restoringdefaultu-bootparameters,settingupdisplaydevice,settingupCOM4,COM5,COM6andCOM7,configuringflexCAN,configuringwatchdogtimer,settingupGPIO,andconfiguringRTC�
3�1 SettingUpU-BootParametersThefirststepistoconnectthehostmachineandtheQSM-8Q60throughtheCOM2portoftheQSMDB2carrierboard.UseaserialportcommunicationprogramsuchasPuTTY,GtkTerm,orMinicom,toconfiguretheserialportsettingandconnecttothedebugconsole.ThereyouwillbeabletoseetheU-BootbootlogandadjustsettingsintheU-Bootconsole.
Serial port setting of host machine
COM 2 port diagram
Next,powerontheQSM-8Q60andQSMDB2carrierboardtoinitiatethebootprocess.
QSM-8Q60 Linux EVK v3.0.2 Quick Start Guide
7
Whenprompted,pressanykeytostopthebootprocessandentertheU-Bootconsoleasillustratedbythescreenshotbelow.
Debug console view of boot process
TolistthecurrentU-Bootparameters,usethefollowingcommand:
Makesuretheprintoutmessageincludes“bootcmd=runbootcmd_auto”.
Thedefault“bootcmd”parameterissettoautodetecttheMicroSDcardbyattemptingtoloadthekernel.Ifitisnotdetected,itcontinuestobootfromtheeMMC.
ToloadthekernelfromtheMicroSDcardoreMMC,refertothetwoexamplesbelow.
ToloadthekernelfromtheMicroSDcard,usethefollowingcommand:
ToloadthekernelfromtheeMMC,usethefollowingcommand:
U-Boot 2015.04-imx_v2015.04_4.1.15_1.0.0_ga+gd7d7c43 (Feb 15 2017 - 17:10:38)
CPU: Freescale i.MX6DL rev1.3 at 996 MHzCPU: Temperature 34 CReset cause: PORBoard: MX6DL-QSM-8Q60I2C: readyDRAM: 2 GiBMMC: FSL_SDHC: 0, FSL_SDHC: 1SF: Detected W25Q32BV with page size 256 Bytes, erase size
4 KiB, total 4 MiBUnable to allocate framebuffer memoryIn: serialOut: serialErr: serialNet: FEC [PRIME]Normal BootHit any key to stop autoboot: 0=>
=> printenv
=> setenv bootcmd ‘run bootcmd_sd’=> saveenv=> boot
=> setenv bootcmd ‘run bootcmd_mmc’=> saveenv=> boot
QSM-8Q60 Linux EVK v3.0.2 Quick Start Guide
8
3�2 RestoringDefaultU-BootParametersIftheU-Bootparametershavebeenmodified,the“destroyenv”commandintheU-Bootconsolecanrestorethedefaultsettings.
Torestartthedevice,usethe“reset”command.
3�3 UsingtheOpenEmbeddedConsoleThefirststepistoconnectthehostmachineandtheQSM-8Q60throughtheCOM2portoftheQSMDB2carrierboard.UseaserialportcommunicationprogramsuchasPuTTY,GtkTerm,orMinicom,toconnecttothedebugconsole.ThereyouwillbeabletoseetheU-BootbootlogandadjustsettingsintheU-Bootconsole.Next,powerontheQSM-8Q60andQSMDB2carrierboardtoinitiatethebootprocess.Whenthebootprocessiscompletedyouwillbepromptedtologin.
COM 2 port diagram
Thedefaultaccountis“root”,withnopasswordset(justpressEnterwhenpromptedforpassword).
=> destroyenv=> reset
...Freescale i.MX Release Distro 4.1.15-1.1.1 imx6qsm8q60 dev/ttymxc1imx6qsm8q60 login: root
QSM-8Q60 Linux EVK v3.0.2 Quick Start Guide
9
3�4 SettingUpDisplayDeviceTheQSM-8Q60LinuxBSPv3.0.2supportsthefollowingdisplaydevices:
• HDMImonitor
• AUO10.4”G104XVN01.0LVDSpanel(1024x768)
• AUO7”G070VW01V0LVDSpanel(800x480)
3�4�1 SettingUptheU-BootDisplayParametersforHDMITosettheHDMImonitorasthedisplayoutput,usethefollowingcommand:
InordertoconfirmthesettingsarecorrectusethefollowingcommandtolistthenewU-Bootparameters:
MakesurethatthedisplaydeviceisHDMIandtheresolutionmatchesyourmonitor’sresolution.
3�4�2 SettingUptheU-BootDisplayParametersforLVDSBeforesettinganLVDSpanelasthedisplayoutputmakesuretheLVDSbacklightpowerjumper(J1)issetto+12VandtheLVDSpanelpowerjumperissetto+3.3Vasshownbelow.
LVDS power jumper diagram
=> run o_hdmi=> saveenv=> reset
=> printenv hdmi
hdmi=video=mxcfb0:dev=hdmi,1920x1080M@60,bpp=32
QSM-8Q60 Linux EVK v3.0.2 Quick Start Guide
10
TosettheAUO10.4”G104XVN01.0LVDSpanelasthedisplayoutput,usethefollowingcommand:
InordertoconfirmthesettingsarecorrectusethefollowingcommandtolistthenewU-Bootparameters:
TosettheAUO7”G070VW01V0LVDSpanelasthedisplayoutput,usethefollowingcommand:
InordertoconfirmthesettingsarecorrectusethefollowingcommandtolistthenewU-Bootparameters:
=> run o_lvdsg104=> saveenv
=> printenv lvds_auo_g104lvds_auo_g104=video=mxcfb0:dev=ldb,LDB-XGA, if=RGB24 ldb=sin0
=> run o_lvdsg070=> saveenv
=> printenv lvds_auo_g070lvds_auo_g070=video=mxcfb0:dev=ldb,480C60,if=RGB24 ldb=sep0
QSM-8Q60 Linux EVK v3.0.2 Quick Start Guide
11
3�5 SettingUpCOM4,COM5,COM6andCOM7TheCOM4,COM5,COM6andCOM7pinheaderscansupportRS-232/RS-422/RS-422modes.ForRS-232modetheCOMportscanuseallpinsofthepinheader.ForRS-422andRS-485modes,theycanuseonlypinsno.2and3(TXandRXsignals).
COM 4, COM 5, COM 6 and COM 7 pin header diagram
TocheckthattheQSMDB2carrierboardhascorrectlydetectedtheExarUSBUARTmodule,usethefollowingcommand:
Makesuretheprintoutmessageincludes“xr_usb_serial_common198140”and“Bus002Device003:ID04e2:1414ExarCorp.”.
TolistallExarUSBserialdevices,usethefollowingcommand:
COM port and Device name definition table
$ ls /dev/ttyXRUSB*/dev/ttyXRUSB0 /dev/ttyXRUSB1 /dev/ttyXRUSB2 /dev/ttyXRUSB3
$ lsusb
COM port Device nameCOM4 ttyXRUSB0COM5 ttyXRUSB1COM6 ttyXRUSB2COM7 ttyXRUSB3
QSM-8Q60 Linux EVK v3.0.2 Quick Start Guide
12
Important: Pleasesetuptheserialdevicesbeforestartingthecommunicationprogram.
ConnecttheCOMcable(P/N: 99G33-080127)totheCOM4/COM5/COM6/COM7pinheaderontheQSMDB2carrierboard.ThenconnectthehostmachinetotheQSMDB2throughCOMcable.
TosetuptheserialdevicetoRS-232mode,usethefollowingcommand:
TosetuptheserialdevicetoRS-422mode,usethefollowingcommand:
TosetuptheserialdevicetoRS-485mode,usethefollowingcommand:
TostarttheMinicomserialcommunicationprogramontheQSM-8Q60andQSMDB2carrierboard,usethefollowing command:
Startaserialcommunicationprogramonthehostmachinewiththesamecommunicationsettingsusingtheappropriateserialdevice.AfterwardsthehostmachineandtheQSM-8Q60andQSMDB2carrierboardwillbeabletocommunicatethroughtheprograms(forexamplesendingakeypressononemachinewillbeshownontheothermachine).
$ exar_setmode <Device name> 0
$ exar_setmode <Device name> 2
$ exar_setmode <Device name> 1
$ minicom -s
QSM-8Q60 Linux EVK v3.0.2 Quick Start Guide
13
3�6 ConfiguringFlexCANTheCANbusconnectoroftheQSM-8Q60andQSMDB2carrierboardsupportstwoCANbusports.
CAN bus connector diagram
CAN bus connector pinouts table
Pin Signal1 NC2 NC3 NC4 CANH15 NC6 GND7 CANL28 CANH29 NC
10 CANL1
QSM-8Q60 Linux EVK v3.0.2 Quick Start Guide
14
PleasenotethatyouneedtofirstdisabletheCANbusthensettheCANbusbitrate.TheCANbusbitrateshouldbebetween5000<[BRT_value]<1000000.
TheCANbus1iscan0andtheCANbus2iscan1.
TosettheCANbus1bitrate[BRT_value],usethefollowingcommand:
ToenabletheCANbus1,usethefollowingcommand:
TodisabletheCANbus1,usethefollowingcommand:
UsethecansendcommandtosendCANbus1data:
<ID>:DeviceIDofCANbus
<Data>:Sendoutdata
UsethecandumpcommandtoreceivedatafromCANbus1:
# ip link set can0 type can bitrate [BRT_value]
# ifconfig can0 up
# ifconfig can0 down
# cansend can0 <ID>#<Data>
# candump can0 &
QSM-8Q60 Linux EVK v3.0.2 Quick Start Guide
15
3.7 ConfiguringWatchdogTimerWatchdogTimerisanelectronictimerthatisusedtodetectandrecoverfromsystemmalfunctions.
Thewdt_driver_test.outprovidesanapplicationtoconfiguretheWatchdogtimer.
ToenableWatchdogTimerwithadefaulttimeoutof60seconds,usethefollowingcommand:
Tochangethetimeout<value>andtheboardreboot<value>(seconds),usethefollowingcommand:
Tosendkeep-aliverequeststotheWatchdog<value>(seconds),usethefollowingcommand:
Whenthevalueof“set_keep_alive”issmallerthanthevalueof“set_timeout”,theboardwillnotreboot.
TodisabletheWatchdogtimer,usethefollowingcommand:
$ /unit_tests/wdt_driver_test.out enable
$ /unit_tests/wdt_driver_test.out set_timeout <value>
$ /unit_tests/ wdt_driver_test.out set_keep_alive <value>
$ /unit_tests/wdt_driver_test.out disable
QSM-8Q60 Linux EVK v3.0.2 Quick Start Guide
16
3�8 SettingUpGPIOTheGPIOpinheaderontheQSMDB2carrierboardconsistsof40pins.Thefollowingsectionexplainssettingupthesepinsforinput/outputcommunication.
GPIO pin header diagram
TheechovalueofGPIOpinsarelistedbelow:
GPIO pin header pinout and GPIO echo value
EnablethemultifunctionpinasaGPIOpin.HereistheexampleforGPIOpin1:
DisablethemultifunctionpinasaGPIOpin.HereistheexampleforGPIOpin1:
$ echo 208 > /sys/class/gpio/export
Pin Signal GPIO echo value Pin Signal GPIO echo value1 GPIO0 208 2 GPIO4 2123 GPIO1 209 4 GPIO5 2135 GPIO2 210 6 GPIO6 2147 GPIO3 211 8 GPIO7 2159 GND 10 GND
11 GPIO10 216 12 GPIO14 22013 GPIO11 217 14 GPIO15 22115 GPIO12 218 16 GPIO16 22217 GPIO13 219 18 GPIO17 22319 GND 20 GND21 GPIO20 224 22 GPIO24 22823 GPIO21 225 24 GPIO25 22925 GPIO22 226 26 GPIO26 23027 GPIO23 227 28 GPIO27 23129 GND 30 GND31 GPIO30 232 32 GPIO34 23633 GPIO31 233 34 GPIO35 23735 GPIO32 234 36 GPIO36 23837 GPIO33 235 38 GPIO37 23939 GND 40 GND
$ echo 208 > /sys/class/gpio/unexport
QSM-8Q60 Linux EVK v3.0.2 Quick Start Guide
17
3�8�1 SettingUpGPIModeTosetapinto“input”mode(GPI),usethefollowingcommand(hereistheexampleforGPIOpin1):
ToreadtheGPIinputvalue,usethefollowingcommand:
3�8�2 SettingUpGPOModeTosetapinto“output”mode(GPO),usethefollowingcommand(hereistheexampleforGPIOpin1):
Tooutputa“Low”valueontheGPOpin,usethefollowingcommand:
Tooutputa“High”valueontheGPOpin,usethefollowingcommand:
$ echo in > /sys/class/gpio/gpio208/direction
$ cat /sys/class/gpio/gpio208/value
$ echo out > /sys/class/gpio/gpio208/direction
$ echo 0 > /sys/class/gpio/gpio208/value
$ echo 1 > /sys/class/gpio/gpio209/value
QSM-8Q60 Linux EVK v3.0.2 Quick Start Guide
18
3�9 ConfiguringRTCTheRTC(Real-TimeClock)keepstrackofthecurrenttimevalues.Thetimevaluesincludetheyear,month,date,hours,minutesandseconds.ToconfiguretheRTContheQSM-8Q60,setthesystemtimewiththeLinuxdatecommandshownbelow:
Time value table
Forexample,thevalue061110072013meansJune11201310:07.Thedatecommandalsoacceptsothertimeformats.Formoreinformation,usethefollowingcommand:
TowritethesystemtimetotheRTC,usethefollowingcommand:
ToreadtheRTCtime,usethefollowingcommand:
Time Valuemm 2-digitmonthdd 2-digitdayHH 2-digithoursin24hsystemMM 2-digitminutesYYYY 4-digityear
$ date --help
$ date mmddHHMMYYYY
$ hwclock -w -f /dev/rtc0
$ hwclock -r
QSM-8Q60 Linux EVK v3.0.2 Quick Start Guide
19
4� AccessoriesThissectionexplainshowtoinstallandconfigurethevariousEMIOwirelessmodulesavailablefortheQSM-8Q60andQSMDB2carrierboard.
4�1 ConfiguringtheVNT9271USBWi-FiDongleTheVNT9271USBWi-FidonglesupportsWi-FifunctionalitythroughUSBportconnection.
ThefirststepistoinserttheVNT9271USBWi-FidongleintoaUSBport.Next,makesuretounpluganyLANcablesorotherWi-Fi/3Gmodulesyouhaveinstalled.Finally,powerontheQSM-8Q60andQSMDB2carrierboard�
Inserting the VNT9271 USB Wi-Fi dongle
Whenthebootprocessiscompleted,clickonthe“ConnectionManager”icontoconfigureWLAN.
Connection Manager icon diagram
Whentheconnectioniscreated,connecttotheinternetthroughyourwebbrowser.
QSM-8Q60 Linux EVK v3.0.2 Quick Start Guide
20
4�2 ConfiguringtheEMIO-1541miniPCIeWi-FiModuleTheEMIO-1541modulesupportsWi-FithroughtheonboardminiPCIeslot.
ThefirststepistoinserttheEMIO-1541moduleintotheminiPCIeslot.Afterinstallingthemoduleconnecttheprovidedantennatothemodule.Next,makesuretounpluganyLANcablesorUSBWi-Fidonglesyouhaveinstalled.Finally,powerontheQSM-8Q60andQSMDB2carrierboard.
Inserting the EMIO-1541 module
Whenthebootprocessiscompleted,clickonthe“ConnectionManager”icontoconfigureWLAN.
Connection Manager icon diagram
Whentheconnectioniscreated,connecttotheinternetthroughyourwebbrowser.
Carrier Board (QSMDB2)30
QSM-8Q60 Linux EVK v3.0.2 Quick Start Guide
21
4�3 ConfiguringtheEMIO-2531miniPCIeWi-Fi& BluetoothModuleTheEMIO-2531modulesupportsWi-FiandBluetoothfunctionalitythroughtheonboardminiPCIeslot.
4�3�1 ConnectingtotheInternetThefirststepistoinserttheEMIO-2531moduleintotheminiPCIeslot.AfterinstallingtheEMIO-2531moduleconnecttheprovidedantennatothemodule.Next,makesuretounpluganyLANcablesorotherWi-Fi/3Gmodulesyouhaveinstalled.Finally,powerontheQSM-8Q60andQSMDB2carrierboard.
Inserting the EMIO-2531 module
Whenthebootprocessiscompleted,clickonthe“ConnectionManager”icontoconfigureWLAN.
Connection Manager icon diagram
Whentheconnectioniscreated,connecttotheinternetthroughyourwebbrowser.
Carrier Board (QSMDB2)
30
QSM-8Q60 Linux EVK v3.0.2 Quick Start Guide
22
4�3�2 EnablingBluetoothThefollowingsectionexplainssettinguptheAdvancedAudioDistributionProfile(A2DP)andSerialPortProfile(SPP).
4�3�2�1 SettingUpBluetoothA2DPProfileThefirststepistoextracttoBT_Config.zip file.Next,copythepulseaudio-system.conf, bluetooth.conf and system.pa filesto/etc/dbus-1/system.d/foldertoreplacetheoriginalpulseaudio-system.conf, Bluetooth.conf and system.pafilesinordertoaddtheA2DPsupportintothesystem.
ToenabletheBluetoothservice,usethefollowingcommand:
Usethefollowingcommandstorunthe“bluetoothctl”toshowtheEMIO-2531BluetoothMACaddressandsetuppairingmode.
ToenableBluetoothdevice,usethefollowingcommands:
$ rfkill unblock bluetooth$ hciconfig hci0 up$ /usr/lib/bluez5/bluetooth/bluetoothd -C -d &$ hciconfig hci0 piscan
$ bluetoothctl[NEW] Controller 5C:F3:70:24:4B:2E(EMIO-2531 Bluetooth MAC address)[bluetooth]#[bluetooth]# showController 5C:F3:70:24:4B:2E Name: BlueZ 5.25 Alias: BlueZ 5.25 …..[bluetooth]# select 5C:F3:70:24:4B:2E (select controller_mac_address)[bluetooth]# power onChanging power on succeeded[bluetooth]# agent onAgent registered[bluetooth]# default-agentDefault agent request successful[bluetooth]# discoverable onChanging discoverable on succeeded[CHG] Controller 5C:F3:70:24:4B:2E Discoverable: yes[bluetooth]# pairable onChanging pairable on succeeded[bluetooth]# scan onDiscovery started[CHG] Controller 5C:F3:70:24:4B:2E Discovering: yes[NEW] Device 00:1D:82:BC:C1:C4 Jabra BT-530…[bluetooth]# scan off[bluetooth]# devicesDevice 00:1D:82:BC:C1:C4 Jabra BT-530Device …[bluetooth]# pair 00:1D:82:BC:C1:C4 (pair device_mac_address)[bluetooth]# trust 00:1D:82:BC:C1:C4 (trust device_mac_address)
[bluetooth]# connect 00:1D:82:BC:C1:C4 (connect device_mac_address)[bluetooth]# info 00:1D:82:BC:C1:C4 (info device_mac_address)[bluetooth]# quit
QSM-8Q60 Linux EVK v3.0.2 Quick Start Guide
23
ThedefaultaudiooutputsettingfortheQSM-8Q60isHDMIdevice.
Tolistalltheavailableaudiooutputdevices,usethefollowingcommand:
Fromtheoutput,wecanseethefollowing:
• 0=HDMIdevice
• 1=Line-out
• 2=Bluetoothdevice
TosetuptheaudiooutputtoaBluetoothdevice,usethefollowingcommand:
*Note:IfyouwouldliketochangeaudiooutputafterenablingaBluetoothdevice,usethecommandsbelow:
TosetuptheaudiooutputtoLine-out,usethefollowingcommand:
TosetuptheaudiooutputtoHDMIdevice,usethefollowingcommand:
4�3�2�2 SettingUpBluetoothSPPProfileTheAMOS-820supportsSPPservermodeandSPPclientmode.
ToenabletheBluetoothservice,usethefollowingcommand:
Usethefollowingcommandstorunthe“bluetoothctl”toshowtheBluetoothMACaddressandsetuppairingmodefortheEMIO-2531module.
$ pactl list short sinks0 alsa_output.platform-sound-hdmi.23.analog-stereo module-alsa-card.c s16le 2ch 48000Hz
SUSPENDED1 alsa_output.platform-sound.22.analog-stereo module-alsa-card.c s16le 2ch 48000Hz
SUSPENDED2 bluez_sink.00_1D_82_BC_C1_C4 module-bluez5-device.c s16le 2ch 48000Hz IDLE
$ pacmd set-default-sink 2
$ pacmd set-default-sink 1
$ pacmd set-default-sink 0
$ rfkill unblock bluetooth$ hciconfig hci0 up$ /usr/lib/bluez5/bluetooth/bluetoothd -C -d &$ hciconfig hci0 piscan
$ bluetoothctl[NEW] Controller 5C:F3:70:24:4B:2E[bluetooth]# scan onDiscovery started[CHG] Controller 5C:F3:70:24:4B:2E Discovering: yes[NEW] Device 5C:F3:70:25:DD:33 BlueZ 5.25…[bluetooth]# scan off[bluetooth]# devicesDevice 5C:F3:70:25:DD:33 BlueZ 5.25Device …[bluetooth]# pair 5C:F3:70:25:DD:33(pair device_mac_address)[bluetooth]# trust 5C:F3:70:25:DD:33(pair device_mac_address)[bluetooth]# quit
QSM-8Q60 Linux EVK v3.0.2 Quick Start Guide
24
SPP server mode:Ifyoudonotchangethelistenchannelnumber,theservicewillautomaticallyusethedefaultchannelnumber.Makesuretheserverandclientmodeareusingthesamebluetoothchannelnumber
TosetuptheSPPservermodeandallowotherdevicestoconnect,usethefollowingcommands:
SPP client mode:Ifyoudonotchangethelistenchannelnumber,theservicewillautomaticallyusethedefaultchannelnumber.Makesuretheserverorclientmodeisusingthesamelistenchannelnumber.
UsethefollowingcommandstosetuptheSPPclientmodeandrequestaconnectiontoSPPserver.
Toopentheminicomserialcommunicationprogram,usethefollowingcommand:
Connecttothe/dev/rfcomm0serialdevicewiththefollowingsettings:
Serial port setting
StartaserialcommunicationprogramonthehostmachinewiththesamecommunicationsettingsusingtheappropriateBluetoothSPPdevice.AfterwardstheBluetoothSPPdeviceandtheQSM-8Q60willbeabletocommunicatethroughtheprograms(forexamplesendingakeypressononemachineshouldbeshownontheothermachine).
$ sdptool add SPSerial Port service registered$ rfcomm listen hci0Waiting for connection on channel 1Connection from 5C:F3:70:25:DD:33 to /dev/rfcomm0Press CTRL-C for hangup
$ sdptool add SPSerial Port service registered$ rfcomm connect hci0 5C:F3:70:24:4B:2EConnected /dev/rfcomm0 to 5C:F3:70:24:4B:2E on channel 1Press CTRL-C for hangup
$ minicom –s
+--------------------------------------------------------------+| A - Serial Device : /dev/rfcomm0 || B - Lockfile Location : /var/lock || C - Callin Program : || D - Callout Program : || E - Bps/Par/Bits : 115200 8N1 || F - Hardware Flow Control : No || G - Software Flow Control : No |+--------------------------------------------------------------+
QSM-8Q60 Linux EVK v3.0.2 Quick Start Guide
25
4�4 ConfiguringtheEMIO-2550miniPCIeMobileBroadband ModuleTheEMIO-2550miniPCIeMobileBroadbandmodulesupports3GandGPSfunctions.
4�4�1 ConnectingtotheInternetThefirststepistoinsertanactiveSIMcardintotheEMIO-2550module,andtheninserttheEMIO-2550moduleintotheminiPCIeslot.Afterinstallingthemoduleconnecttheprovidedantennatothemodule.Next,makesuretounpluganyLANcablesorUSBWi-Fidonglesyouhaveinstalled.Finally,powerontheQSM-8Q60andQSMDB2carrierboard.
Inserting the EMIO-2550 module
TocheckthattheboardhascorrectlydetectedtheEMIO-2550module,usethefollowingcommand:
Makesuretheprintoutmessageincludes“Bus001Device004:ID1545:1102U-BloxAG”
Configurethe3GfunctionbycreatingaPPPconnectionwithrootprivilege.
OncethePPPconnectionhasbeencreated,openthebrowsertoensureconnectiontotheInternet.
$ lsusb
$ pppd call Module-ZU200
Carrier Board (QSMDB2)
30
QSM-8Q60 Linux EVK v3.0.2 Quick Start Guide
26
4�4�2 EnablingGPSToconfiguretheGPSfunctionsofthemodulerequirestheuseoftheMinicomserialcommunicationprogram.OpentheMinicomserialcommunicationprogramwiththefollowingcommand:
Connecttothe/dev/ttyUSB1serialdevicewiththefollowingsettings:
Serial port setting of QSM-8Q60 and QSMDB2 carrier board
Whenthesettingiscompleted,typethefollowingGPSATcommandsintoMinicom:AT+UGPRF=1,AT+UGRMC=1,AT+UGGSV=1,AT+UGZDA=1,andAT+UGPS=1,0
Waitforthe“OK”messagebeforesendingthenextATcommand.
UsetheMinicomtosettheserialdevice/dev/ttyUSB7inanotherterminalanditwilloutputthedatareceivedfromtheGPSmoduleasillustratedinthescreenshotbelow.
GPS NMEA message
$ minicom -s
+--------------------------------------------------------------+| A - Serial Device : /dev/ttyUSB1 || B - Lockfile Location : /var/lock || C - Callin Program : || D - Callout Program : || E - Bps/Par/Bits : 115200 8N1 || F - Hardware Flow Control : No || G - Software Flow Control : No |+--------------------------------------------------------------+
AT+UGPRF=1OKAT+UGRMC=1OKAT+UGGSV=1OKAT+UGZDA=1OKAT+UGPS=1,0OK
$GPRMC,142015,00,A,2501.93961,N,12133.66111,E,0.068,,030314,,,A*73$GPGSV,4,1,13,01,34,184,29,03,49,023,47,06,26,042,41,07,44,317,26*75$GPGSV,4,2,13,08,13,323,,11,60,192,,13,29,242,38,16,33,071,16*79$GPGSV,4,3,13,19,65,356,44,23,18,208,12,27,35,034,27,30,37,145,29*7B$GPGSV,4,4,13,32,01,154,*4B$GPZDA,142015.00,03,03,2014,00,00*62………
1F, 531 Zhong-zheng Road,Xindian Dist., New Taipei City 231Taiwan
Tel: 886-2-2218-5452Fax: 886-2-2218-9860Email: [email protected]
940 Mission CourtFremont, CA 94539,USA
Tel: 1-510-687-4688Fax: 1-510-687-4654Email: [email protected]
Email: [email protected]
Taiwan Headquarters USA
Europe
Tsinghua Science Park Bldg. 7No. 1 Zongguancun East Road,Haidian Dist., Beijing, 100084China
Tel: 86-10-59852288Fax: 86-10-59852299Email: [email protected]
3-15-7 Ebisu MT Bldg. 6F,Higashi, Shibuya-kuTokyo 150-0011Japan
Tel: 81-3-5466-1637Fax: 81-3-5466-1638Email: [email protected]
ChinaJapan