You are on page 1of 82

5/18/2016

NextThingCoDocumentation

Introduction
WelcometoNextThingCodocumentation.

Welcome to The CHIP Operating System


Wemadeacomputer.A$9computer.Andeverycomputerneedsanoperatingsystem.
OursisTheCHIPOperatingSystem.GrabanoldTV(oranyscreenwithacompositevideoinput),akeyboardandmouse,andsticksome
electricityinthemicroUSBport.Inafewseconds,youllhaveCHIPsoperatingsystemonyourscreen,readytodocomputerthings.

CHIPisbuiltformaking-wevepackedapowerfulprocessor,4GBofstorage,stereoaudio,videoout,andlotsofconnectionsforplayingand
makingyourprojectsandproducts.
TheCHIPOperatingSystemisbuiltfordoing:browsethenet,sendemail,playvideogames,listentomusic,writeanovel,watchavideo,or
learnprogramming.AndbecauseitsbasedonthepopularLinuxDebian,iftheressomethingyouneed,youcanprobablyinstallit.
Sohowdousethisthing?Letsgetstarted.

http://docs.getchip.com/#forwindows78amp10

1/82

5/18/2016

NextThingCoDocumentation

Start CHIP. Boot CHIP.


Firstthingsfirst.LetsbootCHIPintotheCHIPOperatingSystemanddosomecomputerthings!Addsomepower,turnonthewireless
network,andevenconnectabluetoothkeyboardtogetridofthoseannoyingcables.

Power Up
Thesinglemostimportantthingtousinganyelectronicdeviceisgettingelectricitytotherightplaces.WeregoingtocoverhowtoturnCHIP
on.Thismightseemsostraightforwardthatitdoesntdeserveseveralparagraphs,butCHIPisprettyclever,sotheresactuallyafewthings
worthknowing.
WHATS IT NEED?

Ingeneral,CHIPispoweredbya5-voltsourcelikeaUSBportorphonecharger,anddrawsabout500mApeak(atboottime),runsonaround
100mA,andrestswitharound80mAwiththeprocessortotallyunloaded.Tomakesureyouhaveenoughheadroom,werecommendthatyou
usea5vpowersupplywithatleast900mAcurrentavailable.Thismaybemorethanyouneedtoknowifyoujustwanttoplugitintothewall,
but,asyoubuildprojectswithCHIP,youllbehappytoknowtheresalotofwaystogettheelectricityflowing.
HOW DO I KNOW CHIP IS ON?

CHIPissilent.Itdoesnttakemuchenergy,soitsnotveryhot.Ithasnodiscerniblesmell.Asaresult,manyofyoursensesarenotgreat
indicatorsthatitisworking.TherearetwoLEDsnexttotheUSBmicroconnector.WhenCHIPison,youshouldseethe PWR LEDlightupnice
andbright.
POWER FROM THE WALL

TheCHIPsmicroUSBconnectorisusedtoprovidepowerfrommostanyUSBpowersource.USBwall-wartadaptersareprobablylitteredall
overyourhouse.Ifforsomereasonyoudonthaveone,youcanbuyoneatanyelectronicsretailer.Werecommenda5Vpowersupplywithat
least900mAcurrentavailable.JustplugaUSB-A-to-microUSB-Bcable(thatsthesamecablemostphones,tablets,andwhatnotuseto
charge)intothewall-wartandCHIP,andyoullseethe PWR LEDlightup.ThisCHIPisusingthepowerfromacomputersUSBport:

POWER FROM A BATTERY

CHIPcanalsobebatterypowered.Specifically,anysinglecell(1S)3.7VLithiumPolymer(LiPo)batterywitha2-pinJST-PH2.0mmendcanbe
connectedtotheJST-PHsocket.

http://docs.getchip.com/#forwindows78amp10

2/82

5/18/2016

NextThingCoDocumentation

TheJSTcanonlyplugitinoneway:ifyouarehavingahardtimeliningthingsup,turnitaround!Needlesstosay,donotforcethebattery
connectorintothesocketifsomethingdoesntfeelright!
Whatsreallygreatisthatifyouplugintoachargerandpluginabattery,thebatterywillcharge-allthepowermanagementisonCHIP
itself.Roughly,ittakesaboutfourtosixhourstochargea3000mAhLiPobatteryfroma5V1Apowersource.Also,ourdelightfullittlePower
ManagementIC,theAXP209,handlespass-throughpower,sowhileonandchargingabattery,CHIPisbasicallyrunningonaun-interruped
powersupplyIfchargepowerfails,CHIPseamlesslyswitchesontobatterypowerwithoutshuttingoff.

Connect To WiFi
ConnectingtoaWiFinetworkiseasyusingtheWiFiiconthetoprightsystemtray.Justselectanetworktoinitiateaconnection.Ifthenetwork
requiresapasswordyoullbepromptedforit.

Ifyouneedmorecontrolandinformationoveryournetworkconnection,usetheSettings->NetworkConnectionspaneltoshowyour
connections.Doubleclickonaconnectiontobringuptheconnectioneditor:
http://docs.getchip.com/#forwindows78amp10

3/82

5/18/2016

NextThingCoDocumentation

Connect Bluetooth
BluetoothdevicesetupcanbeaccessedusingtheBluetoothiconinthetoprightsystemtray.

Whenyoubeginaconnection,youllbeguidedthroughthenecessarystepstoconnecttoyourdevice.Forexample,whenyoupairwitha
keyboard,youlloftenbepromptedforacodetoentertoensureauniqueconnection.Onceyouhavepairedadevice,futureconnectionswill
usuallybeautomaticwhenthedevicesareinrangeandpoweredup.

http://docs.getchip.com/#forwindows78amp10

4/82

5/18/2016

NextThingCoDocumentation

Youcanmanage,andalsoconnectto,yourdevicesusingthetheBluetoothDevicespanel,accessedfromtheBluetoothsystemtray:

Using The Terminal


OneofthegreatpowersofLinuxistheso-calledcommand-line.Thissimpletextinterfaceforcomputingunveilsmanyofthegearsand
leversthatmakeacomputertick.Manyfinditeasiertogetthingsdone,asitisafocusedandtersewaytointeractwiththecomputer.
WhenyoufirstusetheTerminalEmulatorprogram,youmayquicklyfindthatyoudonothavepermissiontodosomething.Thatisbecause
manycommandsaresafelyreservedforrootaccess,andyouareautomaticallyloggedinasthechipuser.Dontfear:youcanoftenuse
the sudo commandandusethedefaultpassword chip toexecutetheserestrictedcommands.
Finally,itisprobablywisetochangethedefaultpasswordonyourCHIP.Youcandowithwith shellpasswd or shellsudopasswdroot and
http://docs.getchip.com/#forwindows78amp10

5/82

5/18/2016

NextThingCoDocumentation

youllbeaskedforanewpassword.Dontforgetit!!
Ifyouaresuchafanofthecommandline,youmaywanttobootwithoutthedesktopandwindowsystem.Instructionsforthatarehere

Terminal for Beginners Glossary


OneofthegreatthingsaboutLinuxistheterminalapplication.Whileitmaylookunfriendlyandterse,ifyouwanttoreallyextendthe
capabilitiesofCHIP,youlloftenfindyourselfintheterminal.Ifyoureabeginner,heresaquickreferenceofsomereallyimportantand
commoncommands.Youcansimplyadd h togetsomehintsonhowtouseacommand,suchas cph oryoucanreadamanualpage
using mancp .Mostunixcommandshaveavarietyofoptionsthatcanbeexecutedinthecommandwithflags,suchas lsla .Evenbetter,
searchtheinternet!Thisprimerissimplyheretohelpyouunderstandwhatacommandmightbedoing,nottohelpyouuseittoitsfull
ability.
cdchangedirectory.openafolder.ex: cd~/Pictures changesyourcurrentdirectorytothehomePicturesfolder,soyoucaneasily
accessthefileswithin.
mkdirmakedirectory.createafolder.ex: mkdirVacation makesafoldernamedVacationinthecurrentdirectory. mkdir
~/Pictures/Vacation makesa Vacation folderinthehomePicturesdirectory.
lslistfilesinthecurrentdirectorysoyouknowwhatisinit.Someoptionsare lsl tolistinlongformattoprovideinformationabout
permissions,size,anddate. lsa toshowhiddenfilesthatstartwiththe . character.
mvmoveafilefromonedirectorytoanother,ortogiveitanewname.Ex: mvthis.onethat.one renamesafile. mvthis.one
~/Pictures/Vacation/ putsthefilethis.oneintothe Vacation directory.
cpcopyafilefromoneplacetoanother.Ex: cpthis.onethis_01.one willcopy this.one toanotherfile this_01.one .Adddirectoriesfor
morefun: cp~/Pictures/Vacation/saturn.jpg/Users/otherone/Pictures/Vacation/saturn.jpg .
rmremoveafile.deleteit,andbeware!.Usethe r tomakeitrecursivetodeleteadirectory.Ex: rmthis.one deletesthatfile. rmr
~/Pictures/Vacation toforgetthegoodtimes.
sudosuperuserdo.manycommandsneedadministrator-likeprivileges,otherwisetheywontwork. aptget isacommandthatneeds
toberunwith sudo toallowfilestobewrittentoprotecteddirectories.Youllsee sudo asthefirstwordinalotofcommands-allitis
doingisgivingthecommandthenecessaryaccess.Youllbeaskedforapasswordthefirsttimeyouuse sudo .Thedefaultpassword
anduserischip.
apt-getthecommandusedforinstalling,removing,andfindingsoftwareforDebianLinuxsystems,suchastheCHIPOperating
System. sudoaptgetinstallpuredata installsthePureDataprogramandanydependencies. sudoaptgetremovepuredata willremove
theprogram. sudoaptcachesearchimage willsearchaptrepositoriesforthekeywordsearch.Andsoon.
pwdpresentworkingdirectory.Incaseyouforgetwhereyouare.Notmuchtoit: pwd willoutputthedirectoryname,suchas
/Users/home/chip/Pictures/Vacation/

grepatoolusedforsearchingthroughfiles.Itsquitedeepandcanbecomplicated,butifyouseetheword grep insomecommand,


youknowitssearchingforamatch.
|(pipe)acommandusedtoredirectdataintoanapplication.
<(redirect)acommandusetoredirectdataintoafile.
catconcactenate.usedtoappenddatatoafile.Ex: cat"Lastlineoftext">sometext.txt .Mergefiles: catappend.txt>main.txt willput
allthetextinappend.txtintomain.txt.
lessmakesitsoyoucanpaginateandreadatexttile.Ex: lesslongtext.txt willfillthescreenwiththefirstpartofthelongtext.txtfile.
Usethespacebartoviewthenextpage.Type q toexit.
nanoatexteditor.Youlloftenseecommandsthatcall nano soyoucaneditaconfiguration.Ex: nano/etc/avahi/services/afpd.service to
edittheavahiApplefileservicefile.
findlookforfilesinthefilesystem.Ex: find~/Documentsnameparticular.txttypef willlookforthefilewiththename particular.txt in
theDocumentsdirectory.
chmodchangemode.Usedforfilepermissions,whichcanbeimportantwhensharingthingsonthenetwork,scriptingactions,and
manymorereasons.
htopdisplaytheprocessescurrentlyaliveontheCPU.Ifthingsseemslow,oryouwanttoseehowmuchCPUormemoryaprogramis
using,justtype htop toseeatableofallrunningprocesses,thentype q whenyouwanttoexit.
scpsecurecopy.copyafilefromonecomputertoanotheroveranetwork.Ex: scpPictures/Vacation/motel.jpg
Pictures/Vacation/accident.jpgchip@otherchip.local:~/Pictures copiesacouplejpegstoanothercomputeronthenetwork.
sshsecureshell.accessanothercomputeronthenetworkandusetheterminalcommandstomakechangesandcontrolit.Ex: ssh
chip@chip.local toaccessyourCHIPonalocalnetwork.
CTRLCifyoucantusetheterminalbecauseaprocessistakingtoolong,typeCTRL-Conyourkeyboardtocancelthemostrecent
command.

Connecting Accessories
http://docs.getchip.com/#forwindows78amp10

6/82

5/18/2016

NextThingCoDocumentation

CHIPhasalotofconnectors,someforbuilding,somefordoingnormalcomputerthings.Thissectioncoversthenormalcomputerthings,like
audio,video,andinput.

Recommended Accessories
CHIPisaminimalcomputer.ManyCHIPusersmayneverconnectcommonperipherals,insteadusingCHIPasaheadlesscomputer.Like
desktopcomputersfromBestBuy,youmayfindthatcertainaccessorieswillimprovetheoveralusabilityofCHIP.Werecommend:
BluetoothKeyboard
USBmouse
Monitorwithacompositevideoinput
USBcable:USB-AtomicroUSB-B
TRRStoRCAconnector
Additionally,someoftheadvancedtutorialsrequire:
SpeakerswithRCAaudioinput
Jumperwire
USBtoUARTcable
SinglecellLithiumPolymerbattery

Powered USB Hub


YoullfindthatasimplepoweredUSBhubisprettyessentialifyouwanttousealotofUSBdeviceswithCHIP.NotonlyisthereonlyoneUSB
port(keepingCHIPniceandsmall),butCHIPsmicroUSBpowerportcanonlyprovidesomuchpowerfortheUSBport.Ifyoudonthavea
poweredUSBport,youllquicklymaxoutpowerifyouattachtoomanyaccessories.

Keyboard and Mouse


ManykeyboardshaveUSBhubsbuilt-in,soyoucanattachamousetothekeyboard,attachthekeyboardtoCHIP,andimmediatelyhave
control.However,itslikelythetwowilldrawtoomuchcurrent,soyoullwanttoconnecttoapoweredhubbeforeyouconnect.

http://docs.getchip.com/#forwindows78amp10

7/82

5/18/2016

NextThingCoDocumentation

Bluetooth Keyboard and Mouse


Asyouknow,CHIPhasbuilt-inbluetooth.Ifyouwanttouseakeyboardandmouse,youcankeepyourUSBportfreeforotherthings(like
massstorageoraMIDIcontroller!)andkeepyourdeskclean.Seeconnectingtobluetoothsection

Monitor
Inthespiritofkeepingthingssmall,CHIPpacksalltheaudioandvideointoasmallTRRS(Tip-Ring-Ring-Sleeve)connector.Built-invideo
outputisrestrictedtostandardcompositevideoresolutionof640x480.(HigherresolutionscanbeachievedwiththeupcomingVGAandDVI
outputaccessories.)

Hereswhattheotherendofthecablelookslike,attachedtoamonitorwithstereoaudioinputs(redandwhite)andthecompositevideo
plug,movedsoyoucanseethelabelonthemonitor:

ABOUT THE TRRS CONNECTOR

CHIPcomeswitha1/8"(3.5mm)Tip-Ring-Ring-Sleeve(TRRS)jack,capableofcarryingstereoaudio,andeithercompositevideoout,or
microphonein.

http://docs.getchip.com/#forwindows78amp10

8/82

5/18/2016

NextThingCoDocumentation

Thisisafairlycommonport,butthereareafewdifferentarrangementsoftheconductors,sonotallcablesareequal.Fortunately,CHIPuses
thesameconductorarrangementasPi,Zune,andiPodaudio/videocables,sothemostcommonminitoRCAA/Vcablesshouldworkjust
fine.
Somecableswillroutesignalsabitdifferently,usingtheRedRCAcableforVideoinsteadofYellow.Ifvideooutisntworkingthroughthe
yellowcable,seeifredworks.Ifnot,yourcablemaybeaversionthatsarrangedinawaythatitjustwontworkwithCHIP:
yellow:video
red:stereoaudiorightchannel
white:stereoaudioleftchannel
TheconductorsontheTRRSplugarearrangedlikethis:

IfyouwanttolearnevenmoreaboutTRRSconnectorsandthegenerallackofstandardizationwiththem,thispagehasevenmoredetails.
NTSC OR PAL

ThecompositevideoformatisNTSCbydefault.IfyouneedtohookuptoamonitorthatonlyusesaPALsignal,youllneedtochangethatat
u-boottime.First,connecttoCHIPwithaUARTcable.ThenpowerupCHIP,andpressakeyonthekeyboardtobootintou-bootmodeto
changetheenvironmentvariablemanually.
printenvvideomode
setenvvideomode(modedata)
saveenv
reset

wheremodedatacanbe,forNTSCandPALrespectively:
setenvvideomodesunxi:640x48024@60,monitor=compositentsc,overscan_x=40,overscan_y=20

setenvvideomodesunxi:720x57624@50,monitor=compositepal,overscan_x=40,overscan_y=20

http://docs.getchip.com/#forwindows78amp10

9/82

5/18/2016

NextThingCoDocumentation

