Raspberry Pi

First use of your Raspberry Pi

The Linux OS is normally already installed in your SD Card, so you just need to put the SD Card on his place. You need a USB/microUSB to supply your Raspberry Pi, a keyboard to tape the command in the terminal. I think a mouse can be useful, if you are not an expert in Linux command. For the screen you need a HDMI screen or an adapter like me. There is no On/Off button the Raspberry Pi turn on when you connect the USB cable and the to turn off, but before you have to shut down the Raspberry Pi. A netork connection is useful too, to download library or update.


When you turn of the Raspberry Pi you can see the loading on the screen, it will ask you the login and the password, the default login and password are :

Login : pi

Password : raspberry


To go to the desktop you have to tape : startx


A simple C language program :

We will just show “Hello World !” on the terminal. To do this you need a blank file, where you will write this text :

#include "stdio.h"
 void main(void){ printf((" Hello World !\n"); }

Save it in “helloworld.c” and open the terminal, we have to compile first with this command : gcc helloworld.c -o helloworld
If there is no error nothing is write after this command.
To run the application you have to tape :  ./helloworld
Normaly you have this screen :



To install your Bluetooth and activate it we must tape this line :

sudo apt-get update
sudo apt-get install -y bluetooth bluez - utils blueman
sudo bluez-test-adapter discoverable on
sdptool add map
sudo bluez-simple-agent

Now you can find your Raspberry on your Android phone and pair them

You can search the device availabe with Bluetooth :

hcitool scan
    "Scanning ..."

To see which service is available with my device

sdptool search OPUSH                               
Inquiring ...                                                                   
Searching for OPUSH on 08:60:6E:A1:C0:76 ...                                    
Service Name: OBEX Object Push                                                  
Service RecHandle: 0x1000a                                                      
Service Class ID List:                                                          
  "OBEX Object Push" (0x1105)                                                   
Protocol Descriptor List:                                                       
  "L2CAP" (0x0100)                                                              
  "RFCOMM" (0x0003)                                                             
    Channel: 12                                                                  
  "OBEX" (0x0008)                                                               
Language Base Attr List:                                                        
  code_ISO639: 0x454e                                                           
  encoding:    0x6a                                                             
  base_offset: 0x100                                                            
Profile Descriptor List:                                                        
  "OBEX Object Push" (0x1105)                                                   
    Version: 0x0100

There is 2 thing interesting the protocol : OBEX ( OBject EXchange ), and the channel : 12.

To send an image we will use OBEX protocol, so we have to install it

apt-get install obexftp

I have download this picture and save in /home/pi


To download it directly :

wget http://smartsystems.eng.fau.edu/wp-content/uploads/sites/3/2014/05/pi.png

Now we want to send the picture

obexftp --nopath --noconn --uuid none --bluetooth 08:60:6E:A1:C0:76 --channel 12 -p pi.png

The picture is saved on the folder /storage/emulated/0/bluetooth