Saturday, September 27, 2014

Raspberry Pi - Pidora

Windows 7
SDFormatter 4.0
Win32DiskImager
PuTTY 0.63


Status:

  • 2014 09 27 - Wi-Fi working.
Install:
  • Download Pidora Operating System image (http://downloads.raspberrypi.org/pidora_latest)
  • Unzip downloaded file.
  • Use Win32DiskImager to write the image to SD card.
  • Connect a keyboard (USB) and monitor (HDMI) to the Raspberry Pi board.
  • Boot Raspberry Pi board with SD card.
Configure:
  • Configure keyboard, timezone, create user "pi", set root password, enable SSH service and DVI adapter. Reboot.
  • Login with default user and password (pi  raspberry).
Configure Wi-Fi:
  • su -     (use root password)
  • Installing ifconfig package:
  • yum provides ifconfig
  • yum install net-tools wpa_supplicant dhclient
  • chkconfig wpa_supplicant on
  • service wpa_supplicant start
  • chkconfig NetworkManager on
  • service NetworkManager start
  • reboot
  • Login as root and configure Wi-Fi Network:
  • nmcli dev wifi con "myssid" password "myssidpassword"
Checking Network:
  • iwconfig
  • iwlist scan
  • pifconfig
  • ifconfig
Update:
  • Login as root.
  • yum update      (zzz)
References:

Saturday, September 13, 2014

Installing Arduino IDE and Libs on Ubuntu 10.10 and Windows 7

Ubuntu 10.10
Windows 7 (64bits)
Arduino IDE 1.0.5 for Linux (32bits)
Arduino IDE 1.5.7 for Windows



Status:
  • 2014.09.14  It's working. 
Installing on Ubuntu:
  • sudo apt-get update
  • sudo apt-get install arduino openjdk-6-jre gcc-avr avr-libc
  • Plug and Check if Arduino device was detected (ttyACM0: USB ACM device):
  • lsusb
  • dmesg | grep tty

Setting the Permission on ttyACM0 (Linux only - All distro):
  • Check the owner group of the serial port:
  • ls -l /dev/ttyACM0
  • You will get something like "dialout" or "uucp".
  • Add our user (pi) to that group:
  • usermod -a -G dialout pi
  • Add our user (pi) to "lock" group (if you have filesystem-2012.6-2 or newer):
  • usermod -a -G lock pi
Installing on Windows:
Testing - Linux and Windows:
  • Double click on /~/arduino-1.0.5/arduino and choose "Run" (arduino.exe on Windows).
  • Select a serial port (menu: Tools->Serial Port->dev/ttyACM0) (COM4 on Windows).
  • If there is no serial port available then try one of those options.
  • Select a board (menu: Tools->Board->Arduino Uno).
  • See examples (menu: File->Sketchbook).
  • Open file serial_echo.ino with Arduino IDE and Upload.



Testing with Python:
  • We don't need any privileges, like when working with Arduino IDE (chmod 777 /dev/ttyACM0).
  • python
  • import serial
  • On Linux:
  • ser=serial.Serial(port='/dev/ttyACM0', baudrate=500000, timeout=1)
  • On Windows:
  • ser=serial.Serial(port='COM4', baudrate=500000, timeout=1)
  • ser.write('Testing...\n')
  • print ser.readline()
  • ser.close()
References:

Sunday, September 7, 2014

Raspberry Pi - Raspbian - 2015

Windows 7
SDFormatter 4.0
Win32DiskImager
PuTTY 0.63
Raspbian 2015-02-16


Status:

  • 05/04/2015 - Configuring Wi-Fi network
  • 07/09/2014 - Access allowed (SSH through Raspberry Pi ethernet adapter). 

Install:


Configure:
  • Configure keyboard, timezone, ssh service and camera-support (raspi-config).
  • Login with default user and password (pi  raspberry).
  • Configuring Wi-Fi:
  • sudo cp /etc/wpa_supplicant/wpa_supplicant.conf  /etc/wpa_supplicant/wpa_supplicant.conf.orig
  • sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
  • Go to the bottom of the file and add the code bellow.

  • sudo cp /etc/network/interfaces /etc/network/interfaces.orig
  • Allow hotplug and dhcp client to wlan0 network interface:

  • Save the file and reboot system.
  • Check network status:
  • sudo ifconfig wlan0

  • Tip for ubuntu 16.04 Server:
  • Do not need wpa_supplicant.conf file, just config ssid and psk in /etc/network/interfaces file. 
  • auto wlp3s0
  • iface wlp3s0 inet dhcp
  •        wpa-ssid network-name
  •        wpa-psk pre-shared-key
  • Configuring Ethernet cable network:
  • Allow hotplug to eth0 network interface:
  • sudo nano /etc/network/interfaces


  • Connect Ethernet cable to Raspberry Pi board.
  • sudo ifdown eth0
  • sudo ifup eth0
  • Check network status:
  • sudo ifconfig

  • sudo reboot
  • Connect the Raspbian OS through the network using ssh client (Putty for Windows).



  • Update packages:
  • sudo apt-get update
Troubleshoot:

  • With this interfaces file above, cannot use Realtek Wlan Adapter and keyboard at same time ("IRQ32 disabled after an error").
  • see file /var/log/syslog



References: