quick start guide amos-820 - …cdn.viaembedded.com/products/docs/amos-820/linux... · 1 amos-820...
TRANSCRIPT
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/13/2018 Initial release
AMOS-820 Linux EVK v4.1.3 Quick Start Guide
Revision History
iii
AMOS-820 Linux EVK v4.1.3 Quick Start Guide
Table of Contents1. Introduction ����������������������������������������������������������������������������������������������������������������������� 1
1�1 EVK Package Content ���������������������������������������������������������������������������������������������������������������������������� 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. HardwareFunctions ���������������������������������������������������������������������������������������������������������� 53.1 SettingUpU-BootParameters ������������������������������������������������������������������������������������������������������������� 53.2 RestoringDefaultU-BootParameters �������������������������������������������������������������������������������������������������� 73.3 UsingtheOpenEmbeddedConsole ������������������������������������������������������������������������������������������������������ 73.4 SettingUptheVideo-in ������������������������������������������������������������������������������������������������������������������������ 8
3.4.1 SettingUptheCVBS ����������������������������������������������������������������������������������������������������������������������� 83.4.1.1 CVBSVideo-inRecording 9
3.5 ConfiguringFlexCAN ��������������������������������������������������������������������������������������������������������������������������� 103.6 ConfiguringWatchdogTimer ������������������������������������������������������������������������������������������������������������� 113.7 SettingUpGPIO ���������������������������������������������������������������������������������������������������������������������������������� 12
3.7.1 SettingUpDIOPortforGPIOFunctionality ��������������������������������������������������������������������������������� 123.7.2 SettingUpGPIMode�������������������������������������������������������������������������������������������������������������������� 133.7.3 SettingUpGPOMode ������������������������������������������������������������������������������������������������������������������ 13
3.8 ConfiguringRTC ���������������������������������������������������������������������������������������������������������������������������������� 14
4. Accessories ���������������������������������������������������������������������������������������������������������������������� 154.1 ConfiguringtheVNT9271USBWi-FiDongle �������������������������������������������������������������������������������������� 154.2 ConfiguringtheEMIO-1541miniPCIeWi-FiModule �������������������������������������������������������������������������� 164.3 ConfiguringtheEMIO-2531miniPCIeUSBWi-Fi&BluetoothModule ���������������������������������������������� 17
4.3.1 ConnectingtotheInternet ���������������������������������������������������������������������������������������������������������� 174.3.2 EnablingBluetooth ���������������������������������������������������������������������������������������������������������������������� 18
4.3.2.1 SettingUpBluetoothA2DPProfile 184.3.2.2 SettingUpBluetoothSPPProfile 19
4.4 ConfiguringtheEMIO-2550miniPCIeMobileBroadbandModule ���������������������������������������������������� 214.4.1 ConnectingtotheInternet ���������������������������������������������������������������������������������������������������������� 214.4.2 EnablingGPS �������������������������������������������������������������������������������������������������������������������������������� 22
iv
AMOS-820 Linux EVK v4.1.3 Quick Start Guide
1
1� IntroductionTheQuickStartGuideprovidesanoverviewofhowtoboottheAndroidEVKsystemimageontheAMOS-820system(Bareboard:VAB-820withNXPi.MX6QuadCortex-A9processor)andconfigurethesupportedhardwarefunctionsinthebuild.
TheAMOS-820LinuxEVKv4.1.3isdevelopedbasedontheNXPfsl-yocto-L4.1.15_1.1.0-ga(Yocto2.0Jethro)andenablesthehardwarefeaturesoftheAMOS-820system.
1�1 EVK Package ContentTherearetwofoldersinthepackagelistedasbelow.
AMOS-820LinuxBSPcontent
1�1�1 Firmware Folder ContentsVAB-820_Yocto2.0_BIN_v4.1.3.tar.gz:containsinstallationscriptfilesandtheprecompiledU-bootandimageforevaluatingtheAMOS-820system.
1�1�2 Document Folder ContentsAMOS-820_Linux_EVK_v4.1.3_Quick_Start_Guide _v1.00_20180313.pdf:TheQuickStartGuideprovidesanoverviewofhowtoboottheLinuxEVKsystemimageontheAMOS-820system(Bareboard:VAB-820withNXPi.MX6QuadCortex-A9processor)andconfigurethesupportedhardwarefunctionsinthebuild.
1�1�3 Tools Folder Contents BT_Config.zip:containstheBluetoothA2DPconfiguringfile.
Firmware folder DescriptionVAB-820_Yocto2.0_BIN_v4.1.3.tar.gz YoctoEVKsystemimageandinstallation
scriptfilesDocument folder DescriptionAMOS-820_Linux_EVK_v4.1.3_Quick_Start_Guide_v1.00_20180313.pdf
QuickStartGuide
Tools folder DescriptionBT_Config.zip BluetoothA2DPconfiguringfile
AMOS-820 Linux EVK v4.1.3 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)
• SupportsHDMIdisplay
• SupportsHDMIaudiooutput
• SupportsCVBS
• SupportsCOM1DTEmode,COM2asdebugport
• Supports2FlexCANTX/RX
• SupportsGigabitEthernet
• SupportsLine-in,Line-out,andMic-in
• SupportsVNT9271USBWi-Fidongle
• SupportsEMIO-1541miniPCIeWi-Fimodule
• SupportsEMIO-2531miniPCIeWi-Fi&Bluetoothmodule
oSupportsBluetoothA2DPandSPPprofile
• SupportsEMIO-2550miniPCIeMobileBroadbandmodule
• SupportsWatchdogTimer,GPIOandRTC
AMOS-820 Linux EVK v4.1.3 Quick Start Guide
3
2� ImageInstallationThissectionexplainsthesetuprequirementsforbootingfromaMicroSDcardortheSPIROMandeMMC.
Theinstallationscriptfiles,theprecompiledU-boot,andtheimageareprovidedinthe“Firmware”folder.
2�1 BootingfromaMicroSDCardThefirststepistoinstallthisimageontoaMicroSDcard.InsertaMicroSDcardintoyourLinuxhostmachineandmakesureitisnotmounted.InstalltheSDcardimageontotheMicroSDcardwiththecommandsbelow,replacing<devicename>withthecorrectvalueforthecard.
*Important:Makesureyouarewritingtothecorrectdeviceorthehostsystemenvironmentcouldbedamaged�
Next,ontheAMOS-820,setthebootswitchtotheMicroSDpositionasshownbelow.
Micro SD / SPI boot switch diagram
InsertthepreparedMicroSDcardintotheAMOS-820,connectanHDMIdisplay,andpowerontheAMOS-820toinitiatethebootprocess.
Whenthebootprocessiscompleted,youwillseetheOpenEmbeddeddesktop.
$ tar xvf VAB820_Yocto2.0_BIN_v4.1.3.tar.gz$ cd sd_installer/$ sudo ./mk_sd_installer.sh /dev/<device name> --yocto
AMOS-820 Linux EVK v4.1.3 Quick Start Guide
4
2�2 BootingfromtheSPIROMwitheMMCTheAMOS-820supportsbootingfromtheSPIROMwhileloadingthekernelandrootfilesystemfromtheeMMC.
ThefirststepistoprepareaMicroSDcardasthesysteminstaller.InsertaMicroSDcardintoyourLinuxhostmachineandmakesureitisnotmounted.InstallthesysteminstallerontotheMicroSDcardwiththecommandbelow,replacing<devicename>withthecorrectvalueforthecard.
Next,ontheAMOS-820,setthebootswitchtotheMicroSDpositionasshownbelow.
Micro SD / SPI boot switch diagram
InsertthepreparedMicroSDcardintotheAMOS-820systemthenpoweron.ThesystemwillautomaticallystarttoinstalltheU-bootandimageintotheSPIROMandeMMC.
Whentheinstallprocessiscompleted,unplugthepowercableandremovetheMicroSDcard.
Next,inordertobootfromtheSPIROM,makesurethebootswitchissettoSPIROMboot.
Micro SD / SPI boot switch diagram
Next,connectanHDMIdisplay,andpoweronthedevicetoinitiatethebootprocess.Whenthebootprocessiscompleted,youwillseetheOpenEmbeddeddesktop.
$ tar xvf VAB820_Yocto2.0_BIN_v4.1.3.tar.gz$ cd sd_installer/$ sudo ./mk_sd_installer.sh /dev/<device name>
AMOS-820 Linux EVK v4.1.3 Quick Start Guide
5
3� HardwareFunctionsThissectionexplainshowtoenableandtestthehardwarefunctionsprecompiledintheAMOS-820LinuxEVKincludingsettingtheU-Bootparameters,settinguptheVideo-in,configuringFlexCAN,configuringWatchdogTimer,settingupGPIO,andconfiguringRTC.
3�1 SettingUpU-BootParametersWhensettinguptheU-Bootparameters,thefirststepistoconnectthehostmachineandtheAMOS-820throughtheCOM2port.UseaserialportcommunicationprogramsuchasPuTTY,GtkTerm,orMinicomtoconfiguretheserialportsettingandconnecttothedebugconsole.ThereyouwillbeabletoseetheU-BootbootlogandadjustsettingsintheU-Bootconsole..
Serial port setting of host machine
COM 2 port diagram
AMOS-820 Linux EVK v4.1.3 Quick Start Guide
6
Next,powerontheAMOS-820toinitiatethebootprocess.Whenprompted,pressanykeytostopthebootprocessandentertheU-Bootconsoleasillustratedbythescreenbelow.
Debug console view of boot process
TolistthecurrentU-Bootparameters,usethefollowingcommand:
Tohavemoreinformationmakesuretheprintoutmessageincludes“bootcmd=runbootcmd_auto”.
Thedefault“bootcmd”parameterissettoautodetectthesystemlocationbyfirstattemptingtoloadthekernelfromtheMicroSDcard.IfitisnotdetecteditcontinuestobootfromtheeMMC.
Toloadthekernelfromthespecifieddevice,refertothetwoexamplesbelow.
ToloadthekernelfromtheMicroSDcard,usethefollowingcommand:
ToloadthekernelfromtheeMMC,usethefollowingcommand:
U-Boot 2015.04-imx_v2015.04_4.1.15_1.0.0_ga+gd7d7c43 (Feb 20 2017 – 14:19:23)
CPU: Freescale i.MX6Q rev1.5 at 996 MHzCPU: Temperature 30 CReset cause: PORBoard: MX6Q-VAB820I2C: readyDRAM: 1 GiBMMC: FSL_SDHC: 0, FSL_SDHC: 1SF: Detected W25Q32BV with page size 256 Bytes, erase size
4 KiB, total 4 MiB
No panel detected: default to Hannstar-XGADisplay: Hannstar-XGA (1024x768)In: serialOut: serialErr: serialNet: FEC [PRIME]Warning: failed to set MAC address
Normal BootHit any key to stop autoboot: 0=>
=> printenv
=> setenv bootcmd ‘run bootcmd_sd’=> saveenv=> boot
=> setenv bootcmd ‘run bootcmd_mmc’=> saveenv=> boot
AMOS-820 Linux EVK v4.1.3 Quick Start Guide
7
3�2 RestoringDefaultU-BootParametersIftheU-Bootparametershavebeenmodified,the“destroyenv”commandintheU-Bootconsolecanrestorethefactorydefaultssettings.
Torestartthedevice,usethe“reset”command:
3�3 UsingtheOpenEmbeddedConsoleThefirststepistoconnectthehostmachineandtheAMOS-820throughtheCOM2port.UseaserialportcommunicationprogramsuchasPuTTY,GtkTerm,orMinicomtoconnecttothedebugconsole.ThereyouwillbeabletoseetheU-BootbootlogandadjustsettingsintheU-Bootconsole.Next,powerontheAMOS-820toinitiatethebootprocess.Whenthebootprocessiscompletedyouwillbepromptedtologin.
COM 2 port diagram
Thedefaultaccountis“root”,withnopasswordset(justpressEnterwhenpromptedforthepassword).
=> destroyenv=> reset
...Freescale i.MX Release Distro 4.1.15_1.1.1 imx6qvab820 /dev/ttymxc1imx6qvab820 login: root
AMOS-820 Linux EVK v4.1.3 Quick Start Guide
8
3�4 SettingUptheVideo-inTheAMOS-820supportsCVBSsignalinputforCompositeRCAjack.ThefollowingstepsareforVideo-infunctionverification.
Composite RCA jack diagram
3�4�1 SettingUptheCVBSToenablethevideo-in,usethefollowingcommand:
Ifthesourceofthevideo-inisPAL,usethefollowingcommandtodisplaythevideoonthescreen:
Todisplayothervideo-insourcesonthescreen,usethefollowingcommand:
# gst-launch-0.10 imxv4l2src input=1 deinterlace=true! imxv4l2sink
# gst-launch-0.10 imxv4l2src input=1 deinterlace=true ! imxv4l2sink crop-top-by-pixel=1
# gst-launch-0.10 imxv4l2src input=1 deinterlace=true ! imxv4l2sink
AMOS-820 Linux EVK v4.1.3 Quick Start Guide
9
3�4�1�1 CVBSVideo-inRecordingIfyourapplicationrequirestheabilitytorecordthevideo-infeedsontothedevicestorage,thefollowingcommandscanbeusedwhenwritingyoursoftwareapplication.
Record Feed as MP4:
Tosavethevideo-infeedasanMP4file,usethefollowingcommand:
Forexample,tosavethevideo-invideoasa10-secondMP4fileinto/homefolderwithafilenamedemo_1.mp4,usethefollowingcommand:
Toplaythesavedvideofile,usethefollowingcommand:
Ifyouneedtodisplaythevideo-insourceonthescreenandrecordthefeedatthesametime,usethefollowing command:
# gst-launch-0.10 imxv4l2src input=1 num-buffers=<value> ! vpuenc codec=6 ! ffmux_mov ! filesink location=/<path/filename.mp4>
# gst-launch-0.10 imxv4l2src input=1 num-buffers=300 ! vpuenc codec=6 ! ffmux_mov ! filesink location=/home/demo_1.mp4
# gst-launch-0.10 playbin2 uri=file:/ <path/filename.mp4>
# gst-launch-0.10 imxv4l2src input=1 num-buffers=900 queue-size=30 ! tee name=t ! queue ! imxv4l2sink t. ! queue ! vpuenc codec=6 bitrate=3000000 ! matroskamux ! filesink location=/<path/filename.mp4>
AMOS-820 Linux EVK v4.1.3 Quick Start Guide
10
3�5 ConfiguringFlexCANTheCAN/COM2portoftheAMOS-820supportsonedebugport(COM2)andtwoCANbusports.TheCANbussupportsCANprotocolspecificationVersion2.0BwhiletheCOM2supportsTX/RXfordebuggingpurposesonly.ThefirststepistoconnecttheCOM/CANconversioncable.
Installing COM/CAN conversion cable diagram
PleasenotethatyouneedtodisabletheCANbusfirst,settheCANbusbitrate.TheCANbusbitrateshouldbe5000<[BRT_value]<1000000.
CANbus1iscan0andCANbus2iscan1.
TosettheCANbus1bitrate[BRT_value],usethefollowingcommand:
ToenabletheCANbus1,usethefollowingcommand:
TodisabletheCANbus1,usethefollowingcommand:
UsethecansendcommandtosendCANbus1data:
<ID>:DeviceIDofCANbus
<Data>:Sendoutdata
UsethecandumpcommandtoreceivedatafromCANbus1:
# ifconfig can0 down
# ifconfig can0 up
# ip link set can0 type can bitrate [BRT_value]
# candump can0 &
# cansend can0 <ID>#<Data>
AMOS-820 Linux EVK v4.1.3 Quick Start Guide
11
3�6 ConfiguringWatchdogTimerWatchdogTimerisanelectronictimerthatisusedtodetectandrecoverfromsystemmalfunctions.
Thewdt_driver_test.outprovidesanapplicationtoconfiguretheWatchdogtimer.
ToenableWatchdogTimerwiththedefaulttimeout(60seconds),usethefollowingcommand:
Tochangethetimeout<value>andthesystemreboot<value>(seconds),usethefollowingcommand:
Tosendkeep-aliverequeststoWatchdogTimer<value>(seconds),usethefollowingcommand:
Whenthevalueof“set_keep_alive”issmallerthanthevalueof“set_timeout”,thesystemwillnotreboot.
TodisableWatchdogTimer,usethefollowingcommand:
$ /unit_tests/wdt_driver_test.out enable wdt
$ /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 wdt
AMOS-820 Linux EVK v4.1.3 Quick Start Guide
12
3�7 SettingUpGPIOTheAMOS-820hasaDIOportwhichconsistsof9pins.Thefollowingsectionexplainshowtosetupthesepinsforinput/outputcommunication
DIO port diagram
3�7�1 SettingUpDIOPortforGPIOFunctionalityTheechovalueofGPIOpinsislistedbelow:
GPIO port pinouts table
SetthemultifunctionpinasaGPIOpin.HereistheexampleforGPIOpin1:
$ echo 7 > /sys/class/gpio/export
Pin Signal GPIO echo value1 GPIO_7 72 GPIO_1 13 GPIO_8 84 GPIO_2 25 GPIO_9 96 GPIO_4 47 GPIO_16 2038 GPIO_5 59 GND
AMOS-820 Linux EVK v4.1.3 Quick Start Guide
13
3�7�2 SettingUpGPIModeTosetapinto“input”mode(GPI),usethefollowingcommand(hereistheexampleforGPIOpin1):
ToreadtheGPIinputvalue,usethefollowingcommand:
3�7�3 SettingUpGPOModeTosetapinto“output”mode(GPO),usethefollowingcommand(hereistheexampleforGPIOpin1):
Tooutputa“Low”valueontheGPOpin,usethefollowingcommand:
Tooutputa“High”valueontheGPOpin,usethefollowingcommand:
$ echo “in” > /sys/class/gpio/gpio7/direction
$ cat /sys/class/gpio/gpio203/value
$ echo “out” > /sys/class/gpio/gpio7/direction
$ echo 0 > /sys/class/gpio/gpio7/value
$ echo 1 > /sys/class/gpio/gpio7/value
AMOS-820 Linux EVK v4.1.3 Quick Start Guide
14
3�8 ConfiguringRTCTheRTC(Real-TimeClock)keepstrackofthecurrenttimevalues.Thetimevaluesincludetheyear,month,date,hours,minutesandseconds.ToconfiguretheRTContheAMOS-820,setthesystemtimewiththeLinuxdatecommandasintheexampleshownbelow.
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
AMOS-820 Linux EVK v4.1.3 Quick Start Guide
15
4� AccessoriesThissectionexplainshowtoinstallandconfigurethevariousEMIOmodulesavailablefortheAMOS-820system�
4�1 ConfiguringtheVNT9271USBWi-FiDongleTheVNT9271USBWi-FidonglesupportsWi-FifunctionalitythroughaUSBportconnection.
ThefirststepistoinserttheVNT9271USBWi-FidongleintoaUSBport.Next,makesuretounpluganyLANcablesorotherWi-Fi/3Gmodulesyouhaveinstalled.Finally,powerontheAMOS-820.
Inserting the VNT9271 USB Wi-Fi dongle
Whenthebootprocessiscompleted,clickonthe“ConnectionManager”icontoconfigureWLAN.
Connection Manager icon diagram
Whentheconnectioniscreated,connecttotheinternetthroughyourwebbrowser.
AMOS-820 Linux EVK v4.1.3 Quick Start Guide
16
4�2 ConfiguringtheEMIO-1541miniPCIeWi-FiModuleTheEMIO-1541modulesupportsWi-FithroughtheonboardminiPCIeslot.
ThefirststepistoinserttheEMIO-1541moduleintotheminiPCIeslot.Afterinstallingthemodule,connecttheprovidedantennatothemodule.Next,makesuretounpluganyLANcablesorUSBWi-Fidonglesyouhaveinstalled.Finally,powerontheAMOS-820.
Inserting the EMIO-1541 module
Whenthebootprocessiscompleted,clickonthe“ConnectionManager”icontoconfigureWLAN.
Connection Manager icon diagram
Whentheconnectioniscreated,connecttotheinternetthroughyourwebbrowser.
AMOS-820 Linux EVK v4.1.3 Quick Start Guide
17
4�3 ConfiguringtheEMIO-2531miniPCIeUSBWi-Fi& BluetoothModuleTheEMIO-2531modulesupportsWi-FiandBluetoothfunctionalitythroughminiPCIeconnections.
4�3�1 ConnectingtotheInternetThefirststepistoinserttheEMIO-2531moduleintotheminiPCIeslot.Afterinstallingeithermodule,connecttheprovidedantennatothemodule.Next,makesuretounpluganyLANcablesorUSBWi-Fidonglesyouhaveinstalled.Finally,powerontheAMOS-820.
Inserting the EMIO-2531 module
Whenthebootprocessiscompleted,clickonthe“ConnectionManager”icontoconfigureWLAN.
Connection Manager icon diagram
Whentheconnectioniscreated,connecttotheinternetthroughyourwebbrowser.
AMOS-820 Linux EVK v4.1.3 Quick Start Guide
18
4�3�2 EnablingBluetoothThefollowingsectionexplainssettinguptheAdvancedAudioDistributionProfile(A2DP)andSerialPortProfile(SPP).
4�3�2�1 SettingUpBluetoothA2DPProfileToaddA2DPsupporttotheAMOS-820,firstcopyandreplacethepulseaudio-system.conf,bluetooth.conftothe/etc/dbus-1/system.dfolder.Next,copyandreplacethesystem.pafilestothe/etc/pulse/folder.ThesefilesarelocatedintheEVK/BT_ConfigfolderoftheBSP.
ToenabletheBluetoothservice,usethefollowingcommand:
Usethefollowingcommandstorunthe“bluetoothctl”toshowtheEMIO-2531BluetoothMACaddressandsetuppairingmode.
ToenableBluetoothdevice,usethefollowingcommands:
$ rfkill unblock bluetooth$ hciconfig hci0 up$ hciconfig hci0 piscan$ /usr/lib/bluez5/bluetooth/bluetoothd -C -d &
$ bluetoothctl[NEW] Controller 5C:F3:70:24:4B:2E[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[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[bluetooth]# trust 00:1D:82:BC:C1:C4
[bluetooth]# connect 00:1D:82:BC:C1:C4[bluetooth]# info 00:1D:82:BC:C1:C4[bluetooth]# quit
AMOS-820 Linux EVK v4.1.3 Quick Start Guide
19
ThedefaultaudiooutputsettingfortheAMOS-820isHDMIdevice.
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$ hciconfig hci0 piscan$ /usr/lib/bluez5/bluetooth/bluetoothd -C -d &
$ 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[bluetooth]# trust 5C:F3:70:25:DD:33[bluetooth]# quit
AMOS-820 Linux EVK v4.1.3 Quick Start Guide
20
SPP server mode:Ifyoudonotchangethelistenchannelnumber,theservicewillautomaticallyusethedefaultchannelnumber.MakesuretheserverorclientmodeisusingthesameBluetoothchannelnumber.
TosetuptheSPPservermodeandallowotherdevicestoconnect,usethefollowingcommands:
SPP client mode:Ifyoudonotchangethelistenchannelnumber,theservicewillautomaticallyusethedefaultchannelnumber.Makesuretheserverorclientmodeisusingthesamelistenchannelnumber.
UsethefollowingcommandstosetuptheSPPclientmodeandrequestaconnectiontoSPPserver.
Toopentheminicomserialcommunicationprogram,usethefollowingcommand:
Connecttothe/dev/rfcomm0serialdevicewiththefollowingsettings:
Serial port setting
StartaserialcommunicationprogramonthehostmachinewiththesamecommunicationsettingsusingtheappropriateBluetoothSPPdevice.AfterwardstheBluetoothSPPdeviceandtheAMOS-820willbeabletocommunicatethroughtheprograms(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/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 |+--------------------------------------------------------------+
AMOS-820 Linux EVK v4.1.3 Quick Start Guide
21
4�4 ConfiguringtheEMIO-2550miniPCIeMobileBroadband ModuleTheEMIO-2550miniPCIeMobileBroadbandmodulesupports3GandGPSfunctions.
4�4�1 ConnectingtotheInternetThefirststepistoinsertanactiveSIMcardintotheEMIO-2550module,andtheninserttheEMIO-2550moduleintotheminiPCIeslot.Afterinstallingthemodule,connecttheprovidedantennatothemodule.Next,makesuretounpluganyLANcablesorUSBWi-Fidonglesyouhaveinstalled.Finally,powerontheAMOS-820.
Inserting the EMIO-2550 module
TocheckthatthesystemhascorrectlydetectedtheEMIO-2550module,usethefollowingcommand:
dfg
Makesuretheprintoutmessageincludes“Bus001Device004:ID1545:1102U-BloxAG”.
Configurethe3GfunctionbycreatingaPPPconnectionwithrootprivilege.
OncethePPPconnectionhasbeencreated,connecttotheinternetthroughyourwebbrowser.
$ lsusb
$ pppd call Module-ZU200
AMOS-820 Linux EVK v4.1.3 Quick Start Guide
22
4�4�2 EnablingGPSConfiguringtheGPSfunctionofthemodulerequirestheuseoftheMinicomserialcommunicationprogram.OpentheMinicomserialcommunicationprogramwiththefollowingcommand:
Connecttothe/dev/ttyUSB1serialdevicewiththefollowingsettings:
Serial port setting of EMIO-2550
Whenthesetupiscomplete,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