Sie sind auf Seite 1von 5

9/30/2014 Get started with Cubian · cubieplayer/Cubian Wiki · GitHub

 This repository Search Explore Features Enterprise Blog Sign up Sign in

 cubieplayer / Cubian  Star 174  Fork 37

Get started with Cubian 


Vladimir Korolyov edited this page on Aug 2 · 23 revisions

LED indicators  Pages 22 

Find a Page… 

Cubian uses the two onboard LED (Blue and Green) as the indicator of some Contribute deb package
events. 
Contribute on website

The green LED indicate system status. If this LED blinking every 1 second, it Contribute rootfs patches 
means the system is starting up or shutting down normally, after the Contribute to website
system has started this LED turns to indicates the SD-card r/w status. Contribute your rootfs patches

The blue LED indicate the network status. if this LED starts to blink every 1 Cubian does not boot anymore
after cubian update
second, it means the system did NOT connected to a network, after the
system has connected to network successfully, this LED will turn OFF. Get started cubian

Get started with Cubian

Morse Code IP GPIO Introduction

GPIO入门

Home
This is the fun part of Cubian. Morse code is an old communication technology. It
Install Cubian
is so simple that makes it still very useful in some scenarios today. Consider the
Simple Video Player
following scenarios
VGA output
1. You have a monitor with DVI,VGA dual input but w/o HDMI
VGA输出
2. You forgot to buy a USB-TTL cable
3. You don't have the admin privilege to the router, even you know the Show 7 more pages…

cubieboard connected to the network, but you don't know the IP address.
Clone this wiki locally
If you still want to play your cubieboard you need to know the IP address.Here

https://github.com/cubieplayer/Cubian.wiki.git
comes the solution. Cubian will use Morse code to echo the IP address to you
once it owns one.  Clone in Desktop

Once the network connected, after 30 seconds (waiting for dhcp response). The
green LED will turned ON for 3 seconds, it reminds you need to focus your mind,
and prepare to write down the morse code. After the green LED turned OFF. The
blue LED starts to show the morse code to you.

Note,You just want to know the last 3 digits of IP address under most
circumstances, so the echo sequence is reversed. For example, if the IP address
is 192.168.1.100 the echo sequence will be 001.1.861.291 . the Morse code will
be

----- ----- O---- O-O-O- O---- O-O-O- ---OO -OOOO O---- O-O-O- OO--- ----O O----

It will take about 74 seconds to complete the process. Their is 2 seconds resting
time after each symbol.

https://github.com/cubieplayer/Cubian/wiki/Get-started-with-Cubian 1/5
9/30/2014 Get started with Cubian · cubieplayer/Cubian Wiki · GitHub

The map from blue LED lighting time to morse code

Lighting Time Means

0.5 sec O

1 sec -

Part of International Morse Code Table

Symbol Morse

0 -----

1 O----

2 OO---

3 OOO--

4 OOOO-

5 OOOOO

6 -OOOO

7 --OOO

8 ---OO

9 ----O

. O-O-O-

It's less fun but if you are in a hurry or don't know your morse very well you should
be able to spot the ip address with:

arp -a

SSH

The SSH Server port has changed to 36000 (default 22) to prevent somebody
using the scanner scan and hack your system. For the same security reason,
root user is NOT allowed to login via SSH. But you can use sudo -i command
to change to root after you logged in as a normal user via SSH.

The default username is cubie, password is the same as username, once your
logged in, you can do anything with sudo , and don't need to type the password
again.

ssh -p 36000 YOUR_CUBIEBOARD_IP -l cubie

Enable root

The root user is NOT enabled by default. You can enable it by the following
command
https://github.com/cubieplayer/Cubian/wiki/Get-started-with-Cubian 2/5
9/30/2014 Get started with Cubian · cubieplayer/Cubian Wiki · GitHub

cubie@Cubian:~# sudo passwd root


Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully

Connect to network

First of all, Do not use low level configuration tools such as ifconfig and ip
commands to configure an interface in up state.
For more details about network configuration, take a look at the official Debian
reference manual

1. Wired
There is already a default configuration for you.