Headphones
TheaudioandvideoconnectoronCHIPcanbededicatedtoaudiooutputsuitableforheadphonesorconnectingtoanamplifierforfillinga
roomorpublicspacewithglorioussound.Justconnectastandard3.5mm(1/8")TRSaudioplugintoCHIPsa/vjack.Ofcourse,if
headphonesarepluggedin,therewillbenoroomforacompositevideooutputjack.Youcanalsogetaudioleft,common,andrightoutput
frompins4,6&8onheaderU14.

Microphone and Audio Input


Ifyouwanttouseaudioinput,youmightfinditeasiesttousethepinsonpins10and12onheaderU14.However,ifyouwanttousethe1/8"
TRRSconnector,youcanmodifytheCHIPboardtoreplacethecompositevideoconnectionwithanaudioinputconnection.
IfyoulookatthebottomofCHIPwiththeaudioandUSBjackspointedup,youllseethreesmallcontactpadstotheleftoftheaudiojack.The
leftpadhasasmalllabelofmicandtherightpadhasatvlabel.Betweenthemiddlepadandthetvpadisatracethatcanbecarefullycut
withanExactoorutilityrazorblade.Oncethatiscut(checkwithavoltorcontinuitymeter),youcanputasolderblobbetweenthemicand
middlepad.Nowtheouterringcanbeusedforaudioinput.

Asanotherreference,ifyouhadX-rayvisionandyouwerelookingfromthetopofCHIP,youdseeatracelikethis:

http://docs.getchip.com/#forwindows78amp10

10/82

5/18/2016

NextThingCoDocumentation

Ifthecompositevideoconnectionisneededagain,justreversetheprocess:desoldertheconnectionbetweenmicandthemiddlepad,then
solderabridgebetweentvandthemiddlepad.

USB Storage
Ifyouhavefilesthatyouwanttomodify,use,ortransfertoCHIPsinternalstorage,youcanattachaUSBthumbdrive,card-reader,orhard
drive.Openthefilemanagerandaccessthefiles.

USB Audio
CHIPcanuseClass-compliantUSBaudiodevices.Apopular,andinexpensivechoiceforaudiodevicesareUSBdonglesbasedontheC-Media
chipset.ThesehavebeentestedsuccessfullywithCHIPandcanoftenbepurchasedforlessthan$10.Somegoodresourcesforlinuxand
audiocompatibilityareonthelinuxaudioandalsaprojectwebsites.
ManyofthedrivershavenotbeentestedwithCHIP-asCHIPmatures,moreinformationwillbeavailable.Fornow,werecommenedUSB
Class-compliantorplug-and-playaudiodevices.

Battery and Charging


http://docs.getchip.com/#forwindows78amp10

11/82

5/18/2016

NextThingCoDocumentation

Likeanymodernlaptop,CHIPcanrunandchargeanysingle-cellLiPobattery.ReadmoreinthepoweringCHIPsection.

Using The CHIP Operating System


Ifyouveusedadesktoporlaptopcomputerbefore,theCHIPOperatingSystemshouldbeprettyfamiliar.Therearemenus,iconstoclick,
menuswithmorestuffwhenyouright-click,keyboardshortcuts,applicationstorun,andsettingstoset.CHIPissmall,sowekeepour
operatingsystemsimple.AlmosteverythingcanbeaccessedfromtheComputerThingsmenu:settings,launchingapps,andaccesstofiles.
Theresalsoafewconvenientfunctionsinthetoprightsystemtray.

Settings and Con guration


MostofthesettingsforthecomputerandforthedesktopcanbesetusingtheappsintheComputerThingsmenu.Selecttheappropriate
appfromeithertheSettingsMenuortheSettingsManager.

http://docs.getchip.com/#forwindows78amp10

12/82

5/18/2016

NextThingCoDocumentation

WIFI

ConnectingtoaWiFinetworkiseasyusingtheWiFiiconthetoprightsystemtray.Justselectanetworktoinitiateaconnection.Ifyouneeda
password,youllbepromptedforit.

Ifyouneedmorecontrolandinformationoveryournetworkconnection,usetheSettings->NetworkConnectionspaneltoshowyour
connections.Doubleclickonaconnectiontobringuptheconnectioneditor:

http://docs.getchip.com/#forwindows78amp10

13/82

5/18/2016

NextThingCoDocumentation

BLUETOOTH

BluetoothdevicesetupcanbeaccessedusingtheBluetoothiconinthetoprightsystemtray.

Whenyoubeginaconnection,youllbeguidedthroughthenecessarystepstoconnecttoyourdevice.Forexample,whenyoupairwitha
keyboard,youlloftenbepromptedforacodetoentertoensureauniqueconnection.Onceyouhavepairedadevice,futureconnectionswill
usuallybeautomaticwhenthedevicesareinrangeandpoweredup.

http://docs.getchip.com/#forwindows78amp10

14/82

5/18/2016

NextThingCoDocumentation

Youcanmanage,andalsoconnectto,yourdevicesusingthetheBluetoothDevicespanel,accessedfromtheBluetoothsystemtray:

SOUND

Bydefaultsoundoutputcomesfromthebuilt-inconnector,servedbythesunxicodecdriver.Ifyouwanttochangethevolume,youcan
usethevolumecontrolinthetoprightsystemtray:

http://docs.getchip.com/#forwindows78amp10

15/82

5/18/2016

NextThingCoDocumentation

Or,opentheAudioMixerintheMultimediacategory:

Here,youcanselectthePlaybackcategorytochangethevolume:

http://docs.getchip.com/#forwindows78amp10

16/82

5/18/2016

NextThingCoDocumentation

Ifyoudontseethatcontrol,justclickontheSelectControlsbuttonandenableallcontrols:

DISPLAY

UsetheSettings->Displaycontrolpaneltoadjustthemonitorsresolutionandrotationsettings:
Ifyouwanttocustomizethedesktopimage,icons,colors,andfonts,therearetwodifferentpanels.TheAppearancepanelletsyouselecta
themetomakeinstantchangesforseveralproperties.

http://docs.getchip.com/#forwindows78amp10

17/82

5/18/2016

NextThingCoDocumentation

TheDesktoppanelletsyoucustomizeimagesandcolors,alongwiththebehaviorofmenus.

Ifyouwanttochangethethemeortheiconsets,youcansearchfortheseusingtheSynapticPackageManager.Searchfor gtk2themes or
iconsets .Therearealsopackagesthatcanmakeiteasytofindandconfigurethemes,suchas gtkthemeconfig. Similarlyyoucanusethe
commandlinetosearchpackageswith aptcachesearchgtk2theme .
TIME AND DATE

SettheTimewiththeOrageGlobaltimepanel.ThiscanbefoundinAccessories->OrageGlobaltimeorinOffice->OrageGlobaltime.Simply
clickthetimetobringupthepreferencespanel.YoucanquicklyviewthedatefromtheOrageCalendarintheOfficemenu.

http://docs.getchip.com/#forwindows78amp10

18/82

5/18/2016

NextThingCoDocumentation

MOUSE SENSITIVITY

Mousesensitivityissetforthedefault640x480resolution.IfyouareusingCHIPwithahigherresolutionmonitor,youmaywanttoadjustthe
sensitivityofthemouse.YoucangettotheMousesettingspanelfromComputerThings->Settings->MouseandTouchpad

LANGUAGE AND LOCATION

CHIPsoperatingsystemcomeswithadefaultlanguageofEnglish.Youcanchangethelanguageandthelocation,butyoullneedtousethe
terminaltodoso.UsetheComputerThings!menutolaunchtheTerminalEmulator.Thenusethe aptget commandtoinstallthelanguage
packsandrunasimpleprogramtoconfigureyourlanguageandlocation:
sudoaptgetupdate&&sudoaptgetinstalllocales&&sudodpkgreconfigurelocales&&sudolocalegen

http://docs.getchip.com/#forwindows78amp10

19/82

5/18/2016

NextThingCoDocumentation

Youcansetthetimezonewith sudodpkgreconfiguretzdata

Launching Installed Apps


CHIPcomesprepackagedwithmanyopen-sourceapplicationstogetyoustarted.Itseasytolaunchanapplication.Youcanselectan
applicationfromtheComputerThings!menuandselectanappfromthecategories:

Or,formorecontrol,launchtheApplicationFinderinAccessories,whereyoucanusethesearchbarandeasilynavigateamongthe
categories:

http://docs.getchip.com/#forwindows78amp10

20/82

5/18/2016

NextThingCoDocumentation

Belowaresomeoftheapplicationsthatcomepre-installedwithCHIP:
ABIWORD

AbiWordisafullyfeaturedwordprocessor.YoucanlearnmoreatTheAbiWordwebsite

ICE WEASEL BROWSER

IceWeaselisaDebianLinuxversionoftheFirefoxbrowser.ThebrowserislargelythesameasFirefox,justwithadifferentname.More
informationisattheDebianwebsiteandinthisstackexchangethread.

http://docs.getchip.com/#forwindows78amp10

21/82

5/18/2016

NextThingCoDocumentation

VIDEO PLAYER

CHIPplaysvideo!Usethebuilt-inMplayertoopenandplayvideos.

TERMINAL (COMMANDLINE)

Thelifebloodoflinux.Iftheressomethingyoucantdoonthedesktop,oryouwanttoautomatetasks,oraccessdifferenthardwaresettings
usingnothingbutakeyboardandtext,youllopenupTerminal.

http://docs.getchip.com/#forwindows78amp10

22/82

5/18/2016

NextThingCoDocumentation

COMPLETE LIST OF INSTALLED SOFTWARE

ThesearetheapplicationsinstalledbydefaultonCHIPasaccessedthroughtheGUI.
ApplicationFinder
BulkRename
Leafpad
OrageGlobaltime
Screenshot
TaskManager
ThunerFileManger
Xarchiver
AlextheAllegator4
Spout
Viewnior
IceWeaselWebBrowser
AudioMixer
GNOMEMPlayer
QjackCtl
AbiWord
AtrilDocumentViewer
Gnumetric
OrangeCalendar
OrageGlobaltime
Htop
PackageUpdater
SynapticPackageManager
XfceTerminal
Notifications
VariousSystemSettings
Zip(andUnZip)

Install and Update Software


SYNAPTIC PACKAGE MANAGER

LaunchtheSynapticPackageManagertofindandinstallnewsoftware.Synapticisagraphicalinterfacetothe aptget commandandwill


installsoftwareintendedforDERPandotherdebain-basedsystems.YoucanlearnmoreaboutSynaptichere
http://docs.getchip.com/#forwindows78amp10

23/82

5/18/2016

NextThingCoDocumentation

Theresasimplesearchbartomakeiteasytofindpackagesyouareinterestedin.Ifyoudontfindthepackageyouarelookingfor,hitthe
ReloadbuttontorefreshSynapticsrecordofavailablepackages.

EXAMPLE: INSTALLING SCRATCH PROGRAMMING ENVIRONMENT

UsingSynapticisveryeasy.Forexample,ifyouwantedtoinstalltheScratchProgrammingEnvironment,youcansimplysearchforscratch
andyoullgetalotofresults.Scrollthrough,andyoulleventuallyfindscratchinthepackageswindow.However,youllprobablywantto
narrowyourresultswithbettersearchterms,suchasscratchprogrammingenvironments

Whensearchiscomplete,youcanselectscratchfromthepackagepanel.

http://docs.getchip.com/#forwindows78amp10

24/82

5/18/2016

NextThingCoDocumentation

PressthetopApplybutton,andyoullgetthefollowingdialog:

andyoullbenotifiedoftheprogress:

http://docs.getchip.com/#forwindows78amp10

25/82

5/18/2016

NextThingCoDocumentation

Afteraminuteorso,youllbenotifiedthatitsfinished:

Nowthatitsinstalled,youcanlaunchscratch:

AUTO UPDATE

CHIPwillautomaticallylookforanyupdatesandalertyouifupdatesareavailableforyourexistingsoftwareandtheoperatingsystem.
APT-GET

Ifyouareusingthecommandline,youwilluse aptget toinstallandupdatenewsoftware.

http://docs.getchip.com/#forwindows78amp10

26/82

5/18/2016

NextThingCoDocumentation

Ifyouarenewtoapt,someimportantcommandstoknow:
sudoaptgetupdate updatestheinformationfromrepositories,soanyinstallsyoumakewith install willbethelatestpackage
sudoaptgetupgrade upgradesanyinstalledpackages.
sudoaptgetinstall(nameofpackage) toinstallapackageandanyofitsdependencies.
sudoaptgetremove(nameofpackage) willremoveapackageandanydependenciesnotusedbyotherpackages
sudoaptgetpurge(nameofpackage) willremoveapackageandanydependenciesnotusedbyotherpackagesalongwithallsettings

data
aptcachesearch(searchterms) willsearchthroughthepackagerepositoriesfornamesanddescriptionsthatincludeyoursearchterm.

Uninstall Software
YoucanusetheSynapticPackagemanagertouninstallanypackagesyounolongerneed.Ifyouknowthename,youcanusetheSearch
functiontofindthepackage,thenMarkitforRemoval.
Forexample,ifyouwanttoremoveAbiWord,firstopenSynapticandsearchforabiword:

Oncefound,selectAbiWordinthepackagelist,andselectMarkforRemovalinthePackagemenu:

http://docs.getchip.com/#forwindows78amp10

27/82

5/18/2016

NextThingCoDocumentation

Ifthereareadditional,relatedpackagesthatneedtoberemoved,youllbenotified:

Finally,pressthetopApplymenutoremovethepackages:

http://docs.getchip.com/#forwindows78amp10

28/82

5/18/2016

NextThingCoDocumentation

Youllbenotifiedwhatchangeswillbeapplied:

Finally,youcanconfirmthatAbiWordhasbeenremovedbycheckingtheApplicationsmenu:

http://docs.getchip.com/#forwindows78amp10

29/82

5/18/2016

NextThingCoDocumentation

Boot into Console


IfyouwantwantCHIPtobootdirectlyintoaconsole,andnotloadtheDesktoporWindowmanagerGUIs,thereareacoupleoptions.Forthe
temporarycase,youcanopenaterminalwindowandusethecommand
sudosystemctlsetdefaultmultiuser.target

NexttimeyoubootCHIP,itwillnotloadthedesktoporwindowenvironment,leavingyouwithcommand-lineoperationonly.Ifyouwantedto
returntobootingintotheGUI,youcanusethiscommandbeforeyoureboot:
sudosystemctlsetdefaultgraphical.target

TheotheroptionistorunalinuxdistributionwithnoGUIinstalled.Youmaywanttodothisifyouwanttousecommandlineonlyandwantto
savesomestoragespace.YoucanfollowinstructionstoflashCHIPwithbuildroot,orDebian(withnoGUI).

CHIP Hardware
CHIPissmall,butitpacksalotofhardwareonthePCB.Heresanoverviewoftheconnectionsandcomponents.

Parts and Pieces

http://docs.getchip.com/#forwindows78amp10

30/82

5/18/2016

NextThingCoDocumentation

Wireless
WIFI

CHIPsupports802.11b/g/nusingthebuilt-inWiFi.
BLUETOOTH

CHIPsupportstheBluetooth4.0LEstandardusingthebuilt-inBluetooth.

Physical Connectors
CHIPisloadedwithessentialconnectorsforUSB,serial,audio,video,andloadsofIOonthepinheaders.Oh,andabuttontoo!
BUTTON

http://docs.getchip.com/#forwindows78amp10

31/82

5/18/2016

NextThingCoDocumentation

ThereisatinytinybuttononCHIPnexttopinheaderU13thatisusedforturningCHIPonoroff.IfCHIPisoffandconnectedtoapower
source,holddownthebuttonforonesecondtopoweritup.ToturnCHIPoff(ratherbrutally),holdthebuttonfor10seconds.We
recommendusingtheoperatingsystemtopowerCHIPoff,butifyouneedto,youcanusethisbutton.
USB

ThesingleUSBportonCHIPisUSB2.0compatible.Itcanprovideupto500mAofcurrent,asisstandardforUSBportsoncomputers.Ifyou
needtoprovidemorecurrent,werecommendapoweredUSBhub.
USB ON THE GO

ThemicroUSBportisgenerallyusedtoprovidepowerforCHIP.However,sinceCHIPcanbepoweredthroughthepinheadersorabattery,
thisportcanbeusedfordifferentthings.Bydefault,connectingCHIPsmicroUSBtoacomputerwillcreateaUSBSerialconnection,soyou
canaccessCHIPwitha screen or cu sessioninaterminal.WithLinuxkernelmodifications,itispossibletoenableothermodes,suchasan
Ethernetbridge.
COMPOSITE VIDEO AND STEREO AUDIO

The1/8"TRRSconnectorprovidescompositevideoandstereoaudiooutput.Headphonescanbepluggedinforaudioonly.
AudioInputusesthesameconnectionontheTRRSconnectorasthecompositevideosignal.Ifyouwanttomakeaudioinputactiveonthe
TRRSconnector,youneedtocutacircuitboardtrace.Thisisnotaspermanentasitsounds,asitiseasytore-enablecompositevideoout
withasmallamountofsoldering.
PIN HEADERS

ThePinHeadersprovideamassiveamountofconnectivity,makingCHIPasuitableplatformforproductdevelopmentforphysicalcomputing
andinternetofthingsdevices.Heresabasicdiagramthatlabelsallthepins:

U13L

U13R

U14L

U14R

GND:ground

CHG-IN:5Vinput(power
andbatterycharge)

GND:ground

VCC-5V:5Vpower

VCC-5V:5V
power

GND:ground

UART1-TX:UARTserial
transmit

HPL:audiooutleft

http://docs.getchip.com/#forwindows78amp10

32/82

5/18/2016

NextThingCoDocumentation

VCC-3V3:3V
power

TS:analogtemperature
sensorinput

UART1-RX:UARTserial
receive

HPCOM:audiooutcommonground

VCC-1V8:1.8V
power

BAT:LiPobattery

FEL:felmode:connectto
groundtoputCHIPinfel
modeforfirmware

HPR:audiooutright

TWI1-SDA:twowireserialbus1

PWRON:poweron

VCC-3V3:3voltpower

MICM:micmute

TWI1-SCK:twowireserialbus1

GND:ground

LRADC:low-resAnalogDigitalConverter

MICIN1:audioin

X1:Resistive
touchpanelinput
(touchscreen)

X2:Resistivetouchpanel
input(touchscreen)

XIO-P0:expanderGPIO

XIO-P1:expanderGPIOpin1

Y1:Resistive
touchpanelinput

Y2:Resistivetouchpanel
input(touchscreen)

XIO-P2:expanderGPIOpin
2

XIO-P3:expanderGPIOpin3

LCD-D2:RGB666
data

PWM0:pulsewidth
modulation(alsousedfor
LCDbacklightdimming)

XIO-P4:expanderGPIOpi

XIO-P5:expanderGPIOpin5

LCD-D4:RGB666
data

LCD-D3:RGB666data

XIO-P6:expanderGPIOpin
6

XIO-P7:expanderGPIOpin7

LCD-D6:RGB666
data

LCD-D5:RGB666data

GND:ground

GND:ground

LCD-D10:
RGB666data

LCD-D7:RGB666data

AP-EINT1:Application
ProcessorInterrupt

AP-EINT3:ApplicationProcessorInterruptpin,
necessaryforcertainkindsofhardware-software
interactions(keyboardexpander,etc.)

LCD-D12:
RGB666data

LCD-D11:RGB666data

TWI2-SDA:two-wireserial
bus2(I2C)

TWI2-SCK(*):two-wireserialbus2(I2C)

LCD-D14:
RGB666data

LCD-D13:RGB666data

CSIPCK:CMOSserial
interface

CSICK:CMOSserialinterface,canbeusedfor
attachingaserialcamerasensor

LCD-D18:
RGB666data

LCD-D15:RGB666data

CSIHSYNC:CMOSserial
interface

CSIVSYNC:CMOSsync

LCD-D20:
RGB666data

LCD-D19:RGB666data

CSID0:CMOSserial
interface

CSID1:CMOSserialinterface

LCD-D22:
RGB666data

LCD-D21:RGB666data

CSID2:CMOSserial
interface

CSID3:CMOSserialinterface

LCD-CLK:
RGB666clock

LCD-D23:RGB666data

CSID4:CMOSserial
interface

CSID5:CMOSserialinterface

LCD-VSYNC:
verticalsyncfor
LCDscreen

LCD-HSYNC:horizontal
syncforLCD

CSID6:CMOSserial
interface

CSID7:CMOSserialinterface

GND:ground

LCD-DE:RGB666data

GND:ground

GND:ground

(*)TheXIOGPIOpinsareprovidedbyanI2CExpanderataddress0x38ontheTWIbus2,assuch,thisaddressisnotavailableonbus2.

Open Source Hardware: Where To Get It


http://docs.getchip.com/#forwindows78amp10

33/82

5/18/2016

NextThingCoDocumentation

CHIPisopensourcehardware.Hereswhereyoucangetallthedatayouneedtomake,modify,orlearnaboutyourownCHIP.VisittheCHIP
Hardwaregitrepository.

Making Stuff
CHIPismorethancool,small,inexpensivecomputer.Itsacompletesystemforbuildingprojectsthatrequireremotecontrol,network
connectivity,andphysicalinterfacingwithpeopleandtheenvironment.CHIPspinheadershavealltheconnectionstomakethishappen.An
annotateddiagramofthepinheaderscanbefoundinthehardwaresectionofthismanual.

GPIO
GPIOprovidesbasicdigitalconnectionstothephysicalworldtocreatephysicalproductswithCHIP.Thesepinscanactasreadsor'writes,
forexample,tosenseswitchpositionsorturnanLEDonoroff.
CHIPsmosteasilyavailableIOpinsaretheXIOpinsonheaderU14.ThisistheGPIOeXpanderthatusesanI2Cbustocreateeight(8)
convenientpinsforGPIO.Theseuseaddress 0x38 ontheTWIbus2.OtherpinsareavailableforGPIOifmorethaneightareneeded.
READ AND WRITE FROM COMMAND LINE

CHIPhasseveralGeneralPurposeInput/Output(GPIO)pinsavailableforyoutobuildaround.Ifyouwanttoaccesstheminaveryprimitive
way,justtoconfirmtheirexistence,heressomethingstotry.
REQUIREMENTS

CHIP
JumperWire
LED

http://docs.getchip.com/#forwindows78amp10

34/82

5/18/2016

NextThingCoDocumentation

SSHorserialconnectiontoCHIPor
Monitorandkeyboard
HOW YOU SEE GPIO

Thereareeight(8)GPIOpinsalwaysavailableforconnectingCHIPtothesense-ableworld.IfyouorientCHIPwiththeUSBconnectorpointed
up,youllfindtheGPIOpinsinthemiddleoftherightheader,U14,Pins13-20,labeledXIO-P0toP7:

HOW THE SYSTEM SEES GPIO

Thereisa sysfs interfaceavailablefortheGPIO.ThisjustmeansyoucanaccesstheGPIOstatesinafile-system-likemanner.Forexample,


youcanreferenceXIO-P0usingthispath:
/sys/class/gpio/gpio408/

Thenumberissomewhatunfortunate,sincethe sysfs namesdonotmatchthelabelsonourdiagram!Butisnottoohardtotranslate.


PinsXIO-P0toP7linearlymaptogpio408togpio415.
SOME GPIO SWITCH ACTION

TheselinesofcodewillletusreadvaluesonpinXIO-P7.First,wetellthesystemwewanttolistentothispin:
sudoshc'echo415>/sys/class/gpio/export'

Viewthemodeofthepin.Itshouldreturnin:
cat/sys/class/gpio/gpio415/direction

ConnectajumperwirebetweenPin20(XIO-P7)andPin39(GND).Nowusethislineofcodetoreadthevalue:
cat/sys/class/gpio/gpio415/value

http://docs.getchip.com/#forwindows78amp10

35/82

5/18/2016

NextThingCoDocumentation

SOME GPIO OUTPUT

Youcouldalsochangethemodeofapinfromintoout
sudoshc'echoout>/sys/class/gpio/gpio415/direction'

Nowthatitsinoutputmode,youcanwriteavaluetothepin:
sudoshc'echo1>/sys/class/gpio/gpio415/value'

IfyouattachanLEDtothepinandground,theLEDwillilluminateaccordingtoyourcontrolmessages.
ENOUGH IO

Whenyouaredoneexperimenting,youcantellthesystemtostoplisteningtothegpiopin:
sudoshc'echo415>/sys/class/gpio/unexport'

LEARN MORE

YoucanlearnmoreaboutGPIOandLinuxhere:

Python Library
APython-basedlibraryforaccessingGPIOdataisindevelopment.Youcanseesomeexamplesinuse

GPIO Types
TherearemanytypesofsensorsthatcanbeusedwithGPIO:
SWITCHES

Switchesprovideon/offstateinputfromthephysicalworldtoyourcomputer.Youcanusethecommandlineinterfacetolistentoswitch
values.ApythonlibrarywascreatedfortheChippyRuxpinprojectifyouneedahigher-levelexampleinpython.
LEDS

LEDscanbeilluminatedandturnedoffusingthecommandlineinterface.RefertotheChippyRuxpinprojectonagoodexampleonhowto
manipulatethecommandlineusingpython.
RELAYS

Relaysarespecialhardwarebridgesusedtoswitchhighervoltageelectronics,protectingCHIPfromthehighvoltagesthatwoulddestroyit.
Usingarelayboardisprogrammaticallynodifferentfromusingswitches.

Expanding GPIO
IfyoudontneedtodriveanLCD,youcanusethosepinsformore,fasterGPIOifyouwantto.Thesearethepinsnumbered18-40onU13and
27-40onU14toactasGPIOtoincreasethenumberofavailableGPIOpins.Documentationonthisprocessisforthcoming!

http://docs.getchip.com/#forwindows78amp10

36/82

5/18/2016

NextThingCoDocumentation

Analog to Digital Conversion


Pin9onheaderU14providesalinkforlowresolutionanalogtodigitalconversion(ADC).Thereisnodriverforthislinkyet.ADCisusedto
readcontinuoussensors(temperature,pots,FSR,photoresistor,etc)

1 Wire
The1WireserialprotocolisnotyetimplementedforCHIP.

UART
UARTconnectionscanbemadeusingtheUARTconnectionsonheaderU14.

PWM
PulseWidthModulationisusedtocontrolmotorsandotherdevices.ItispossibletouseGPIOpinstodrivemotors,buttheygenerallyarenot
fastenoughforrobustandsmoothcontrol.PWMcanbeaccessedthroughan sysfs protocol.

I2C
I2Ccanbeaccessedthrougha sysfs protocolusingthedebiani2c-tools.Intheterminal,use
sudoaptgetinstalli2ctools

NotethattheXIOGPIOpinsareprovidedbyanI2Cexpanderataddress0x38ontheTWIbus2,sothataddresscannotbeusedonbus2.

LCD Monitor Support


UsingthenumerousLCDheaderpins,acolortouchscreenpanelcanbedirectlyimplementedonCHIP.

Project Examples
Projectscomingsoon!

Advanced
http://docs.getchip.com/#forwindows78amp10

37/82

5/18/2016

NextThingCoDocumentation

Forthoseinterestedinbuildingwithastripped-downversionofanoperatingsystem,orlookingtocustomizeCHIPfromthecommandline,
wehaveseveraltutorialsthatdescribehowtosetupCHIPwithmoredepth.

Installing C.H.I.P. SDK


CHIP-SDKhaseverythingneededtodevelopsoftwareforC.H.I.P.Mostimportantly,ifyouwanttoloadanoperatingsystemontoCHIP,the
onlysupportedwayistodothisfromavirtualmachine.GiventhatthevirtualmachinerunsUbuntu,itsprettysafetosaythatUbuntuusers
canflashwithoutthevirtualmachine.
REQUIREMENTS

ComputerrunningOSX10.10+,Ubuntu14.04+,orWindows7+
Atleast1GBfreeRAM,upto40GBofdiskspacemaybeused
Software:VirtualBox,Vagrant,git,terminal
SOFTWARE SETUP

ThereareseveralrequiredsoftwarepiecestogettheCHIPSDKvirtualmachinerunning.
INSTALL VIRTUALBOX AND EXTENSIONS

GettheinstallerforVirtualBox
InstalltheOracleVMVirtualBoxExtensionPack.
IfyouareusingWindows,youneedtoaddtheVirtualBoxinstallationdirectorytoyourPATH.
IncaseofanUbuntuhost:addyourusertothevboxusersgroup!
INSTALL VAGRANT

InstallVagrantfromtheVagrantsite.Alternatively,ifOSX,youcanusethehomebrewpackagemanager:brewinstallcaskroom/cask/brewcaskbrewcaskinstallvagrant
INSTALL GIT

InstallationofGitdependsonyouroperatingsystem:
Windows:directtodownload
DebianLinux: sudoaptgetinstallgit
OSXhomebrew: brewinstallgit
CLONE THE CHIP-SDK REPOSITORY AND BOOT THE VIRTUAL MACHINE

AssumingyouhavegitinyourPATH,openupaterminalandtype:
gitclonehttps://github.com/NextThingCo/CHIPSDK

andstartupthevirtualmachine:
cdCHIPSDK
vagrantup

LOGIN TO VIRTUAL MACHINE

Inthesameshellonthehosttypethefollowing:
vagrantssh

Ifeverythingwentwellyoushouldseethefollowingprompt:
vagrant@vagrantubuntutrusty32:~$

ALL THE COMMANDS AT ONCE

http://docs.getchip.com/#forwindows78amp10

38/82

5/18/2016

NextThingCoDocumentation

Heresallthecommandsinoneplace:
gitclonehttps://github.com/NextThingCo/CHIPSDK
cdCHIPSDK
vagrantup
vagrantssh

Congratulations!NowyourereadytoFlashaC.H.I.P.fromyourSDK!
TROUBLESHOOTING

Hereareafewpossibleproblems.
SHARED FOLDER OUT OF SYNC

IncaseyourunintotroublebecausethekernelintheVMwasupdatedandthesharedvagrantfoldercannolongerbemounted,updatethe
guestadditionsbytypingthefollowingintheCHIP-SDKdirectoryonthehost:
vagrantplugininstallvagrantvbguest

Thisblogposthassomemoretipsonkeepingadditionsinsync.
INVALID STATE

Ifyougetanerrorlike:
error:Theguestmachineenteredaninvalidstatewhilewaitingforittoboot.

ThisprobablymeansyourversionofVirtualBoxneedsupdatingand/orneedstheExtensionPack.Updateasnecessaryandtry vagrantup
again.
COULDNT FIND FILE

Ifyougettheerror:
error:Couldn'topenfile/Volumes/Satellite/gitbins/CHIPSDK/base

thatmeansyoudidntcdCHIP-SDK.Verybasic,perhaps,butlatenightssometimesneedthatbump!
UPDATING THE CHIP-SDK VIRTUAL MACHINE

YoumayhavebeenworkingwithCHIPforawhilenow,andyouwanttoupdatedyourSDK.Itsonlyslightlymoreinvolvedthansync'ingwith
thegitrepo;youhavetoupdatethevirtualmachine,too.
REQUIREMENTS

ComputerrunningOSX10.10+,Ubuntu14.04+,orWindows7+
ExistinginstallationofCHIP-SDK
HOW TO UPDATE

Justfollowthesesteps:
Onyourhostoperatingsystem,pullthelatestchangesfromourGitrepository:
cd~/CHIPSDK
gitpull

Makesurethevirtualmachineisshutdownandupdateit:
vagranthalt
vagrantprovision

Nowyoucanbootthevirtualmachineandsshintoit:

http://docs.getchip.com/#forwindows78amp10

39/82

5/18/2016

NextThingCoDocumentation

vagrantup
vagrantssh

Onceyouseethetrustyprompt,yourCHIPSDKvirtualmachineisreadytouse:
vagrant@vagrantubuntutrusty32:~$

ALL THE COMMANDS AT ONCE

Heresallthecommandsinoneplace:
cd~/CHIPSDK
gitpull
vagranthalt
vagrantprovision
vagrantup
vagrantssh

Flash CHIP Firmware


NowthatthevirtualmachineandSDKarerunningandconfigured,youcanconnectCHIPtoyourcomputerandgiveitanoperatingsystem.If
youwanttoflashusinganativeUbuntuinstallation,readhowtoprepareUbuntutoflash
HAVE YOU REPAIRED YOUR CHIP?

TheoriginalbatchofCHIPsshippedwithasoftwarebugintheNANDflashstorage.Wevebuiltarepairtool.
PREPARE CHIP FOR FLASHING

PrepareCHIPwithajumperwireconnectingPin7andPin39onheaderU14(FELpinandGND).Heresareferenceimagethatlabelsthe
headersandpins:

Note:thisjumperneedstobepresentonlywhenyouconnectCHIPtopower.Ifforsomereasonthewirebecomesdisconnectedafteryou
havepoweredCHIP,thereisnoproblemorneedtopanic.
NowconnectCHIPtoyourcomputerwithamicro-USB->USB-Bcable.ThepowerLEDwillilluminate.
OPTION 1: FLASH WITH NTC BUILDROOT OS

Buildrootisaleanoperatingsystem,anddoesnothaveapackagemanagertoinstallsoftware.Youcanaddadditionalsoftwarebeforeyou
flashCHIPbycustomizingbuildroot.ToflashCHIPwiththebuildrootOS:
http://docs.getchip.com/#forwindows78amp10

40/82

5/18/2016

NextThingCoDocumentation

cd~/CHIPtools
./chipupdatefirmware.shf

The f optionmeansfastboot.Ifyouhaveproblemsflashing,particularlyonWindowsorOSX,youcanrun ./chipupdatefirmware.sh to


disablefastbootflashing.
Duringflashing,theterminalwillfillwithmessages.Ifsuccessful,youllseeC.H.I.P.runthroughahardwaretest,withtheanswersbeingOK.
IfC.H.I.P.is'OK,youcanremovethejumperwire.Hereisasamplesuccessfuloutput.
OPTION 2: FLASH WITH DEBIAN

IfyouwanttoflashCHIPwiththedebianOSwithnowindowmanagerorGUI
cd~/CHIPtools
./chipupdatefirmware.shdf

The f optionmeansfastboot.Ifyouhaveproblemsflashing,particularlyonWindowsorOSX,youcandisablefastbootbyleavingoffthe-f
option: ./chipupdatefirmware.shd .Hereisasamplesuccessfuloutput.
OPTION 3: FLASH WITH CHIP OPERATING SYSTEM

IfyouwanttoflashCHIPwiththecompleteCHIPOperatingSystem
cd~/CHIPtools
./chipupdatefirmware.shdbstableguif

Duringflashing,theterminalwillfillwithmessages.Ifsuccessful,youllseeC.H.I.P.runthroughahardwaretest,withtheanswersbeing'OK.
IfC.H.I.P.is'OK,youcanremovethejumperwire.Hereisasamplesuccessfuloutput.Becauseoffilesize,theguioptionmustalsoinclude
the f fastbootoption.WindowsandOSXarenotyetsupportedasflashinghosts.
CONNECT TO CHIP AND DO SOMETHING

IfeverythingwentOK,youcannowpowerupyourCHIPagainandconnectviaserialasaUSBgadget:
screen/dev/ttyACM0115200

YoucanlogintoCHIPas chip or root usingthepassword chip .


andeventestthehardware:
hwtest

CUSTOMIZE BUILDROOT

Ifyouwanttocustomizebuildroot,usethesecommandsbeforeyourunthe ./chipupdatefirmware.sh scripttoflashCHIPwithfirmware:


cd~/CHIPbuildroot
makechip_defconfig
makenconfig

The nconfig commandwilldisplayatextinterfaceinyourterminal.Useyourarrowkeystobrowseandselectadditionalsoftwareforthe


buildrootOS.Whenyourefinishedwithyourselections,exitbyhittingtheF9key,whichwillautomaticallysaveyourcustombuildrootto:
/home/vagrant/CHIPbuildroot/.config

Nowletsbuildyourbuildrootwithyourcustomadditions:makeThiswilltakeawhile,maybeanhour.Whenfinished,flashCHIPwiththe
script:
cd~/CHIPtools
BUILDROOT_OUTPUT_DIR=../CHIPbuildroot/output./chipfelflash.sh

http://docs.getchip.com/#forwindows78amp10

41/82

5/18/2016

NextThingCoDocumentation

Unlessyouchangedtheusersorpasswords,youcanlogintoCHIPas chip or root usingthepassword chip .


APPENDIX

SampleoutputsareprovidedinthisappendixsoyoucanmoreeasilytroubleshootorproceedwithconfidencewhenflashingCHIPwith
firmware.
BUILDROOT OUTPUT

SampleoutputfromflashingBuildroottoCHIPlookslike:
ROOTFS_URL=http://opensource.nextthing.co.s3.amazonaws.com/chip/buildroot/stable/71/images
BUILD=71
BR_URL=http://opensource.nextthing.co.s3.amazonaws.com/chip/buildroot/stable/71/images
BR_BUILD=71
/home/doge/gits/CHIPtools/.firmware/images/rootfs.ubiexists...comparingtohttp://opensource.nextthing.co.s3.amazonaws.com/chip/buildroot/stable/71/images/rootfs.ubi
MD5:90315ca1fb8ff95fc6878ce8126bdf02
S3_MD5:6d59af4a0f673e1d61147e4a06dd7ba8
md5sumdiffers
2015102115:59:16http://opensource.nextthing.co.s3.amazonaws.com/chip/buildroot/stable/71/images/rootfs.ubi
Resolvingopensource.nextthing.co.s3.amazonaws.com(opensource.nextthing.co.s3.amazonaws.com)...54.231.176.13
Connectingtoopensource.nextthing.co.s3.amazonaws.com(opensource.nextthing.co.s3.amazonaws.com)|54.231.176.13|:80...connected.
HTTPrequestsent,awaitingresponse...200OK
Length:54525952(52M)[binary/octetstream]
Savingto:/home/doge/gits/CHIPtools/.firmware/images/rootfs.ubi

100%[======================================>]54,525,9521.83MB/sin29s

2015102115:59:45(1.82MB/s)/home/doge/gits/CHIPtools/.firmware/images/rootfs.ubisaved[54525952/54525952]

/home/doge/gits/CHIPtools/.firmware/images/sun5ir8chip.dtbexists...comparingtohttp://opensource.nextthing.co.s3.amazonaws.com/chip/buildroot/stable/71/images/sun5ir8chip.dtb
MD5:de0beb674eeb382901251febfbf1cf9b
S3_MD5:de0beb674eeb382901251febfbf1cf9b
filealreadydownloaded
/home/doge/gits/CHIPtools/.firmware/images/sunxispl.binexists...comparingtohttp://opensource.nextthing.co.s3.amazonaws.com/chip/buildroot/stable/71/images/sunxispl.bin
MD5:dd3f9c9c0984a6c1d7cdca2921f6f448
S3_MD5:dd3f9c9c0984a6c1d7cdca2921f6f448
filealreadydownloaded
/home/doge/gits/CHIPtools/.firmware/images/ubootenv.binexists...comparingtohttp://opensource.nextthing.co.s3.amazonaws.com/chip/buildroot/stable/71/images/ubootenv.bin
MD5:6f2b79a781f9f490911012ec3aa653e9
S3_MD5:6f2b79a781f9f490911012ec3aa653e9
filealreadydownloaded
/home/doge/gits/CHIPtools/.firmware/images/zImageexists...comparingtohttp://opensource.nextthing.co.s3.amazonaws.com/chip/buildroot/stable/71/images/zImage
MD5:0d35ad764564a2cee9281715823597a2
S3_MD5:0d35ad764564a2cee9281715823597a2
filealreadydownloaded
/home/doge/gits/CHIPtools/.firmware/images/ubootdtb.binexists...comparingtohttp://opensource.nextthing.co.s3.amazonaws.com/chip/buildroot/stable/71/images/ubootdtb.bin
MD5:97340d221bcbcc8f0bf27e26adc26f0a
S3_MD5:97340d221bcbcc8f0bf27e26adc26f0a
filealreadydownloaded
BUILDROOT_OUTPUT_DIR=/home/doge/gits/CHIPtools/.firmware
==preparingimages==
/home/doge/gits/CHIPtools/splimagebuilderdr3u4096o1664p16384c1024s64/home/doge/gits/CHIPtools/.firmware/images/sunxispl.bin/tmp/chipflashqVYEIs/sunxipaddedspl
filesize=3573504
PADDED_SPL_SIZE=0x000000c6
35+1recordsin
36+0recordsout
589824bytes(590kB)copied,0.00082507s,715MB/s
12+0recordsin
12+0recordsout
196608bytes(197kB)copied,0.0176519s,11.1MB/s
ImageName:flashCHIP
Created:WedOct2115:59:462015
ImageType:ARMLinuxScript(uncompressed)
DataSize:736Bytes=0.72kB=0.00MB
LoadAddress:00000000
EntryPoint:00000000
Contents:
Image0:728Bytes=0.71kB=0.00MB
==uploadtheSPLtoSRAMandexecuteit==
waitingforfel...OK
==uploadspl==
==uploaduboot==
==uploadubootscript==
==uploadubi==
100%[============================================================]
==executethemainubootbinary==
==writeubi==

http://docs.getchip.com/#forwindows78amp10

42/82

5/18/2016

NextThingCoDocumentation

flashing................OK
login...OK
password...OK
poweroff...OK

DEBIAN OUTPUT

SampleoutputfromasuccessfulDebianoutput:
debianselected
ROOTFS_URL=http://opensource.nextthing.co.s3.amazonaws.com/chip/debian/stable/37
BUILD=37
BR_URL=http://opensource.nextthing.co/chip/buildroot/stable/71/images
BR_BUILD=71
/home/doge/gits/CHIPtools/.firmware/images/rootfs.ubiexists...comparingtohttp://opensource.nextthing.co.s3.amazonaws.com/chip/debian/stable/37/rootfs.ubi
MD5:6d59af4a0f673e1d61147e4a06dd7ba8
S3_MD5:90315ca1fb8ff95fc6878ce8126bdf02
md5sumdiffers
2015102116:06:36http://opensource.nextthing.co.s3.amazonaws.com/chip/debian/stable/37/rootfs.ubi
Resolvingopensource.nextthing.co.s3.amazonaws.com(opensource.nextthing.co.s3.amazonaws.com)...54.231.160.10
Connectingtoopensource.nextthing.co.s3.amazonaws.com(opensource.nextthing.co.s3.amazonaws.com)|54.231.160.10|:80...connected.
HTTPrequestsent,awaitingresponse...200OK
Length:245366784(234M)[binary/octetstream]
Savingto:/home/doge/gits/CHIPtools/.firmware/images/rootfs.ubi

100%[======================================>]245,366,7841.27MB/sin2m11s

2015102116:08:48(1.78MB/s)/home/doge/gits/CHIPtools/.firmware/images/rootfs.ubisaved[245366784/245366784]

/home/doge/gits/CHIPtools/.firmware/images/sun5ir8chip.dtbexists...comparingtohttp://opensource.nextthing.co/chip/buildroot/stable/71/images/sun5ir8chip.dtb
MD5:de0beb674eeb382901251febfbf1cf9b
S3_MD5:de0beb674eeb382901251febfbf1cf9b
filealreadydownloaded
/home/doge/gits/CHIPtools/.firmware/images/sunxispl.binexists...comparingtohttp://opensource.nextthing.co/chip/buildroot/stable/71/images/sunxispl.bin
MD5:dd3f9c9c0984a6c1d7cdca2921f6f448
S3_MD5:dd3f9c9c0984a6c1d7cdca2921f6f448
filealreadydownloaded
/home/doge/gits/CHIPtools/.firmware/images/ubootenv.binexists...comparingtohttp://opensource.nextthing.co/chip/buildroot/stable/71/images/ubootenv.bin
MD5:6f2b79a781f9f490911012ec3aa653e9
S3_MD5:6f2b79a781f9f490911012ec3aa653e9
filealreadydownloaded
/home/doge/gits/CHIPtools/.firmware/images/zImageexists...comparingtohttp://opensource.nextthing.co/chip/buildroot/stable/71/images/zImage
MD5:0d35ad764564a2cee9281715823597a2
S3_MD5:0d35ad764564a2cee9281715823597a2
filealreadydownloaded
/home/doge/gits/CHIPtools/.firmware/images/ubootdtb.binexists...comparingtohttp://opensource.nextthing.co/chip/buildroot/stable/71/images/ubootdtb.bin
MD5:97340d221bcbcc8f0bf27e26adc26f0a
S3_MD5:97340d221bcbcc8f0bf27e26adc26f0a
filealreadydownloaded
BUILDROOT_OUTPUT_DIR=/home/doge/gits/CHIPtools/.firmware
==preparingimages==
/home/doge/gits/CHIPtools/splimagebuilderdr3u4096o1664p16384c1024s64/home/doge/gits/CHIPtools/.firmware/images/sunxispl.bin/tmp/chipflashUooSfo/sunxipaddedspl
filesize=3573504
PADDED_SPL_SIZE=0x000000c6
35+1recordsin
36+0recordsout
589824bytes(590kB)copied,0.00181383s,325MB/s
12+0recordsin
12+0recordsout
196608bytes(197kB)copied,0.0164913s,11.9MB/s
ImageName:flashCHIP
Created:WedOct2116:08:492015
ImageType:ARMLinuxScript(uncompressed)
DataSize:736Bytes=0.72kB=0.00MB
LoadAddress:00000000
EntryPoint:00000000
Contents:
Image0:728Bytes=0.71kB=0.00MB
==uploadtheSPLtoSRAMandexecuteit==
waitingforfel...OK
==uploadspl==
==uploaduboot==
==uploadubootscript==
==uploadubi==
100%[============================================================]
==executethemainubootbinary==
==writeubi==

http://docs.getchip.com/#forwindows78amp10

43/82

5/18/2016

NextThingCoDocumentation

flashing...........................OK
login...OK
password...OK
poweroff...OK

FAILURE

Thereareacouplecommonerrorsthatoccurwhenflashing.
ThefirstisathatCHIPisnotin fel mode,readytoreceivefirmware.Therearethreepossiblereasonsforthis:*Youalreadysuccessfully
flashedCHIP,andhaventdisconnectedtheUSBcablefromyourcomputer.*ThejumperwirebetweenPins7&39iseithernotpresent,
loose,orthejumperisinthewrongholes.*ThereisaproblemwiththeUSBcable.
Youllknowthisistheproblemwhenyouseethiserrorintheterminalwindow:
==uploadtheSPLtoSRAMandexecuteit==
ERROR:AllwinnerUSBFELdevicenotfound!
==uploadimages==
ERROR:AllwinnerUSBFELdevicenotfound!
ERROR:AllwinnerUSBFELdevicenotfound!
ERROR:AllwinnerUSBFELdevicenotfound!
ERROR:AllwinnerUSBFELdevicenotfound!
==executethemainubootbinary==
ERROR:AllwinnerUSBFELdevicenotfound!

Theothercommonerroristhatyouneedtorunthechip-update-firmware.shscriptwithsudo(oryouneedtoaddarulesfileasdescribedin
thenextsection).Thiserrorlookslikethisinyourterminalwindow:
Image0:848Bytes=0.83kB=0.00MB
==uploadtheSPLtoSRAMandexecuteit==
ERROR:Youdon'thavepermissiontoaccessAllwinnerUSBFELdevice
==uploadimages==
ERROR:Youdon'thavepermissiontoaccessAllwinnerUSBFELdevice
ERROR:Youdon'thavepermissiontoaccessAllwinnerUSBFELdevice
ERROR:Youdon'thavepermissiontoaccessAllwinnerUSBFELdevice
ERROR:Youdon'thavepermissiontoaccessAllwinnerUSBFELdevice
==executethemainubootbinary==
ERROR:Youdon'thavepermissiontoaccessAllwinnerUSBFELdevice

OPTION: FLASH WITHOUT SUDO

Asadeveloper,theresagoodchanceyoullflashCHIPmorethanonceinyourlife.Youllprobablywanttofollowthesesteps.Inordertobe
abletorunthechip-update-firmware.shscriptwithoutsudo,makearulesfile:
sudotouch/etc/udev/rules.d/99allwinner.rules

andaddthecontentwiththeteecommand:
echo'SUBSYSTEM=="usb",ATTRS{idVendor}=="1f3a",ATTRS{idProduct}=="efe8",GROUP="plugdev",MODE="0660"SYMLINK+="usbchip"'|sudotee/etc/udev/rules.d/99allwinner.rules

then,tomakethisrulesfilework: shellsudoudevadmcontrolreloadrules

Setup Ubuntu For Flashing


IfyouarerunningUbuntuOSonyourcomputer,anddontwanttobotherwithavirtualmachine,youcanflashCHIPfromyourreal
computer.Agenerousmemberofourforumscreatedascriptthatduplicatesthebelowstepsinaconvenientpackage.Youcangetitfrom
github.PleasenotethatthisisnotsupportedormaintainedbyNextThing-weonlylinktoithereforyourpotentialconvenience.
REQUIREMENTS

ComputerrunningUbuntu14.04+
Jumperwire
http://docs.getchip.com/#forwindows78amp10

44/82

5/18/2016

NextThingCoDocumentation

CHIP
INSTALL DEPENDENCIES

Installsometools:
sudoaptgetupdate
sudoaptgetinstalluboottoolsandroidtoolsfastbootgitbuildessentialcurlandroidtoolsfsutilslibusb1.00devpkgconfig

Ifyougetanerrorthattherepositoryandroid-tools-fastbootcantbefound,youareprobablybootingfromanUbuntuLiveCD(orUSB
stick).Youllneedtoaddarepositorysoyoucaninstalltheandroid-tools-fastboot:
sudoaddaptrepositoryuniverse&&sudoaptgetupdate
sudoaptgetinstalluboottoolsandroidtoolsfastbootgitbuildessentialcurlandroidtoolsfsutilslibusb1.00devpkgconfig

Ifyouintendtocustomizebuildrootwithadditionalsoftware,installthesepackages:
sudoaptgetinstalllibncurses5devlibc6i386lib32stdc++6lib32z1

Getandmakethefeltools:
gitclonehttp://github.com/NextThingCo/sunxitools
cdsunxitools
make
sudormf/usr/local/bin/fel
sudolns$PWD/fel/usr/local/bin/fel

ClonetheCHIP-toolsrepository
cd..
gitclonehttp://github.com/NextThingCo/CHIPtools
cdCHIPtools

IfyouhavealreadyclonedtheCHIP-toolsfromapreviousCHIPflashing,youcan,ofcourse,justupdateyourexistingrepository
cdCHIPtools
gitpullhttp://github.com/NextThingCo/CHIPtools

Youllalsoneedtoaddyourusertosomegroupsandaddaudevrule shellsudousermodaGdialout$(logname)&&sudousermodaGplugdev
$(logname)&&'SUBSYSTEM=="usb",ATTRS{idVendor}=="1f3a",ATTRS{idProduct}=="efe8",GROUP="plugdev",MODE="0660"SYMLINK+="usbchip"SUBSYSTEM=="usb",
ATTRS{idVendor}=="18d1",ATTRS{idProduct}=="1010",GROUP="plugdev",MODE="0660"SYMLINK+="usbchipfastboot"SUBSYSTEM=="usb",ATTRS{idVendor}=="1f3a",
ATTRS{idProduct}=="1010",GROUP="plugdev",MODE="0660"SYMLINK+="usbchipfastboot"SUBSYSTEM=="usb",ATTRS{idVendor}=="067b",
ATTRS{idProduct}=="2303",GROUP="plugdev",MODE="0660"SYMLINK+="usbserialadapter"'|sudotee/etc/udev/rules.d/99allwinner.rules&&sudoudevadm
controlreloadrules

NowyouarereadytoflashCHIPwithfirmware.
ALL THE COMMANDS AT ONCE

Heresallthecommandsinoneplace:
sudoaptgetupdate
sudoaptgetinstalluboottoolsandroidtoolsfastbootgitbuildessentiallibusb1.00devlibncurses5devlibc6i386lib32stdc++6lib32z1androidtoolsfsutils
gitclonehttp://github.com/NextThingCo/sunxitools
cdsunxitools
make
sudormf/usr/local/bin/fel
sudolns$PWD/fel/usr/local/bin/fel
cd..
gitclonehttp://github.com/NextThingCo/CHIPtools
cdCHIPtools

http://docs.getchip.com/#forwindows78amp10

45/82

5/18/2016

NextThingCoDocumentation

WiFi Connection
BelowaredetailedinstructionsforconnectingtoWi-Finetworksusingtwodifferentcommandlineprotocols: nmcli and connman .Ifyouare
usingtheCHIPOSthatcomesinstalledonCHIP,oryouhaveflashedwithourDebiandistribution,youllwanttousethefirstsectionabout
connectingwith nmcli .IfyouhaveflashedCHIPwithourbuildrootOS,youllneedtouse connman .
CONNECTING C.H.I.P. TO WI-FI WITH NMCLI

ThereareseveraltoolsinLinuxforconnectingandconfiguringnetworks.Wewillbeusingthecommandnmcli(NetworkManagerClient).You
mayseeothertutorialsthatreferenceiworiwconfig,however,thesetoolsarenotrecommendedforC.H.I.P.Youcanreadmoreaboutnmcli
ontheinternet.
REQUIREMENTS

Youwillneedoneofthesescenarios:
CHIPwithmonitorandkeyboardattached
SSHorserialconnection
Wirelessaccesstointernet
CHIPloadedwithCHIPOSorDebian
STEP 1: LIST AVAILABLE WI-FI NETWORKS

Intheterminal,type
nmclidevicewifilist

Theoutputwilllistavailableaccesspoints
*SSIDMODECHANRATESIGNALBARSSECURITY
*NextThingHQInfra1154Mbit/s100
NextThingShopInfra654Mbit/s30___WPA1WPA2
2WIRE533Infra1054Mbit/s44__WPA1WPA2

STEP 2: CONNECT TO A NETWORK

Youcanconnecttopassword-protectedoropenaccesspoints.
A:NOPASSWORD

Toconnecttoanopennetworkwithnopassword,usethiscommand:
sudonmclidevicewificonnect'(yourwifinetworkname/SSID)'ifnamewlan0

Thesecommandswillrespondwithinformationabouttheconnection.
B:PASSWORDPROTECTED

Toconnecttoapasswordprotectednetwork,usethiscommand,insertingyourownnetworknameandpassword:
sudonmclidevicewificonnect'(yourwifinetworkname/SSID)'password'(yourwifipassword)'ifnamewlan0

C:HIDDENSSIDANDPASSWORDPROTECTED

Toconnecttoahidden,WPA2-passwordprotectednetwork,usethesesetofcommands,insertingyourownnetworknameandpassword:
sudonmcliconaddconname'mywifi'ifnamewlan0typewifissid'(yourwifinetworkname/SSID)'
sudonmcliconmodify'mywifi'wifisec.keymgmtwpapsk
sudonmcliconmodify'mywifi'wifisec.psk'(yourwifipassword)'
sudonmcliconupid'mywifi'

STEP 3: TEST YOUR CONNECTION

http://docs.getchip.com/#forwindows78amp10

46/82

5/18/2016

NextThingCoDocumentation

Youcanverifyandtestyourwirelessnetworkconnection.
VERIFY

Youcanverifyyourconnectionusingthecommand
nmclidevicestatus

whichoutputsalistofthevariousnetworkdevicesandtheirconnections.Forexample,asuccessfulconnectionwouldlooklikethis:
DEVICETYPESTATECONNECTION
wlan0wificonnectedNextThingHQ
wlan1wifidisconnected
ip6tnl0ip6tnlunmanaged
loloopbackunmanaged
sit0situnmanaged

BecauseitisworthknowingthatLinuxoffersmanywaysofdoingthings,anothercommandthatshowsyourcurrentactiveconnectionis
nmcliconnectionshowactive

whichoutputslikeso:
NAMEUUIDTYPEDEVICE
NTC59962bac3441437b94eabf31dee66e8f80211wirelesswlan0

Afteryouhaveconnectedonce,yourC.H.I.P.willautomaticallyconnecttothisnetworknexttimeyoureboot(orstartNetworkManager
services).
TEST

Finally,youcantestyourconnectiontotheinternetwith ping .GooglesDNSserverattheIPaddress8.8.8.8isprobablythemostreliable


computerontheinternet,so:
pingc48.8.8.8

resultsinoutputlike:
64bytesfrom8.8.8.8:icmp_seq=1ttl=55time=297ms
64bytesfrom8.8.8.8:icmp_seq=2ttl=55time=26.3ms
64bytesfrom8.8.8.8:icmp_seq=3ttl=55time=24.8ms
64bytesfrom8.8.8.8:icmp_seq=4ttl=55time=55.7ms

YoucanstopthiscommandbypressingCTRL-Conyourkeyboard.The c4 optionmeansitwillhappenonly4times.
Congratulations!YouarenownetworkwithCHIP!
STEP 4: DISCONNECTING AND FORGETTING NETWORKS

Thecommandtodisconnectfromawirelessdeviceneedsafewparameters:
sudonmclidevdisconnectwlan0

Youmaywanttopreventauto-connectiontoanetwork,soyoucanusethiscommandtoforgetanetwork:
sudonmcliconnectiondeleteid(yourwifinetworkname/SSID)

TROUBLESHOOTING

Hereareafewpossibleproblemswithconnections.
NONETWORKFOUND

http://docs.getchip.com/#forwindows78amp10

47/82

5/18/2016

NextThingCoDocumentation

Notmuchtosayaboutthat.Iftheresnonetwork,youcantconnect.Gofindanetwork!
INCORRECTPASSWORD

Ifyoutypeinthewrongpassword,youllgetsomeerrorslikethis:
[32258.690000]RTL871X:rtw_set_802_11_connect(wlan0)fw_state=0x00000008
[32258.800000]RTL871X:startauth
[32263.720000]RTL871X:rtw_set_802_11_connect(wlan0)fw_state=0x00000008
[32263.820000]RTL871X:startauth
[32264.430000]RTL871X:authsuccess,startassoc
[32269.850000]RTL871X:rtw_set_802_11_connect(wlan0)fw_state=0x00000008
[32269.970000]RTL871X:startauth
Error:Timeout90secexpired.

Tryconnectingagainwiththecorrectpassword.
FAILEDPING

Ifyoudonthaveaccesstotheinternet,yourpingtoanoutsideIPwillfail.Itispossiblethatyoucanconnecttoawirelessnetwork,buthave
noaccesstotheinternet,soyoudseeaconnectionwhenyourequestdevicestatus,buthaveafailedping.Thisindicatesaproblemor
restrictionwiththerouterortheaccesspoint,notaproblemwiththeCHIP.
Afailedpinglookssomethinglike:
From192.168.2.56icmp_seq=14DestinationHostUnreachable
From192.168.2.56icmp_seq=15DestinationHostUnreachable
From192.168.2.56icmp_seq=16DestinationHostUnreachable
18packetstransmitted,0received,+9errors,100%packetloss,time17013ms
pipe4

LOSSOFWIRELESSNETWORK

Asudden,unplanneddisconnectionwillpostanerrorintheterminalwindow,forexample:
[30863.880000]RTL871X:linked_status_chk(wlan0)disconnectorroaming

TheNetworkManagerwillperiodicallytrytoreconnect.Iftheaccesspointisrestored,youllgetsomethinglikethisinyourterminalwindow:
[31798.970000]RTL871X:rtw_set_802_11_connect(wlan0)
[31799.030000]RTL871X:startauth
[31799.040000]RTL871X:authsuccess,startassoc
[31799.050000]RTL871X:rtw_cfg80211_indicate_connect(wlan0)BSSnotfound!!
[31799.060000]RTL871X:assocsuccess

NMCLINOTINSTALLEDERROR

Ifyoutrytouse nmcli andyougetanerrorthatitisnotfoundorisnotacommand,chancesarethatyouareusingtheCHIPbuildrootimage.


The nmcli commandsonlyapplytoCHIPsrunningCHIPOSorDebianlinux.
CONNECTING C.H.I.P. TO A WIRELESS NETWORK WITH CONNMAN

Thebuildrootoperatingsystemusesthe connman command-linenetworkmanagertoconnectandmanageyournetworkconnections.Ifyou


areusingCHIPOS(orDebian),youwillfindthat connman isnotinstalled-youllneedtousenmcli.
Ifyouwantallthedetailsof connman visittheArchLinuxwiki.
REQUIREMENTS

CHIPrunningbuildrootOS
Oneofthefollowing:
KeyboardandmonitorforCHIP
SerialconnectiontoCHIP
STEP 1: ENABLE WIFI AND FIND A NETWORK

Thesethreecommandswill,inturn,enablewifi,scanforaccesspoints,andseewhatnetworksareavailable:
http://docs.getchip.com/#forwindows78amp10

48/82

5/18/2016

NextThingCoDocumentation

connmanctlenablewifi
connmanctlscanwifi
connmanctlservices

The services commandhasoutputsimilarto:


*AO
NTCwifi_7cc70905cd77_4e5443_managed_psk
wifi_7cc70905cd77_hidden_managed_psk
NTCGuestwifi_7cc70905cd77_4e5443204775657374_managed_psk
wifi_7cc70905cd77_hidden_managed_none
ATT312wifi_7cc70905cd77_415454333132_managed_psk
HPPrint99LaserJet1102wifi_7cc70905cd77_48502d5072696e742d39392d4c617365724a65742031313032_managed_none
ATT344wifi_7cc70905cd77_415454333434_managed_psk
CBCI1B572.4wifi_7cc70905cd77_434243492d314235372d322e34_managed_psk
mifiwifi_7cc70905cd77_6d692d6669_managed_none
0024A5D8CF33wifi_7cc70905cd77_303032344135443843463333_managed_psk
TwirlEcoEvents2.4wifi_7cc70905cd77_547769726c2d45636f2d4576656e74732d322e34_managed_psk
xfinitywifiwifi_7cc70905cd77_7866696e69747977696669_managed_none

STEP 2: CONNECT TO AN ACCESS POINT

Unfortunately,connmandoesntusethenicenameontheleftoftheserviceslist.Itwantstheunfriendlystringontheright,soyoullwantto
getcopyandpasteready.
A:NOPASSWORD

Forexample,toconnecttoNTCGuest,whichhasnopassword, services showstwochoices.Wewanttheonewithouthiddeninthestring.


Usetheconnectcommandtoconnect:
connmanctlconnectwifi_7cc70905cd77_4e5443204775657374_managed_psk

Ifyournetworkisnotpasswordprotected,youllgetsomeoutputthatwillindicateasuccessfulconnection,suchas:
[961.780000]RTL871X:rtw_set_802_11_connect(wlan0)fw_state=0x00000008
[962.070000]RTL871X:startauth
[962.080000]RTL871X:authsuccess,startassoc
[962.090000]RTL871X:rtw_cfg80211_indicate_connect(wlan0)BSSnotfound!!
[962.100000]RTL871X:assocsuccess
[962.110000]RTL871X:sendeapolpacket
[962.290000]RTL871X:sendeapolpacket
[962.300000]RTL871X:setpairwisekeycamid:4,addr:0a:18:d6:97:2d:26,kid:0,type:AES
[962.320000]RTL871X:setgroupkeycamid:5,addr:0a:18:d6:97:2d:26,kid:1,type:AES

Ifyournetworkispasswordprotected,youllgetanerror.
B:PASSWORD-PROTECTED

Todealwithpasswords,youllneedtoput connman intointeractivemode:


connmanctl

whichgivesaconnmanctlprompt:
connmanctl>

Intheshell,turnthe'agentonsoitcanprocesspasswordrequests:
agenton

andnowusetheconnectcommand(yournetworknamewillbedifferentthanwhatsbelowofcourse)
connectwifi_7cc70905cd77_4e5443_managed_psk

http://docs.getchip.com/#forwindows78amp10

49/82

5/18/2016

NextThingCoDocumentation

andenteryourpasswordwhenprompted:
AgentRequestInputwifi_7cc70905cd77_4e5443_managed_psk
Passphrase=[Type=psk,Requirement=mandatory]
Passphrase?

Nowthatyouareconnectedtoawirelessnetwork,youcanexitconnmanctlinteractivemodebytyping
quit

ALLTHECOMMANDSINONEPLACE

Heresallthecommandsinoneplace:
connmanctl
agenton
connectwifi_7cc70905cd77_4e5443_managed_psk
quit

STEP 3: TEST CONNECTION

InCHIPscommandline,youcanpingGooglefourtimes:
pingc48.8.8.8

andexpectpingtooutputsometimingmessageslike:
PING8.8.8.8(8.8.8.8):56databytes
64bytesfrom8.8.8.8:seq=0ttl=55time=209.147ms
64bytesfrom8.8.8.8:seq=1ttl=55time=111.125ms
64bytesfrom8.8.8.8:seq=2ttl=55time=183.627ms
64bytesfrom8.8.8.8:seq=3ttl=55time=147.398ms
8.8.8.8pingstatistics
4packetstransmitted,4packetsreceived,0%packetloss
roundtripmin/avg/max=111.125/162.824/209.147ms

Ifyourconnectionisnotsuccessful,thenpingwilltellyouyournetworkisdown:
PING8.8.8.8(8.8.8.8):56databytes
ping:sendto:Networkisunreachable

TROUBLESHOOTINGCONNECTIONPROBLEMS

Youllneedtomakesureyouusedtherightnetworkwhenyouusedtheconnectcommnand.
Reviewanymessagesthattheconnectcommnandgaveyou.Didtheylookliketheexamplesofasuccessfulconnection?
Ifeverythingcheckedoutuntilyougotto ping ,theresagoodchancetheproblemiswithyourrouterorconnectiontotheinternet.
CONNMANNOTINSTALLEDERROR

Ifyoutrytouse connman andyougetanerrorthatitisnotfoundorisnotacommand,chancesarethatyouareusingtheCHIPOSorDebian


image.The connman commandsonlyapplytoCHIPsrunningthesimplebuildrootOS.
STEP 4: DISCONNECTING AND FORGETTING NETWORKS

Todisconnectfromyournetwork,youmightfirstwantareminderofwhatunfriendlystringisusedtodescribeyouraccesspoint,sotype:
connmanctlservices

whichwilloutputinformationaboutyourcurrentlink:
*AONTCwifi_7cc70905cd77_4e5443_managed_psk

http://docs.getchip.com/#forwindows78amp10

50/82

5/18/2016

NextThingCoDocumentation

UsetheIDtodisconnect:
connmanctldisconnectwifi_7cc70905cd77_4e5443_managed_psk

andyoullgetsomestatuslikethis:
[301.890000]RTL871X:clearkeyforaddr:0a:18:d6:97:2d:26,camid:4
[301.900000]RTL871X:clearkeyforaddr:0a:18:d6:97:2d:26,camid:5
[301.920000]IPv6:ADDRCONF(NETDEV_UP):wlan0:linkisnotready
Disconnectedwifi_7cc70905cd77_4e5443_managed_psk

Generally, conman willrememberandcachesetupinformation-ifyourebootinthevicinityofaknownnetwork,itwillattempttoconnect.


However,ifyouneedtoforgetanetworksetup,thesesetupscanbefoundbynavigating:
cd/var/lib/connman/

Youcandeleteasingleconnectionbyseeingwhatconnectionsarestored
ls/var/lib/connman/

andthendeleteasetupthatyoufind,forexample
rmrwifi_7cc70905cd77_4e5443_managed_psk

Youcandeleteallthewifidirectorieswith
rmrwifi*

(the r isneededbecausethesearedirectoriesyouaredeleting,andthestarattheendof wifi* assumesyourconfigurationsallstartwith


thestringwifi)
FOR ADVANCED USERS

Itsworthnotingthatyoullseetwowirelessnetworkinginterfacesifyoulistthemwith
ifconfig

connman isconfiguredtoseeonlythephysicalinterfacewlan0whichsimplifiessetup.Wedothiswithablacklist,whichcanbemodifiedat
/etc/connman/main.conf

Con gure Sound Output on Debian


GettingsimpleaudioplaybackworkingonCHIPisprettyeasy,onceyouinstallthecorrectpackagesandenableaudiooutput.Inthecode
examplesbelow,weveinsertedthe&&charactersattheendoflinessoyoucancopyandpastetheentireblockintoaterminalwindowand
executeeachlineinseries.IfyouareusingCHIPOS,soundoutputisalreadyconfiguredandworking.However,youmayberunningasimple
versionofDebianorbuildroot,sotheseinstructionswillhelpyougetsoundworkingonCHIP.
REQUIREMENTS

CHIP
ASSHorserialconnectiontoCHIPor
Monitorandkeyboard
HeadphonesorpoweredspeakersconnectedtoCHIPa/vjack
AConnectiontotheinternet
SETUP CHIP

http://docs.getchip.com/#forwindows78amp10

51/82

5/18/2016

NextThingCoDocumentation

Updateyouraptrepositorylistifyouhaventdonesorecently:
sudoaptgetupdate

TheninstallALSA:
sudoaptgetinstalllibasound2alsautils

Thiswillinstallalsaandsomeutilitiesforplayingsoundfromthecommandline.Oncethosehaveinstalled,youllneedtomaketheoutputs
activeforsound
alsamixer

willopenupasimpleinterface.Usetheleftandrightarrowkeysonyourkeyboardtoselectamongtheitems,andusetheup/downkeysto
changetheoptions:
DACOutput-settoDirect
LeftMixer-settoLeft
PA-settodesiredvolume
RightMixer-settoRight

PLAY A SOUND

Changetotherootmediadirectory:
cd/media

Alternatively,youcoulddownloadasoundintochipshomedirectory:
mkdir/home/chip/Media&&cd/home/chip/Media

Use wget todownloadasoundofpianochordstothefiletest.wav:


wgetOtest.wavhttps://upload.wikimedia.org/wikipedia/commons/d/db/Descending_thirds.wav

Ifwgetreturnscommandnotfoundyoucaninstallit:
sudoaptgetinstallwget

WecanfinallyplaythesoundandhearitoverCHIPsheadphonejack:

http://docs.getchip.com/#forwindows78amp10

52/82

5/18/2016

NextThingCoDocumentation

aplaytest.wav

Ifyouwanttoplaymp3oroggfiles,youcaninstallmplayer:
sudoaptgetinstallmplayer

Thentryanoggfile:
wgetOtest.ogghttps://upload.wikimedia.org/wikipedia/commons/e/e7/Agogo.ogg&&
mplayertest.ogg

Andmp3file:
wgetOtest.mp3http://www.freesound.org/data/previews/315/315618_2050105lq.mp3&&
mplayertest.mp3

RECORD A SOUND

Ifyouwanttotrytheaudioinput,youneedtoconnectaudioinputtoheaderU14,pins06&12ormodifyCHIPtouseaudioinontheTRRS
connector.OnceyouhaveanaudiosignalgoingintoCHIP,youcantestitoutbyrecordingathreesecond( d3 )WAVfilewitharecord:
arecordfcdd3Dhw:0,0chipaudioin.wav

MORE PACKAGES

Developersthatwanttousesoundwillprobablywanttodownloadthesepackages:
sudoaptgetinstallportaudio19dev&&
sudoaptgetinstallswig&&
sudoaptgetinstallpythonsetuptools&&
sudoaptgetinstallpythondev

USB Storage Devices


Inthistutorial,welldescribehowyoucanusetheUSBporttoaddmorestoragewithathumbdrive,harddrive,cardreader,orwhatever
else.Youcanthencopy,store,andeditfilesonthestoragedevice,extendingthecapabilityofCHIP.
Thistutorialissuitableforthebuildrootimage.IfyouarefollowingthisforotherLinuxdistributions,therearesomeadjustmentsthatyoull
needtomakeforpaths,permissions,andenabling'sudo.Withbuildroot,youworkastherootuser,sothistutorialisappropriatelyterse.
REQUIREMENTS

USBthumbdriveorharddrive
ComputerrunningOSX10.10+,Ubuntu14.04+,orWindows7+(toformatUSBdevice,ifneeded)
STEP 1: FORMAT THE DRIVE

First,youllwanttoformatthedriveasanMS-DOS(FAT),NTFS,orext3volume.Youcandothisonanothercomputer.
Onceformatted,insertthedriveintoCHIPsUSBport.Enterthecommand
dmesg

Youllgetoutputlike:
[4953.430000]usb11:newhighspeedUSBdevicenumber2usingehciplatform
[4953.580000]usbstorage11:1.0:USBMassStoragedevicedetected
[4953.590000]scsihost0:usbstorage11:1.0

http://docs.getchip.com/#forwindows78amp10

53/82

5/18/2016

NextThingCoDocumentation

[4954.590000]scsi0:0:0:0:DirectAccessUSBFlashMemory1.00PQ:0ANSI:2
[4954.600000]sd0:0:0:0:[sda]3911616512bytelogicalblocks:(2.00GB/1.86GiB)
[4954.610000]sd0:0:0:0:[sda]WriteProtectisoff
[4954.620000]sd0:0:0:0:[sda]ModeSense:65440930
[4954.630000]sd0:0:0:0:[sda]NoCachingmodepagefound
[4954.630000]sd0:0:0:0:[sda]Assumingdrivecache:writethrough
[4954.650000]sda:sda1
[4954.650000]sd0:0:0:0:[sda]AttachedSCSIremovabledisk

Noticethesecondtolastline.Thistellsyouthedevicelocationforthedrive.Storagedevicesgenerallyhavedevicenamesthatstartwithsd.
IfyouwanttoseeallthestoragedevicesattachedtoCHIP,youcanuseawildcardtodisplayalldevicesthatstartwithsd:
ls/dev/sd*

andyoullgetsomethinglike:
/dev/sda/dev/sda1

Withonethumbdriveattached,itappearsastwodevices:thedeviceitself(sda),andthestoragepartitions(sda1).Thereisonlyonepartition
onthisdrive.
Anotherwaytofindstoragedevicesisthecommand
blkid

whichliststhem,alongwiththenamesyoumighthaveinitializedthemwith:
/dev/sda1:LABEL="TEST"UUID="666811E9"

STEP 2: MOUNT THE DRIVE DEVICE TO YOUR FILESYSTEM

Nowthatyouknowwhereyourpartitionis,itstimetomountthepartitionsoyoucanaccessthefiles.
First,makeadirectorywhereyourdrivecanmount:
sudomkdir/drives

Mountthedrivedevicetoyour/drivesdirectory:
sudomount/dev/sda1/drives

Nowyoucannavigatetothe drives directoryandseeallthefilesinthedrive:


cd/drives
ls

STEP 3: UNMOUNT THE DRIVE FROM FILESYSTEM

IfyouwanttoremovethedrivefromtheUSBportonCHIP,itsbesttounmountit:
sudoumount/dev/sda1

STEP 4: AUTOMATIC MOUNTING ON BOOT

Youllprobablywanttomountthisdriveautomaticallynexttimeyouuseit,though.Wecansetthatupwithaquickmodificationtothe fstab
(filesystemtable)document:
vi/etc/fstab

Gettingaroundviisnotveryintuitive.Ifyouarenewtoit,heresaquickguideongettingthistextintothefstabdocument:*'arrowkeyto
http://docs.getchip.com/#forwindows78amp10

54/82

5/18/2016

NextThingCoDocumentation

theendofthefile,*pressthe'ikeytoinserttext*type(orcopy-paste)this:
/dev/sda1/drivesvfatdefaults00

Toexitvi,*pressthe'esckey,*type:(colon),*type'wqtowriteandquitvi.
Youcantestyourworkwith:
mounta

Iftheresanerror,doublecheckthe fstab fileandmakesureithastheline /dev/sda1/drivesvfatdefaults00 attheend.Ifitssuccessful,


youllbeabletoview,modifyandcopythefilesonthedisk:
ls/drives

Now,ifyoureboot,thedrivewillmountautomatically.Ifyouremovethedrive,theninsertitagain,youllneedthecommand
mounta

Connecting Bluetooth Devices


CHIPhasbuilt-inBluetooth.ThistutorialinstructshowtouseaBluetoothkeyboard,sinceitisasimpleandobviousexample.Thereare,of
course,severaltypesofBluetoothdevices,suchasearpieces,audioconnectors,vacuumcleaners,andmore.Futuretutorialswillcoverthose
devices,butthekeyboardisagoodintroductiontothecommandsandaneasywaytotestyoursystem.
REQUIREMENTS

CHIP
SSHorserialconnectiontoCHIPor
Monitorandkeyboard
Bluetoothdevice,preferablykeyboard
IMPORTANT!

StartwithaCHIPcompletelyunpluggedandpowereddown.Addpowerandbootup.Aknownlimitationisthatafter reboot ,CHIPsBluetooth


controllermaynotworkuntilyou power andphysicallydisconnectfromapowersource.
ABOUT

BLUETOOTHCTL

Wellbeusingthecommand bluetoothctl tofind,pairwith,andconnecttodevices.


Intheterminal,type
bluetoothctl

Thisstartsup bluetoothctl ininteractivemode.Youshouldseeoutputlike


[NEW]Controller7C:C7:08:05:CD:77BlueZ5.27[default]
[NEW]Device60:33:4B:13:A7:45nyb
[NEW]Device15:03:26:A0:26:26SK032B022626

whichisalistofMACaddressesofCHIPsBluetoothcontrollerchip(thefirstline)andanyotherdevicesthathavebeenpairedwithCHIPin
thepast.Usethe help command-itlistsalltheveryusefulcommandsinthe bluetoothctl interactivemode.
InBluetoothinteractivemode,usethecommand
poweron

http://docs.getchip.com/#forwindows78amp10

55/82

5/18/2016

NextThingCoDocumentation

whichoutputs
Changingpoweronsucceeded
[CHG]Controller7C:C7:08:05:CD:77Powered:yes

FIND A BLUETOOTH DEVICE

Ifyouneedtodiscoveradevice,startthescanprocess:
scanon

whichwillstartprintingMACaddressesandnames(ifavailable)ofBluetoothdevicesinyourvicinity.
[NEW]Device15:03:26:A0:26:26SK032B022626
[NEW]Device1C:1A:C0:85:5E:2C1C1AC0855E2C
[NEW]Device60:33:4B:13:A7:45nyb

PAIR WITH A BLUETOOTH DEVICE

PairtoadevicewiththeMACaddressandthe pair command:


pair1C:1A:C0:85:5E:2C

Thismayfailifthedeviceispoweredoff,goesoutofrange,oryourtoddlerspillswateronit.Hereswhatfailurelookslike:
Attemptingtopairwith1C:1A:C0:85:5E:2C
[CHG]Device1C:1A:C0:85:5E:2CConnected:yes
[CHG]Device1C:1A:C0:85:5E:2CConnected:no
Failedtopair:org.bluez.Error.AuthenticationCanceled

Asthescancontinues,youlleventuallyseethedeviceyouareinterestedin,socopythatMACaddressandtype:
pair15:03:26:A0:26:26

withoutputlike:
[CHG]Device15:03:26:A0:26:26Connected:yes
[CHG]Device15:03:26:A0:26:26Modalias:usb:v05ACp3232d0001
[CHG]Device15:03:26:A0:26:26UUIDs:
0000112400001000800000805f9b34fb
0000120000001000800000805f9b34fb
[CHG]Device15:03:26:A0:26:26Paired:yes
Pairingsuccessful
[CHG]Device15:03:26:A0:26:26Connected:no
PairwithaBluetoothDevicewithPassword(keyboard)

SomeBluetoothdevicesneeduserinputtopair.Inthatcase,youllneedtoturntheagent'onsothedevicecanpostapassword,andyou
canenterit:
agenton

willoutput
Agentregistered

nowyoucanpairit:
pairDC:2C:26:D7:B6:8F

willoutput
http://docs.getchip.com/#forwindows78amp10

56/82

5/18/2016

NextThingCoDocumentation

AttemptingtopairwithDC:2C:26:D7:B6:8F
[CHG]DeviceDC:2C:26:D7:B6:8FConnected:yes
[agent]PINcode:245261

NowyoucanusetheBluetoothdevicetoenterthePINcode,thenhitenter.Theterminalwillgivesomestatusaboutthepairing:
[CHG]DeviceDC:2C:26:D7:B6:8FModalias:usb:v05ACp022Cd011B
[CHG]DeviceDC:2C:26:D7:B6:8FUUIDs:
0000100000001000800000805f9b34fb
0000112400001000800000805f9b34fb
0000120000001000800000805f9b34fb
[CHG]DeviceDC:2C:26:D7:B6:8FPaired:yes
Pairingsuccessful
[CHG]DeviceDC:2C:26:D7:B6:8FConnected:no

Nowthatyouarepaired,youwillhavetoconnect.
CONNECT WITH A BLUETOOTH DEVICE

NowthatyouhavepairedtheBluetoothdevice,youwonthavetodothatagain.However,thedevicestillneedstobeconnected:
connect15:03:26:A0:26:26

willoutput,whensuccessful:
Attemptingtoconnectto15:03:26:A0:26:26
[CHG]Device15:03:26:A0:26:26Connected:yes
Connectionsuccessful
[bluetooth]##[1405.340000]hidgeneric0005:05AC:3232.0001:unknownmainitemtag0x0
[1405.360000]input:SK032B022626as/devices/platform/soc@01c00000/1c28c00.serial/tty/ttyS1/hci0/hci0:4/0005:05AC:3232.0001/input/input1
[1405.380000]hidgeneric0005:05AC:3232.0001:input:BLUETOOTHHIDv0.01Mouse[SK032B022626]on7c:c7:08:05:cd:77

or,ifthedeviceisnotavailable,itwillfail:
Attemptingtoconnectto15:03:26:A0:26:26
[bluetooth]##[1304.470000]Bluetooth:HIDP(HumanInterfaceEmulation)ver1.2
[1304.480000]Bluetooth:HIDPsocketlayerinitialized
Failedtoconnect:org.bluez.Error.Failed

TROUBLESHOOTING

IfyourBluetoothcontrollermoduleonCHIPisnotfunctioning,youcaneasilyfindtheproblem.Type
bluetoothctl

togetintotheinteractivemode,thentype
poweron

Ifyougettheresponse
Nodefaultcontrolleravailable

ThentheresaproblemwithCHIPrecognizingtheBluetoothmodule.Readtheveryfirstinstructionsatthetopofthistutorial.

Install X-windows
IfyouwantawindoweddesktoponC.H.I.P.,youcaninstallX-Windows.

http://docs.getchip.com/#forwindows78amp10

57/82

5/18/2016

NextThingCoDocumentation

REQUIREMENTS

CHIPconnectedtoWiFi
MonitorattachedtoCHIP
KeyboardorSerialorSSHConnectiontoCHIP
INSTALLATION (XFCE4)

CHIPisalightweightcomputer,sowellinstallthelightweightxfce4:
sudoaptgetinstallxfce4

Itmighttakesometimetodownloadandinstallallthepackages,sincetherearealotofdependenciesandlibrariesinvolved.Onceinstalled,
startthewindowingsystemwiththecommand
startx&

(the & runsXwindowsinthebackground,soyoucanstilluseyourterminal).Afteraminuteorso,youllgetanimageonthemonitor:

NowyoucanuseamouseandkeyboardtoexploreCHIPandlaunchprograms.
TROUBLESHOOTING

Ifyougeterrorsfromaptthatreportunmetdependencies,youcanrunthecommand
sudoaptgetinstallf

whichwillforceinstallationofanyalternateormissingdependenciesofanyinstalledpackages.

Building and Installing PureData (PD) on CHIP


PureDataisagraphicalprogrammingenvironment,primarilyformakingaudioandmultimediaapplications.Thistutorialdescribeshowto
buildthevanillaversionofPD.ThisisaveryrudimentaryversionofPD-itdoesnotcompileorbuildtheextrasobjects,suchasbob~or
expr~.
GET SOURCE

http://docs.getchip.com/#forwindows78amp10

58/82

5/18/2016

NextThingCoDocumentation

First,downloadandun-archivethesourcefromMillerPucketteswebsite:
wgethttp://msp.ucsd.edu/Software/pd0.467.src.tar.gz
gzipdpd0.467.src.tar.gz
tarxvfpd0.467.src.tar

INSTALL DEPENDENCIES

Now,youllneedtoinstallallthedependenciesandmakeasymboliclinktowish:
sudoaptgetupdate

sudoaptgetinstalllibasound2alsautilsmplayersoftwarepropertiescommongitautoconflibtoolmakebuildessentialgettextportaudio19devjacklibasounddevqjackctljackd2tcl8.6tk8.6
sudoaptgetbuilddeppuredata
sudolns/usr/bin/wish8.6/usr/bin/wish

Navigatetothepddirectorythearchivecreated:
cdpd0.467

BUILD IT

Yourereadytogoaheadandbuild,runningsomescripts,thenmakingtheinstall:
cd~/pd0.467/
./autogen.sh
./configuredisableportaudiodisableportmidinorecursion
make
sudomakeinstall

Youllprobablyalsowanttheextraobjectssuchasexpr,expr~,clone,fiddle~,bonk~,bob~,sigmund~,etal.Theserequireanextrabuild
step.Theextrafolderisin pd0.467/extra ,soifyouarestillin src/ youcan
cd../extra
makeinstall

Youllprobablyalsowanttoinstallthedekenpluginsoyoucanaddmoreexternalstoyourbagoftricks:https://github.com/pure-data/deken
Ivealsofoundthiskioskplugintobeveryhandyformakingapuredatawidowtakeuptheentirescreen:
https://puredata.info/downloads/kiosk-plugin
SET UP PRIORITY

Nowsetuppdsoitcanruninreal-timeprioritymodeforlowlatency(launchingwith pdrt ).Thisismostlyaboutgivingaudiothenecessary


threadpriorityandgivingthechipuseraccess:
sudonano/etc/security/limits.conf

Navigatetotheendofthefile(CTL-V)andaddthelines
@audiortprio99
@audiomemlockunlimited

andsave(CTL-Xtoexit,youllbepromptedtosave)Youllwanttodoublecheckthatthe chip userisintheaudiogroup:


sudoadduserusernameaudio

ThenrebootCHIP:
sudoreboot

http://docs.getchip.com/#forwindows78amp10

59/82

5/18/2016

NextThingCoDocumentation

TEST PD

Nowtestpdwithatestpatch.Openaterminalandusethiscommand,whichshouldresultinasinewave:
wgethttp://log.liminastudio.com/wpcontent/uploads/2012/06/testPatch.pd_.zip
unziptestPatch.pd_.zip
pdrtnoguinoadcalsatestPatch.pd

TEST MIDI CONTROLLER

IfyouneedtotestoutamidicontrollertomakesuredataiscomingintoCHIP,youcandothisfromtheterminal.Youllwanttolistthe
connecteddevices,ifnotjusttogettheportnameasALSAseesit.
amidil

Exampleoutputmightlooklike shellDirDeviceNameIOhw:1,0,0DS1MIDI1
YoucanthenusethecommandtodisplayMIDIdatabytes(inhex)intheterminalwindow:
amidiphw:1,0,0d

Movingafadermightprovideoutputlike:
B0291D
B02920
B02924
B02929
B0292E
B02932
B02937
B0293A
B0293C

UNINSTALL

Ifyouneedtoremovepd,ittakesafewsteps:
sudoaptgetremovepuredatacore
sudoaptgetremovepuredatadevpuredataimportpuredatautils
sudoaptgetpurgepuredatacore
sudoaptgetinstallaptitudewgetunzip
sudoaptgetautoremove

RUN PD

StartPDfromtheterminalwiththecommand
pdrt&

YoucanthenusethemouseandkeyboardtogothroughtheBrowserandlearnmoreaboutPD.
REFERENCES

Herearesomereferencelinks
realtimeprioritymode
lowlatencyalsa
puredataonsourceforge
pdextendedonRPi

Headless CHIP
http://docs.getchip.com/#forwindows78amp10

60/82

5/18/2016

NextThingCoDocumentation

OneofthemostamazingfeaturesofCHIPisthatitsinsanelysimpletouseitassmall,wirelesscomputer.Lowpowerrequirements,battery
poweredwithchargemanagement,andbothWiFiandBluetoothconnectivitymakesCHIPeasytorunasaheadless,autonomousmachine.
Ofcourse,youllstillwanttoaccessitandcontrolitwithoutamonitororkeyboard.YoucancontrolCHIPwithanothercomputerandaserial
ornetworkconnection.Hereshowyoudothis.
BEGIN

IfyouwanttouseCHIPwithoutamonitororkeyboardattached,theresafewwaystodothis:
SerialconnectionwithUSBtoUARTcable
SerialconnectionwithUSBcable
SecureShell(SSH)overwirelessorwiredethernet
REQUIREMENTS

ComputerrunningOSX10.10+,Ubuntu14.04+,orWindows7+
CHIP
Monitorandkeyboard(somewhatoptional,thoughhandy)
Connectiontotheinternet
SSH

SSH(orSecureShell)isacommonwaytocontrolacomputerremotelyoveranetwork.Youllneedtofirstgetyourcomputersnetwork
nameorIPaddressbeforeyoucanconnect.
HOW TO GET YOUR IP ADDRESS.

TheeasiestwaytogetCHIPsIPaddressistohookupamonitorandkeyboard.Bootup,login,connecttothenetworkifyouneedto,anduse
thecommand
hostnamei

whichresultsinyourIPaddress,whichmightlooklikethis:
10.1.1.99

Ifthe hostnamei commanddoesntworkyoucanuse


ipaddrshowdevwlan0

whichwilloutputalotofdata.Lookfortheline wlan0 andtheentry inet ,somethinglike:


inet10.1.1.99

CONNECT TO CHIP OVER A NETWORK

NowthatyouknowyourIPaddress,usethecommand:
sshroot@10.1.1.99

YoullbeaskedforCHIPspassword.Thedefaultpasswordis chip .ThisprocessisthesameifCHIPisconnectedtothenetworkusingbuilt-in


wirelessoraUSB-Ethernetadapter.
MAKE CONNECTIONS TO CHIP EASY

Youmaywanttosetupyournetworksoitwillalwaysprovidethesame(static)IPaddresstoCHIP.YoucanthenrelyonCHIPalwayshaving
thesameIPaddress.
Alternatively,youcansetupzeroconfigurationnetworkingtogiveyourCHIPaneasilyrememberedname.
YouarenowfreetodowhateveritisyoudowithLinuxcommandlineonCHIP.
USB TO UART SERIAL CONNECTION

Thereareafewreasonsyoudwanttouseaserialconnection:
http://docs.getchip.com/#forwindows78amp10

61/82

5/18/2016

NextThingCoDocumentation

Nowirelessnetwork
NoUSB-ethernetcable
DontknowtheIPornetworknameofCHIP
Youreold-schoolandlikeit
ConnectaUSBtoUARTcabletotheGround(GND),Transmit(TX),andRecieve(RX)pinsonCHIP
WellfindthoseonheaderU14,pinouts1,3and5.Seethefollowingdiagram,whichassumesCHIPsUSBportsarepointedup

ABOUT THE CABLE

Ifyouneedaconnector,searchyourfavoriteshopforUSBtoUARTcable-anywilldo.
Herestheonewebought.MostofthemwillhaveaUSBAplugforyourcomputerononeendandfourwires(red,green,black,andwhite)
withfemaleheaderpinsontheother.
YoumayfindotherUSB-UARTcablesthathavemorewires.Therewillbesomelabelsthatwillhelpyouconnecttothecorrectpins(GND,TX,
RX)onterminalU14.Justbesuretocheckyourdatasheetstomakesureyoureusingthecorrectpins.
INSTALL THE DRIVER

Forthistutorial,weareusingaPL2303USBtoSerialcable.Ifyouareusingthisonetoo,youllprobablyneedtoinstallthePL2303driverfor
yourcomputer.
CONNECT THE CABLE

Youonlyneedtoworryaboutthreeofthewires:
Black=Ground(GND)
White=Transmit(TX)
Green=Receive(RX)
Theredwirecarriesvoltage(+5V).DONOTUSETHEREDONE.Pluggingina+5VpincoulddamageyourCHIP
Again,thereisachanceyourUSBtoUARTcablemaybedifferent.Pleasecheckyourdatasheets!
Thisiswhatourcablelookslikepluggedin:

http://docs.getchip.com/#forwindows78amp10

62/82

5/18/2016

NextThingCoDocumentation

USB ON THE GO SERIAL CONNECTION

SimplerthantheUARTcable,youcanconnecttoCHIPwithaUSBcabletoyourcomputer.YourcomputerwillseeCHIPasaserialdeviceas
wellasprovidepowertotheCHIP.Eitherway,youllbeabletocontinuewiththedirectionsbelow.
CONTROL CHIP USING A SERIAL TERMINAL

OnceyouveconnectedCHIPtoyourcomputerwiththeUARTorUSBcable,openupaterminal.Thereslotsoutthere.Heresafew:
OSX:Zterm, screen (built-intoOSXterminal)
Windows:PuTTyorcygwin
Linux: screen , cu
Nomatterthesoftware,youllneedtosetsomesettingsfortheport(akaconnection).Youllprobablyonlyneedtosetthebaudrate,asthe
otherswillbedefaults:
BaudRate(DataRate):115200
DataBits:8
Parity:none
Stopbits:1
Flowcontrol:none
USING SCREEN

Ifyouareusingscreen,thecommandwilllooksomethinglikethis:
screen/dev/tty.usbserial115200

or
screen/dev/ttyUSB0115200

Whatcomesafterthe/dev/mayvaryamongdifferentsystemsandconnections.Youcannarrowdownthechoicesbyusingthecommand
ls/dev/tty*

tolisttheserialdevices.
NowpowerupCHIP.Youcoulddothisatanytime,butyoullhavethemostreliableexperiencepoweringCHIPafterconnectingtheUSB-UART
wires.Ifyoumaketheserialconnectionafterbootingchip,youllprobablyneedtohit'returnonyourkeyboardafewtimestogetCHIPto
sendsomedatatoyouandprintinyourterminal.
http://docs.getchip.com/#forwindows78amp10

63/82

5/18/2016

NextThingCoDocumentation

Youllthenbepromptedforlogin.Defaultsareusername root andpassword chip .


YouarenowfreetodowhateveritisyoudowithLinuxcommandlineonCHIP.
USING PUTTY

IfyouareonWindowsusingPuTTy,youllprobablywanttoopenthewindowsDeviceManagertogettheCOMnamefortheserialport.The
devicewontshowupinthePortslistuntilafterthekernelloadsandpresentsthedevice,soitmaytakeaminuteorsobeforeWindows
actuallydetectsit.

InthePuTTyconfigurationpanel,youcannowusetheCOMnametosetitup.Inthiscase,itsCOM4:

PressOpentoopenaterminalwindow,whereyoucanlogintoCHIPwithusernameandpassword chip .
YouarenowfreetodowhateveritisyoudowithLinuxcommandlineonCHIP.

Zero Con guration Networking


YoucanmakeworkingwithCHIPonalocalnetworkmuchmoreconvenientbyinstallingzero-confnetworking.OSXusersmayknowthisas
Bonjour.
Withzero-confproperlyconfigured,yourCHIPcanbecontactedusinganame,suchas chip.local ,ratherthananIP.Thisisespecially
http://docs.getchip.com/#forwindows78amp10

64/82

5/18/2016

NextThingCoDocumentation

convenient,ifyouaremovingCHIPtodifferentnetworksthatmightassigndifferentIPaddresses.ThekeytechnologyforthisinLinuxisthe
avahi setoftools.Thereareafewrelatedpackages,butthistutorialisaminimalinstallationtogetitupandrunning.
REQUIREMENTS

CHIP
SSHorserialconnectiontoCHIPor
Monitorandkeyboard
Connectiontotheinternet
INSTALL AVAHI

Gettingavahirunningisextremelysimple.First,installtheavahi-daemon:
sudoaptgetinstallavahidaemon

toinstallthenecessarylibraries.YoumaywanttoconfigurethedaemonwiththisservicefilesoyoucanfindAppleBonjourdevicesfromCHIP
:
sudonano/etc/avahi/services/afpd.service

ThenjustcopyandpastethisXMLintoit:
<?xmlversion="1.0"standalone='no'?><!*nxml*>
<!DOCTYPEservicegroupSYSTEM"avahiservice.dtd">
<servicegroup>
<namereplacewildcards="yes">%h</name>
<service>
<type>_afpovertcp._tcp</type>
<port>548</port>
</service>
</servicegroup>

Thenrestartavahi-daemon:
sudo/etc/init.d/avahidaemonrestart

YoucannowfindthehostnamethatyoucanusetoreachCHIP:
hostname

whichwillprobablyreturnchipasthehostname.
USE ZERO-CONF

FromaterminalonanothercomputeryoucantryaccessingCHIPwiththenetworkname chip.local
sshchip@chip.local

andenterthepassword(defaultis chip ).Thatsit.YoucannowreachCHIPwithoutknowingtheIP.


CHANGE THE HOSTNAME

IfyouhavemorethanoneCHIPonthenetwork,oryoujustwanttochangethenamefromchiptofitintoyournetworknamescheme,you
canmodifythehostnamesfile.Openthefileinaneditor:
sudonano/etc/hostname

whereyoullseeasinglewordchip.Justmodifythatline(forexample,changeittobobofettywap)andsavethefile.Youllalsoneedto
modifythehostsfilewhereyoullneedtochangethefirstline 127.0.0.1chip whereyoureplacechipwithyournewusername.
sudonano/etc/hosts

http://docs.getchip.com/#forwindows78amp10

65/82

5/18/2016

NextThingCoDocumentation

Finally,togetthisnewnametobroadcastoverthenetworkrestartavahi-daemon:
sudo/etc/init.d/avahidaemonrestart

Youcannowaccesschipwiththenewname:
sshroot@bobofettywap.local

OTHER PACKAGES

Youmaywanttoexploresomeoftheotherfeaturesofavahi,suchasbrowsinganetworkforotherzero-configureenabledcomputers.
Theresapackageyoucaninstall:
sudoaptgetupdate&
sudoaptgetinstallavahiutils

whichgivesyouasetoftoolsforbrowsingthenetwork,suchasthecommand
avahibrowsedlocal_ssh._tcpresolvet

whichwilllistotherzero-configure-enableddevicesonthelocalnetwork.YoucouldsshtoyourMacintoshnamedbananna,forexample
with
sshusername@bananna

Analternativetojustinstallingtheavahi-daemon,youcan
sudoaptgetinstalllibnssmdns

whichinstallssomeothertoolsfornetworknamepropagation.
TROUBLESHOOTING

Ifyourcomputerreturnstheerror
ssh:Couldnotresolvehostnamechip.local:nodenamenorservnameprovided,ornotknown

thenyoueitherneedtowaitaminuteortryinstallingavahi-daemonagain,butpaycloserattentiontoanyerrorsthat aptget returns.


IfyoucantconnecttoCHIPeventhoughyouaresureavahiisproperlyconfigured,confirmthatyourCHIPandthecomputeryouaretrying
toconnectareonthesamelocalnetwork(andonthesamesubnet).

CHIP Boot Repair Tool


TheinitialbatchofCHIPsshippedwithaproblemintheNANDflashstorage.Dontworry,thisisasoftwareissue,andwevebuiltarepairtool
tocorrectthisissue.HereseverythingyouneedtoknowtorepairyourCHIPsNAND.

Things you will need


C.H.I.P.
Standard-USBtomicro-USBconnector
ThinPaperclip(ajumperwireworkstoo)
http://docs.getchip.com/#forwindows78amp10

66/82

5/18/2016

NextThingCoDocumentation

ComputerwithUbuntu14.4orWindows7,8,or10

For Ubuntu 14.4


Openaterminalandtype sudoaptgetupdate&&sudoaptgetupgrade .Hitentertoexecutethecommand.Thisupdatesthedebian
packagerepositoriesandupgradesyoursystemtoreflectanypackagechanges.

Downloadtherepairtoolhere.
Double-clickontherepairtooliconandfollowtheUbuntusoftwareinstallprocess.Oncetheinstallfinishes,usetheUbuntusearch
tooltofindtheCHIPbootrepairapplication.

Followtheonscreenmessagestocompletetherepairprocess.

http://docs.getchip.com/#forwindows78amp10

67/82

5/18/2016

NextThingCoDocumentation

Grabapaperclip(orjumperwire.Heckastrippedmetaltwisttieworks)andbenditsooneendfitsintheFELpin(U14-pin7)andthe
otherendfitsintheGNDpin(U14-pin39).Ifitdontfit,dontforceit!Youwillneedaskinnygaugepaper-clip:ifitstoothickand
youretooassertive,itmaydamagetheheader.

ConnectC.H.I.P.toyourcomputerusingastandard-USBtoUSB-microcable.

http://docs.getchip.com/#forwindows78amp10

68/82

5/18/2016

NextThingCoDocumentation

AssoonastherepairtoolsoftwaredetectsthatCHIPisinFELmodeandconnectedbyUSB,theapplicationbeginstherepairprocess.

Therepairtakesmereseconds.

Congratulations,yourC.H.I.P.isnowrepaired.\()//

For Windows 7, 8, & 10


DownloadtheRepairToolhere.Double-clickontheapplicationiconandfollowtheon-screendirectionstocompletetherepairprocess.
TheRepairToolworksonWindows7,8,and10.ItdproblablyworkonWindows9,buttheydidntmakeit!

http://docs.getchip.com/#forwindows78amp10

69/82

5/18/2016

http://docs.getchip.com/#forwindows78amp10

NextThingCoDocumentation

70/82

5/18/2016

http://docs.getchip.com/#forwindows78amp10

NextThingCoDocumentation

71/82

5/18/2016

NextThingCoDocumentation

For Mac OS X 10.10 (Yosemite)


DownloadtheRepairToolhere.Double-clickontheapplicationiconandfollowtheon-screendirectionstocompletetherepairprocess.
TheRepairToolworksonMacOSX10.10(Yosemite).

http://docs.getchip.com/#forwindows78amp10

72/82

5/18/2016

http://docs.getchip.com/#forwindows78amp10

NextThingCoDocumentation

73/82

5/18/2016

http://docs.getchip.com/#forwindows78amp10

NextThingCoDocumentation

74/82

5/18/2016

NextThingCoDocumentation

FAQs
http://docs.getchip.com/#forwindows78amp10

75/82

5/18/2016

NextThingCoDocumentation

FrequentlyAskedQuestions

Do I need to install something for CHIP to be a computer?


No.CHIPcomespreinstalledwiththeCHIPOperatingSystemandseveralapplications.Justpoweron,andgetstarted.

Why composite video?


Severalreasons:*Televisionsarethemostcommonlyavailablescreenintheworldandthevastmajorityofthemhaveacompositeinput.*
CompositevideocanbeintegratedwithoutaddinglicensingfeestothecostofC.H.I.P.*Compositeisaverylowprofileconnector,allowing
ustokeepthefootprintoftheboardsmallforpeoplewantingtobuildC.H.I.P.intoprojects.

Is CHIP an exposed circuit board?


Yes!NothavingacaseforC.H.I.P.isoneofthewaysweareabletokeepourcostsdown.Asmakers,wereexcitedtointroducepeopletothe
physicalcomponentsofcomputersandshowthemthatelectronicsarentscary,theyrefun!Wehopetosparkcuriosityandencourage
peopletobegintinkeringthemselves.

What resolution can CHIP function at?


WiththeVGAandHDMIadapters,C.H.I.P.isdesignedtoworkat720presolution,thoughtheMali400GPUistechnicallycapableofupto
1080poutputs.ThecompositevideoconnectoroperatesattheSDresolutionof640x480.

How is CHIP so cheap?


QUANTITY.OurpartnersatAllwinnerworkedhardtohelpusfindhowtoreducecosts,sowecouldintroduceC.H.I.P.toEVERYBODY.Tosell
C.H.I.P.for$9,weneedtoordertensofthousandsofchips.Byusingcommon,available,andvolume-producedprocessor,memory,andwifi
chips,weareabletoleveragethescalesatwhichtabletmanufacturersoperatetogeteveryonethebestprice.

What does CHIP stand for?


Werecurioustohearwhatyouthink;)

