Debian Jessie

From FriendlyELEC WiKi
Jump to: navigation, search

1 Working with Debian

1.1 Ethernet Connection

  • If the board is connected to a network via Ethernet before it is powered on, it will automatically obtain an IP after it is powered up.

1.2 Wireless Connection

Under Debian you can manage your network with NetworkManager.
After Debian boots click on the network icon on the bottom right of the task bar a NetworkManger menu will pop up and all the available networks will be listed. If there is an active wireless network you will see something similar to the following screenshot:
NetworkManagerIcon
You can click on a WiFI AP and connect your board to it.
For more details refer to:NetworkManager.

1.3 Setup Wi-Fi AP

Follow the steps below. Since our OS image by default already has the NetworkManager utility you will be prompted to uninstall it first:

sudo turn-wifi-into-apmode yes

After you uninstall the NetworkManager reboot your board.
After your board is rebooted run the above commands again and you will be prompted to type in a WIFI's name and password. Type in your wanted name and password

If this is successful you will be able to find and connect your board to a WIFI. Login to your board at 192.168.8.1:

ssh root@192.168.8.1

Type in a password. In our system the password is "fa".

To login smoothly via SSH we recommend you turning off WIFI's power save mode by running the following commands:

sudo iwconfig wlan0 power off

You can check your WiFi's mode by running the following command:

sudo cat /sys/module/bcmdhd/parameters/op_mode

Number 2 means your WiFi is in AP mode. You can switch to the Station mode by running the following command:

sudo turn-wifi-into-apmode no

1.4 Bluetooth

Here are the steps to transfer a file from T2 to a mobile phone. Run the following command to search a surrounding Bluetooth device:

hcitool scan


In our example a mobile phone was detected and the following messages were listed:
Scanning ...
38:BC:1A:B1:7E:DD MEIZU MX4

These messages indicated that a MEIZU MX4 mobile phone was detected. We then checked the Bluetooth services this phone supported with its MAC address presented in front of its device name

sdptool browse 38:BC:1A:B1:7E:DD

Note: you need to use your device's name and its MAC address when you run these commands.

The command listed all the services the phone supported. We needed the "OBEX Object Push" service which is for file transfers.
Service Name: OBEX Object Push
Service RecHandle: 0x1000b
Service Class ID List:
"OBEX Object Push" (0x1105)
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 25
"OBEX" (0x0008)
Profile Descriptor List:
"OBEX Object Push" (0x1105)
Version: 0x0100

From the above messages we could get the channel number 25 for the "OBEX Object Push" service. We input this number to the "ussp-push" by running the following command:

ussp-push 38:BC:1A:B1:7E:DD@25 example.jpg example.jpg

Note: you need to use your device's name, its MAC address and channel number when you run these commands.

Usually after the above commands are run a popup window will show on the phone that communicates with T2 and you can start file transfers.

Common Issues:
1) If T2 cannot find a Bluetooth device you can try this command to restart its Bluetooth:

rfkill unblock 0

2) If any of these commands is not installed you can try this command to install it:

apt-get install bluetooth bluez obexftp openobex-apps python-gobject ussp-push

1.5 Install Debian Packages

We provide a Debian Jessie image. You can install Jessie's packages by commanding "apt-get". If this is your first installation you need to update the package list by running the following command

apt-get update

You can install your preferred packages. For example if you want to install an FTP server you can do this:

apt-get install vsftpd

Note: you can change your download server by editting "/etc/apt/sources.list". You can get a complete server list from [1]. You need to select the one with "armhf".

1.6 Audio Output from HDMI or 3.5mm Jack under Debian

Our default Debian image doesn't support audio output. If you want to enable this function you need to install the alsa package.

  •  Make sure your Debian OS is our latest version and your board has access to the internet;
  •  Power up your board and run the following commands on your board's commandline utility to install the alsa package:
apt-get update
apt-get install libasound2
apt-get install alsa-base
apt-get install alsa-utils
  • After the installation is done copy a ".wav" audio file to your board, connect your board to a earphone or speaker and try playing this audio file(By default Debian's audio output is from the 3.5mm audio jack):
aplay music.wav
  • By default Debian's audio output is from the 3.5mm audio jack. If you want audio output from the HDMI you need to change the setting by editing the "/etc/asound.conf" file:
pcm.!default {
    type hw
    card 1
    device 0}
 
ctl.!default {
    type hw
    card 1}

card 0 stands for the 3.5mm audio jack and card 1 stands for the HDMI audio. After you make your change reboot your board to make it effective.