cubie@Cubian:~# sudo cat /etc/network/interfaces


auto eth0
allow-hotplug eth0
iface eth0 inet dhcp

Explanations:
auto eth0 means auto config interface eth0 on start up
allow-hotplug eth0 and iface eth0 inet dhcp means when the Linux
kernel detects the physical interface eth0, the allow-hotplug stanza causes
ifup to bring up the interface and the iface stanza causes ifup to use DHCP to
configure the interface.
Note:This configuration will bring up your RJ45 network interface on startup,
and try to config it through dhcp service. If you don't plugin network cable,
it will block the startup for 1 minute waiting for DHCP timeout then
continue to boot up.
If you absolutely don't need the wired network,plase disable this feature by
comment or delete auto eth0 at /etc/network/interfaces , It will save a lot
of time for you on system start up. To comment it, just add a # before the
line auto eth0 ,It will looks like #auto eth0
You can still bring up and config the wired interface manually, just do

cubie@Cubian:~# ifup eth0

If you want to use static IP configuration, There is a sample below

allow-hotplug eth0
iface eth0 inet static
address 192.168.11.100
netmask 255.255.255.0
gateway 192.168.11.1
dns-domain example.com
dns-nameservers 192.168.11.1

It should be familiar with you.

2. Wireless

i. Check that there is wlan0 interface in iwconfig's output. If there isn't,


modprobe the necessary module (e.g. "modprobe bcmdhd" for
https://github.com/cubieplayer/Cubian/wiki/Get-started-with-Cubian 3/5
9/30/2014 Get started with Cubian · cubieplayer/Cubian Wiki · GitHub

cubietruck).

ii. Open (No Password)

Modify the network configuration file

cubie@Cubian:~# sudo cat>>/etc/network/interfaces<<EOF


>allow-hotplug wlan0
>iface wlan0 inet dhcp
> wireless-essid mynetwork
>EOF

Then, connect to network by execute

cubie@Cubian:~# ifup wlan0

If you want to connect network on system start up, just add

auto wlan0

iii. WEP
Warning: WEP encryption has been proven insecure and can be
cracked in a few minutes using free utilities that can be
downloaded from the Internet.Never use it if your network is
sensitive. Modify the network configuration file

cubie@Cubian:~# sudo cat>>/etc/network/interfaces<<EOF


>allow-hotplug wlan0
>iface wlan0 inet dhcp
> wireless-essid mynetwork
> wireless-key1 1234567890
>EOF

Then, connect to network by execute

cubie@Cubian:~# ifup wlan0

If you want to connect network on system start up, just add

auto wlan0

iv. WPA/WPA2
First, you need to generate PSK (Pre Shared Key).

cubie@Cubian:~# wpa_passphrase "mynetwork" "1234567890" | grep psk=[a-f,0-9]


psk=000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f

Then, modify /etc/network/interfaces add network configuration

cubie@Cubian:~# sudo cat>>/etc/network/interfaces<<EOF


>allow-hotplug wlan0
>iface wlan0 inet dhcp
> wpa-ssid mynetwork
> wpa-psk 000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f

https://github.com/cubieplayer/Cubian/wiki/Get-started-with-Cubian 4/5
9/30/2014 Get started with Cubian · cubieplayer/Cubian Wiki · GitHub
>EOF

Then, connect to network by execute

cubie@Cubian:~# ifup wlan0

If you want to connect network on system start up, just add

auto wlan0

Config DateTime

The datetime will be configured automatically through ntp service on each time
the system starting up and connected to internet.
You can sync the datetime from internet ntp server manually.

cubie@Cubian:~# sudo ntpdate-debian


29 May 19:52:44 ntpdate[6746]: adjust time server 212.26.18.41 offset 0.008102 sec

Cubian update

It's a good idea to keep the kernel and drivers, firmwares to the latest version.

apt-get install cubian-update


sudo cubian-update

© 2014 GitHub, Inc. Terms Privacy Security Contact  Status API Training Shop Blog About

https://github.com/cubieplayer/Cubian/wiki/Get-started-with-Cubian 5/5

Das könnte Ihnen auch gefallen