Is CHIP open source? Where are the docs?


YES!Veryopensource!WearestillintheprocessoftestingandrefiningthewholeC.H.I.P.family.Aswehitdesigncompletion,wellrelease
ourdesignfiles.Wevealreadyreleasedquiteabit!CheckthemoutatourGitHubrepo!

http://docs.getchip.com/#forwindows78amp10

76/82

5/18/2016

NextThingCoDocumentation

Can I upgrade CHIPs RAM/Storage/Processor?


Technically,yes,butthecomponentsaresolderedonandnotintendedtobeswappedout.IfyoureallylikereworkingsmallBGAandfine
pitchcomponents,though,wewontstopyou.:)
Ifyouwantadditionalstorage,youcanattachaUSBdrive!

How many accessible pins does CHIP have?


EightdigitalGPIOs,onePWMpin,SPI,TWI(I2C),UART,USB,CSI,ParallelLCDoutput,touchpanelinput,stereoaudioout,monoaudioin,
compositevideoout,andawholebunchofpowerrailsinandout.
Themostup-to-dateinformationisonourGitHubrepo.

Can I make my own adapter board?


Absolutely!Theschematicsandlayoutfortheboards,bothofC.H.I.P.andC.H.I.P.sadapterswillbereleasedastheyarefinalizedfor
production.Fromthat,youcanbuildwhateversortofadaptersoradd-onsyouwant!

Does the HDMI adapter have HDMI audio output?


Notatthistime.Becausethereisnoonboarddigitalaudiosupportfromourprocessor,C.H.I.P.scurrentdesignonlyhasanalogaudiooutput
viatheheadphone/compositejack.AddingaUSBsoundcardistheeasiestwaytobeefupyourCHIPsdigitalaudiooutputoptions.

Does Linux come pre-installed?


YES!C.H.I.P.comeswithLinuxinstalled,andaselectionofourfavoriteprogramsandgames.Likeanyrealcomputer,youcandownloadmore
softwareandcustomizeC.H.I.P.sapplicationsandoperatingsystemtosuityourneeds!

Can I plug in a Keyboard, Mouse, AND Power?


TheeasiestwaytoaccomplishthisistopowerC.H.I.P.asusualviathemicroUSBport.AttachaUSBkeyboardwithanaccessoryUSBporton
it,thenconnectyourwiredmousetothatport.Alternatively,abluetoothkeyboardormousecanbeusedtofreeuptheneedforUSB
connections.
Formoreadvancedusecases,C.H.I.P.canbepoweredviaitsinterconnects,leavingboththefullsizeUSBandmicroUSBportsavailableto
attachdevicesto.

Can I stream Net ix?


DuetoalackofsupportforSilverlight(theback-endsoftwarethatallowsNetflixtobestreamed)inLinux,itisunlikelythatNetflixwillwork
http://docs.getchip.com/#forwindows78amp10

