Banana Pi BPI-R1 User manual

1.1
1.2
1.2.1
1.2.2
1.2.3
1.2.4
1.2.5
1.2.6
1.2.7
1.2.8
1.2.9
1.2.10
1.2.11
1.2.12
1.2.13
1.2.14
1.2.15
1.2.16
1.2.17
1.2.18
1.2.19
1.2.20
1.2.21
1.2.22
1.3
1.3.1
1.3.2
1.3.3
1.3.3.1
1.3.3.1.1
1.3.3.2
1.3.4
1.3.4.1
1.3.4.2
1.3.4.3
1.3.5
1.3.6
1.3.7
1.3.8
TableofContents
AboutbananapiBPI-R1
BPI-R1hardware
BPI-R1hardwareinterface
BPI-R1hardwarespec
BPI-R1GPIOPindefine
BPI-R1SDcardslot
BPI-R1CANBus
BPI-R1WIFIinterface
BPI-R1wifiantennaslot
BPI-R1MIC
BPI-R1Audio
BPI-R1IRinterface
BPI-R1USBinterface
BPI-R1OTGinterface
BPI-R1SATAinterface
BPI-R1HDMIinterfact
BPI-R1Camerainterface
BPI-R1RGBDSIinterface
BPI-R15GbEEthernetports
BPI-R13.7Vlithiumbatteryinterface
BPI-R1DCPowerinterface
BPI-R1schematicdiagram
BPI-R13DandDXFfile
BPI-R1CE,FCCRoHSCertification
BPI-R1Software
BPI-R1quickstart
BPI-R1androidsoftware
BPI-R1Linuxsoftware
Linuxkernel3.4BSPimage
CompulsivemodificationofHDMIoutputresolution
Linuxmainlinekernelimage
BPI-R1OpenWRT
OfficealOpenWRT
LamoboOpenwrtimage
HowtobuildOpenWRTimagefromgithub
AsteriskonBPI-R1
BPI-R1OpenBSD
ArmbianLinux
BananianLinux
1

1.3.9
1.3.9.1
1.3.9.2
1.4
1.4.1
1.4.2
1.4.3
1.4.4
1.4.5
1.4.6
1.5
1.6
BPI-R1WiringPi
WiringPipython
Pi4JProject
Referencedocuments
linux-sunxiwiki
ManualforHWsetupandbasicrouterfunctionalities
NetBSD\/evbarmonAllwinnerTechnologySoCs
DavidBentham\/openwrt-bpi-r1-prebuilt
Linuxmainliningeffort
Allwinnerchipdocuments
Allbananapiproduct
BPI4.0customizedServer
2

AboutBananapiBPI-R1
ThebananapiBPI-R1isa300MbpsWirelessNRouterwithbothwiredandwirelessnetworkconnectionsdesigned
specificallyforsmarthomenetworkinguse.With2T2RMIMOTechnologyandtwodetachableantennas.
theBPI-R1isthedualcoreAndroid4.4productwhichmorebetterthanLinuxproduct.ItcanrunwithAndroid4.4smoothly
andwith5Gigabitethernetport,SATASocket.alsosupportLinuxOS,andOpenwrtos.
itcaneasilyrunwiththegameandsupport1080Phighdefinitionvideooutput.
BananaPiRouter:NAS,routerortrash?//Review
https://www.youtube.com/watch?v=tvzXhbcgo2k
BananaPiR1SmartOpensourceWirelessRouter
https://www.youtube.com/watch?v=bDkn_UM8DwQ
forum:http://www.banana-pi.org
forum:http://www.bananapi.com
product:http://www.banana-pi.com
AboutbananapiBPI-R1
3

FirstChapter
GitBookallowsyoutoorganizeyourbookintochapters,eachchapterisstoredinaseparatefilelikethisone.
BPI-R1hardware
4

BPI-R1hardwareinterface
BPI-R1hardwareinterface
Front:
Back:
BPI-R1hardwareinterface
5

Hardwareconnectsketchmap:
Front:
Back:
BPI-R1hardwareinterface
6

BPI-R1hardwareinterface
7

BPI-R1hardwarespec
BPI-R1hardwarespec
8

BPI-R1GPIOPindefine
GPIOdefine
WecancheckR1PINdefinitioninthisthread,includingCON1,CON2,CON3,J12andJ13.
J13containsthedefaultserialportUART0(UART0-RX,UART0-TX).UATR0isconfiguredtobeusedforconsole
input/output.Whilstthisisusefulifyouwanttologinusingtheserialport.SoitisthemostcommonusedPIN.
J12alsocontainsserialport.CON3containsCANbus,SPIbus,PWM,serialportandetc.Itcanbeconfiguredtobeused
forkindsofperipherals.
CON1isaCSIcameraconnector.
CON2isaDSIdisplayconnector.
PicturesandtablesbelowshowthespecificlayoutanddefinitionofPIN.
BPI-R1GPIOPindefine
9

CSICameraConnectorPinspecification:
theCSICameraConnectorisa40-pinFPCconnectorwhichcanconnectexternalcameramodulewithpropersignalpin
mappings.ThepindefinitionsoftheCSIinterfaceareshownasbelow.
PIN PINdefine GPIO
CON1-P01 LINEINL
CON1-P02 LINEINR
CON1-P37 HPL
CON1-P36 HPR
CON1-P07 FMINL
CON1-P09 FMINR
CON1-P04 ADC_X1
CON1-P06 ADC_X2
CON1-P08 ADC_Y1
CON1-P10 ADC_Y2
CON1-P13 LRADC0
CON1-P15 LRADC1
CON1-P33 RESET#
CON1-P17 CSI0-D0 PE4
BPI-R1GPIOPindefine
10

CON1-P19 CSI0-D1 PE5
CON1-P21 CSI0-D2 PE6
CON1-P23 CSI0-D3 PE7
CON1-P25 CSI0-D4 PE8
CON1-P27 CSI0-D5 PE9
CON1-P29 CSI0-D6 PE10
CON1-P31 CSI0-D7 PE11
CON1-P20 CSI0-PCLK PE0
CON1-P24 CSI0-MCLK PE1
CON1-P28 CSI0-VSYNC PE3
CON1-P30 CSI0-HSYNC PE2
CON1-P18 CSI0-STBY-EN PH19
CON1-P26 CSI0-RESET# PH14
CON1-P32 CSI1-STBY-EN PH18
CON1-P34 CSI1-RESET# PH13
CON1-P14 TWI1-SDA PB19
CON1-P16 TWI1-SCK PB18
CON1-P12 CSI0-FLASH PH17
CON1-P22 CSI0-PWR-EN PH16
CON1-P35 CSI-IO0 PH11
CON1-P38 IPSOUT
CON1-P40 IPSOUT
CON1-P05 GND
CON1-P11 GND
CON1-P39 GND
CON1-P03 VCC-CSI
LVDSPinspecification
LVDS(LCDdisplayinterface)
TheLVDSConnectorisa40-pinFPCconnectorwhichcanconnectexternalLCDpanel(LVDS)andtouchscreen(I2C)
moduleaswell.Thepindefinitionsofthisconnectorareshownasbelow.
CON2-P09 LCD0-D00 PD0
CON2-P11 LCD0-D01 PD1
CON2-P13 LCD0-D02 PD2
CON2-P15 LCD0-D03 PD3
CON2-P17 LCD0-D04 PD4
CON2-P19 LCD0-D05 PD5
CON2-P21 LCD0-D06 PD6
BPI-R1GPIOPindefine
11

CON2-P23 LCD0-D07 PD7
CON2-P25 LCD0-D08 PD8
CON2-P27 LCD0-D09 PD9
CON2-P29 LCD0-D10 PD10
CON2-P31 LCD0-D11 PD11
CON2-P33 LCD0-D12 PD12
CON2-P35 LCD0-D13 PD13
CON2-P37 LCD0-D14 PD14
CON2-P39 LCD0-D15 PD15
CON2-P40 LCD0-D16 PD16
CON2-P38 LCD0-D17 PD17
CON2-P36 LCD0-D18 PD18
CON2-P34 LCD0-D19 PD19
CON2-P32 LCD0-D20 PD20
CON2-P30 LCD0-D21 PD21
CON2-P28 LCD0-D22 PD22
CON2-P26 LCD0-D23 PD23
CON2-P22 LCD0-CLK PD24
CON2-P20 LCD0-CS PH6
CON2-P18 LCD0-HSYNC PD26
CON2-P16 LCD0-VSYNC PD27
CON2-P14 LCD0-DE PD25
CON2-P12 LCD0-IO2 PH9
CON2-P10 PWM0 PB2
CON2-P08 LCD0-IO1 PH8
CON2-P06 LCD0-IO0 PH7
CON2-P04 TWI3-SCK PI0
CON2-P02 TWI3-SDA PI1
CON2-P01 IPSOUT
CON2-P03 IPSOUT
CON2-P05 GND
CON2-P24 GND
CON2-P07 VCC-3V3
BPI-R1hasa26-pinGPIOheaderthatmatchesthatoftheModelRaspberryPi.FollowingistheBananaPiGPIOPinout:
BPI-R1GPIOPindefine
12