77/82

5/18/2016

NextThingCoDocumentation

onC.H.I.P.usingentirelyopen-sourcesoftware.Thiswouldrequiresomeonetocomeupwithanalternateback-end.Thatsaid,somevery
astutebackershavereportedthatNetflixshouldbepossiblebyinstallingtheGoogleChromebrowser,whichallowsNetflixstreamingvia
HTML5.

Does CHIP have a power switch?


Yes!C.H.I.P.hasatinypoweron-offbuttonandastatusLEDontheboarditself.

Can I make a supercomputer by linking 100 CHIPs together?


WerefocusedonindividualusesofC.H.I.P.butwhatyouretalkingaboutiscalledclustering,andmaybepossibleAgoodplacetostart,if
youreinterestedinclustering,isreadinguponDebian-Beowulf

What about a camera?


C.H.I.P.hasexposedCSIpinsonitsheadersforintegratingacameradirectlytotheprocessor,orifdriversandsensortuningsoundlikeabit
much,youcanalwaysaddaUSBcameratoo.

How do I connect a display?


Youcanconnectadisplaythroughthe3.5mm()TRRScompositevideoportonC.H.I.P.Ifyoudliketoconnecttoavgaorhdmimonitor,we
haveadaptersavailableforthat!YoucanalsoconnectanyparallelLCDtotheexposeddisplaypinsonC.H.I.P.sheaders.