CON3-P18 CAN_RX PH21
CON3-P16 CAN_TX PH20
CON3-P23 SPI0_CLK PI11
CON3-P21 SPI0_MISO PI13
CON3-P19 SPI0_MOSI PI12
CON3-P24 SPI0_CS0 PI10
CON3-P26 SPI0_CS1 PI14
CON3-P05 TWI2-SCK PB20
CON3-P03 TWI2-SDA PB21
CON3-P15 UART2_CTS PI17
CON3-P22 UART2_RTS PI16
CON3-P11 UART2_RX PI19
CON3-P13 UART2_TX PI18
CON3-P10 UART3_RX PH1
CON3-P08 UART3_TX PH0
CON3-P12 PH2 PH2
CON3-P07 PWM1 PI3
CON3-P01 VCC-3V3
CON3-P17 VCC-3V3
CON3-P02 VCC-5V
CON3-P04 VCC-5V
CON3-P09 GND
CON3-P25 GND
CON3-P06 GND
CON3-P14 GND
CON3-P20 GND
BPI-R1UARTdefine
J12-P03 PH5 PH5
J12-P05 PH3 PH3
J12-P04 UART7_RX PI21
J12-P06 UART7_TX PI20
J12-P01 VCC-5V
J12-P02 VCC-3V3
J12-P07 GND
J12-P08 GND
BPI-R1GPIOPindefine
13

J13-P01 UART0-RX PB23
J13-P02 UART0-TX PB22
BPI-R1GPIOPindefine
14

BPI-R1SDcardslot
BPI-R1havesupportaTFcardslot.youcanburnimagetoTFcard,anduseitbootBPI-R1sameasraspberrypi.
BPI-R1SDcardslot
15

BPI-R1CANBus
Inordertoportcan4linuxtotheBananaPi,theCANmoduledescriptionisneededfromtheA20hardwaremanual.
can4linuxisacharacter-driver-basedLinuxdriverusedalreadyondesktopPCsandembeddedplatformslikeFreescale
FlexCAN(thei.MXseriesofmicrocontrollers)orXilinyZynq.
ThereisamoredetaileddocumentaboutCANontheA20athttps://dl.linux-sunxi.org/A20/CAN%20Bus1.pdf
ThisisatutorialforusingCANBUSonbananapiwithbananian15-01
Thankselqcirsharethisexample:
Downloadandinstall"bananian-1501.img"into8GBSDCard.
Expandtherootfilesystemusing"bananian-config"
Installmissingpackage:
apt-getinstallgit
apt-getupdate
apt-getupgrade
reboot
Getlastbananianavailable,andcontinutoinstallmissingpackage:
gitclonehttps://github.com/Bananian/linux-bananapi
apt-getinstallbuild-essentialu-boot-toolsuboot-mkimage
apt-getinstalllibusb-1.0-0libusb-1.0-0-devgitwgetfakerootkernel-packagezlib1g-devlibncurses5-dev
apt-getinstallsubversion
Buildkernel:
cdlinux-bananapi
makemenuconfig
Exitwithoutsavingwhenmenuappears
zcat/proc/config.gz>/root/linux-bananapi/.config
makeuImagemodules
makeINSTALL_MOD_PATH=outputmodules_install
Atthisstep,kernelshouldbecompiledand"Module.symvers"shouldbeavailable
ThenrenamemodulesandfirmwareprovidebyBananian,andreplacebythenewone.
mv/lib/modules/lib/modules.old
mv/lib/firmware/lib/firmware.old
mv/root/linux-bananapi/output/lib/modules/lib/modules
mv/root/linux-bananapi/output/lib/firmware/lib/firmware
SameforuImage:
mount/dev/mmcblk0p1/mnt
cd/mnt
mvuImageuImage.old
mv/root/linux-bananapi/arch/arm/boot/uImage/mnt
reboot
Createlinkforfurtherbuild:
BPI-R1CANBus
16

cd/lib/modules/3.4.104/
ln-s/root/linux-bananapibuild
cd~
GetCan4Linuxandbuildit:
svncheckouthttps://svn.code.sf.net/p/can4linux/code/trunkcan4linux-code
cd/root/can4linux-code/can4linux/
makeTARGET=BANANAPI
Installmoduleforeachstartupoftheboard:
insmodcan4linux.ko
cpcan4linux.ko/lib/modules/3.4.104/kernel/net/can/
depmod-A-v
modprobe-vcan4linux
echo"">>/etc/modules;echo"can4linux">>/etc/modules
reboot
BuildCANexample
apt-getinstallswig
apt-getinstallpython-dev
cdcan4linux-code/can4linux-examples/
UpdateCANspeedanddeviceinfile"pyCan-example.py"
ex:
#settingthedevicenumber
device=0
defaultBaudrate='250'
ConnectCANtransceiverandCANbus,andcheckwithforexample:
pythonpyCan-example.py
That'sall
Withthismethod,kernelversionis"Linuxbananapi3.4.104"insteadof"Linuxbananapi3.4.104+",becauseiwasunableto
findsamesourcesthanBananian15-01,butCANbuswork!
Feelfreetocommentorupdate.
BPI-R1CANBus
17

BPI-R1WIFIinterface
bananapiBPI-R1havesupportrtl8192CU2T2Rwifimoduleonboard.itsupport802.11/b/g/nwifi.
BPI-R1WIFIinterface
18

BPI-R1wifiantennaslot
bananapiBPI-R1havesupportrtl8192CU2T2Rwifimoduleonboard
so,itneed2extendantennaline,youcanuse3DB/5DBextendantennaline.
wifiextendantennawifislotspec:
BPI-R1wifiantennaslot
19

BPI-R1MIC
thankchaos.dennisdothistest:
iwriteaboutthis,becauseifoundveryfewsourcesandhadtotumblealotaroundtogetitworking.Thisisaquickwalk
throughtogiveyouahintwheretostart.Iasumeforsimplicitythatyoustayalwaysin/rootdirectoryasrootuser.If
somethingfails,lookifthefilesarewrittenandpathsareright.Itisadressedformoreadvanceduserswhoknowwhatthey
arebasicallydoing.
Thisisdonewithbananian15.08onKernel3.4.Otherkernels<4.4donotwork.ItisaheadlessserverwithnoHDMI
plugedin.
A.BasicSetup
Installalsa(renovepulseaudioifpresent):
#apt-getinstallalsa-basealsa-utils
Configureasound.conf
#nano/etc/asound.conf
Shouldlooklike:
pcm.!default{
typehw
card0#forheadphone,turn1to0
device0
}
ctl.!default{
typehw
card0#forheadphone,turn1to0
}
Shutdown,makeacoldboot
Callthealsamixer
#alsamixer
PressF5.Yourchannelsshouldbesetupliketheattachedfileatthebottomofthispost,orcompareittoamixer
output:
#amixer
Simplemixercontrol'Master',0
Capabilities:pvolumepvolume-joined
Playbackchannels:Mono
Limits:Playback0-63
Mono:Playback45[71%]
Simplemixercontrol'MasterCaptureMute',0
Capabilities:pswitchpswitch-joined
Playbackchannels:Mono
Mono:Playback[off]
Simplemixercontrol'LineL',0
Capabilities:pswitchpswitch-joined
Playbackchannels:Mono
Mono:Playback[on]
Simplemixercontrol'LineR',0
Capabilities:pswitchpswitch-joined
Playbackchannels:Mono
Mono:Playback[on]
Simplemixercontrol'LineinPre-AMP',0
Capabilities:volumevolume-joined
Playbackchannels:Mono
Capturechannels:Mono
Limits:0-7
BPI-R1MIC
20
Other manuals for BPI-R1
1
Table of contents
Other Banana Pi Wireless Router manuals