Does CHIP have an SD card slot?


No.Butbyintegratingreliablestorageontothedevice,wereabletobothsaveyouagettingstartedcostandallowLinuxtocome
preinstalledonC.H.I.P.meaningitsreadytogowhenitarrivesatyourdoor.OneofthebiggoalsofthisprojectismakingC.H.I.P.easyto
use,andthisgoesalongwaytowardsthatend.Ifyouneedadditionalstorage,itseasytoaddanSDcardreaderorotherUSBstoragewith
thebuilt-inUSBport.

Can I connect to composite video AND audio out at the same time?
YES!The1/8"mini(TRRS)jackcanbeusedeitherwithavideo-onlycable,audioonlycable,headphones,headphoneswithmic,ORa
combinedAudio/Videocompositecable.Prettyversatilelittleport,isntit!?

What software does CHIP ship with? What programs can it run?
C.H.I.P.comespre-loadedwithsomeofourfavoriteopen-sourceapplications,andtheabilitytoinstallhundredsmore.Whatsevenmore

http://docs.getchip.com/#forwindows78amp10

78/82

5/18/2016

NextThingCoDocumentation

exciting,though,isthatifanygivenprogramisntsupportedoutofthebox,thecommunitycanworktogethertomakeithappen.Thats
whatwe<3aboutOpenSourceSoftware.

What programming languages does CHIP support?


C.H.I.P.isarealcomputer,andcanrunsoftwarewritteninallkindsofprogramminglanguages,solongastheresacompilerforthem.
Python,Java(viaJDK8),Ruby,PHP,Squeak,C++,JS,Assembly,BF..evenourfavorite,ArnoldC,andlotslotsmore.

Does CHIP have Real Time Clock?


No,butaddinganRTCisagreat(andeasy)hardwarehack,forthefolksthatneedit.Formostpeople,though,anRTCisntnecessarysinceit
iseasytogetC.H.I.P.topulltimefromaremoteNTPserveroverwifi.

What voltage are GPIOs?


CHIPuses3V3digitallogiconGPIOs.

What connector is use on the battery?


WeareusingaJST-2.0PH2-pinshroudedmaleconnectortoconnectLiPocellstoC.H.I.P.InthecurrentdesigntherearealsoBATTpins
availableontheinterconnectheaders,whichallowalternatebatteryconnectors/placementswhenattachingC.H.I.P.toacustomPCBA.

I want to know more about the Allwinner R8 processor!


YoucanfindoutmorefromtheAllwinnerR8UserManualandtheR8Datasheet

What kind of battery can I use with CHIP?


Anysingle-cell(3.7V)LiPobatterywillworkwithC.H.I.P.Youcangobiggerorsmallerthan3000mAHasneededforyourproject!

Does CHIPs WiFi support AP mode?


YES!

Does C.H.I.P. have an ethernet port?


http://docs.getchip.com/#forwindows78amp10

79/82

5/18/2016

NextThingCoDocumentation

No.Butitdoeshavebuilt-in802.11b/g/nwifi.Butifyoulikewires,youcanuseaUSB-Ethernetconnector.

Does C.H.I.P. come with a banana?


C.H.I.P.isstrictlyB.Y.O.B.;)

Is there a command that lets me know more about the CPU and Memory?
Itsacomputer!Itwilltellyouanything.IfyouwanttofindoutmoredetailsaboutCHIPsprocessor,usethecommand:
cat/proc/cpuinfo

Thiswillgiveoutputsimilarto:
processor:0
modelname:ARMv7Processorrev2(v7l)
BogoMIPS:1001.88
Features:halfthumbfastmultvfpedspneonvfpv3tlsvfpd32
CPUimplementer:0x41
CPUarchitecture:7
CPUvariant:0x3
CPUpart:0xc08
CPUrevision:2

Hardware:Allwinnersun4i/sun5iFamilies
Revision:0000
Serial:162542c10c427777

Ifyouwantknowmoreaboutthememory:
cat/proc/meminfo

withoutputsomethinglike:
MemTotal:507108kB
MemFree:298600kB
MemAvailable:382592kB
Buffers:0kB
Cached:92216kB
SwapCached:0kB
Active:98752kB
Inactive:64096kB
Active(anon):73180kB
Inactive(anon):5812kB
Active(file):25572kB
Inactive(file):58284kB
Unevictable:0kB
Mlocked:0kB
HighTotal:0kB
HighFree:0kB
LowTotal:507108kB
LowFree:298600kB
SwapTotal:0kB
SwapFree:0kB
Dirty:0kB
Writeback:0kB
AnonPages:70660kB
Mapped:37768kB
Shmem:8360kB
Slab:22784kB
SReclaimable:11560kB
SUnreclaim:11224kB

http://docs.getchip.com/#forwindows78amp10

80/82

5/18/2016

NextThingCoDocumentation

KernelStack:1176kB
PageTables:2240kB
NFS_Unstable:0kB
Bounce:0kB
WritebackTmp:0kB
CommitLimit:253552kB
Committed_AS:615216kB
VmallocTotal:507904kB
VmallocUsed:14560kB
VmallocChunk:482532kB

Troubleshooting
CHIP Wont Boot or Startup
Problem:Iattachedakeyboard,monitor,andpoweredCHIP,butitdoesnotdoanything.TheLEDsareon,butIcantdoanythingwithCHIP!
Fixes:TheinitialbatchofCHIPsshippedwithaproblemintheirNANDflashstorage.Dontworry,thisisasoftwareissue,andwevebuilta
repairtool.
Downloadtherepairtool.
Double-clickontherepairtoolicon.
Followtheonscreenmessagestocompletetherepairprocess.

Sudden Shutdown (Brown-out)


Problem:Iattachedamouseandkeyboard,andmyCHIPsuddenlyturnedoff.
Fixes:Likemosttinycomputers,theUSBportonCHIPprovidesalimitedamountofpower.Whenyoupluginakeyboardandanoptical
mouse,forexample,theywilldrawtoomuchcurrentfromCHIP,notleavingenoughfortheprocessor.Asaresult,CHIPwillimmediatelyshut
down.Thereareafewwaystoavoidthis.
UseapoweredUSBhub
Useabluetoothkeyboardandmouse.Yes,thisisaveryspecificsolution,butagoodonewhenyouareonlyusingtheUSBportfor
keyboardandmouse.Keepsyourdeskcleanertoo!
Executethecommand sudoaxp209no_limit intheterminalbeforeyouattachyourUSBperipherals.
Providepowerfromasupplyconnectinggroundand5Vthepinsheaders1and2onU13.

Problem:MyCHIPbootedfineuntilitgottoloadingthedesktopGUI,thenitshutdown.
Fixes:Thisisusuallytheresultofanunderpoweredpowersupply.Werecommenda5Vpowersupplywithaminimum1Acurrentrating.
YoucanfindthecurrentratingonyourpowersupplysOutput-itshouldread1000mAor1A(orahighernumber).Youmayneeda
magnifyingglasstoreadit,buttheyallshouldhavethisinfoonthelabel!
InsteadofpoweringCHIPusingthemicroUSBport,tryusingtheheaderpinsCHG-IN(U13-2)andGND(U13-1).
AddaLiPobattery.Thisprovidesenoughextracurrentandpowerbuffertopreventthisproblem.

No Video Output
Problem:Monitorisattached,butthereisnovideoonmymonitor
Fixes:Thereareafewpossibleproblemshere
wrongTRRSarrangement:trydifferentendsofyourcable.Makesureissubscribestothisuseofthetip,rings,andsleeve
PALmonitor:CHIPoutputsNTSCformatvideobydefault.Youcanchangethis,however,byfollowingthisguide.
http://docs.getchip.com/#forwindows78amp10

81/82

5/18/2016

NextThingCoDocumentation

Videotracecutformicin:Thisisprettyunlikely,butifyouareworkingwithausedCHIP,itmaybethatthetipconnectorhasbeen
switchedtoworkasamicrophoneinput.Beforeyoudofixthiswithabitofsolder,takeacloselookatyourboardtoseeifthereis
evidenceofascoremarkindicatingthecuttrace.

How to Contact Us
Ifyouneedmoresupport,tryourforumsoremailus.

Compliance Statement
FCCID:2AF9F-HELLA1337
IC:20863-HELLA1337

FCC
Thisdevicecomplieswithpart15oftheFCCRules.Operationissubjecttothefollowingtwoconditions:(1)Thisdevicemaynotcauseharmful
interference,and(2)thisdevicemustacceptanyinterferencereceived,includinginterferencethatmaycauseundesiredoperation.

Industry Canada
ThisdevicecomplieswithIndustryCanadalicense-exemptRSSstandard(s).Operationissubjecttothefollowingtwoconditions:
1.Thisdevicemaynotcauseharmfulinterference;
2.Thisdevicemustacceptanyinterferencereceived,includinginterferencethatmaycauseundesiredoperationofthedevice.
CetappareilestconformeIndustrieCanadaunelicencestandardRSSexonrs(s).Sonfonctionnementestsoumisauxdeuxconditions
suivantes:1.Cetappareilnedoitpasprovoquerd'interfrences2.Cetappareildoitacceptertouteinterfrencereue,ycomprisles
interfrencespouvantprovoquerunfonctionnementindsirabledel'appareil.

Information to User
CAUTION:Changesormodificationsnotexpresslyapprovedforcompliancecouldvoidyourauthoritytooperatethisequipment.

http://docs.getchip.com/#forwindows78amp10

82/82

You might also like