1.4. Prepare SD card

1.4.1. Download and install SD card image

The next procedure will create a clean SD card.

  1. Download the Red Pitaya SD card image:
../../../_images/microSDcard-RP.png
  1. Unzip the SD card image.
  2. Write the image onto a SD card. Instructions are available for various operating systems:
  1. Insert the SD card into Red Pitaya.

    ../../../_images/pitaya-quick-start-insert-sd-card.png

1.4.1.1. Windows

  1. Insert SD card into your PC or SD card reader.

    ../../../_images/SDcard_insert.jpg
  2. Download Win32 Disk Imager and extract it.

    ../../../_images/SDcard_Win_Win32DiskImager.png
  3. Open unzipped folder, right-click on the WinDisk32Imager, and select Run as Administrator.

    ../../../_images/SDcard_Win_RunAsAdmin.png
  4. Under image file box select unzipped Red Pitaya image file.

    ../../../_images/SDcard_Win_SelectImg.png
  5. Under device box select the drive letter of the SD card.

    ../../../_images/SDcard_Win_SelectDrive.png

    Note

    Be careful to select the correct drive. If you choose the wrong one you risk erasing data from the computer’s hard disk! You can easily see the drive letter (for example E:) by looking in the left column of Windows Explorer.

    ../../../_images/SDcard_Win_DriveLetter.png
  6. Click Write and wait for the write to complete.

    ../../../_images/SDcard_Win_Write.png
  7. Exit the Imager.

    ../../../_images/SDcard_Win_Exit.png

1.4.1.2. Linux

1.4.1.2.1. Ubuntu using Image Writer

  1. Right click on the extracted SD card image and select Open With > Disk Image Writer.
  2. In the Restore Disk Image window select your SD card in the Destination pull down menu. Be carefull to select the correct device, use the size for orientation (for example 4GB SD card).
  3. You will be asked to confirm your choice and enter a password. Additiona dialog windows will again show the selected destination drive, take the oportunity to think again if you choose the right device.

1.4.1.2.2. Command line

Note

Please note that the use of the dd tool can overwrite any partition of your machine. If you specify the wrong device in the instructions below, you could delete your primary Linux partition. Please be careful.

  1. Insert SD card into your PC or SD card reader.

    ../../../_images/SDcard_insert.jpg
  2. Open the Terminal and check the available disks with df -h. Our SD card is 4GB, it is named /dev/sdx and divided into two partitions /dev/sdx1 and /dev/sdx2. The drive mounted at / is your main drive, be carefull not to use it.

    $ df -h
    Filesystem      Size  Used Avail Use% Mounted on
    /dev/sdx1       118M   27M   92M  23% /media/somebody/CAD5-1E3D
    /dev/sdx2       3.2G 1013M  2.1G  33% /media/somebody/7b2d3ba8-95ed-4bf4-bd67-eb52fe65df55
    
  3. Unmount all SD card partitions with umount /dev/sdxN (make sure you replace N with the right numbers).

    $ sudo umount /dev/sdx1 /dev/sdx2
    
  4. Write the image to the SD card with the following command. Replace the red_pitaya_image_file.img with the name of the unzipped Red Pitaya SD Card Image and replace /dev/device_name with the path to the SD card.

    $ sudo dd bs=1M if=red_pitaya_image_file.img of=/dev/device_name
    
  5. Wait until the process has finished.

1.4.1.3. macOS

1.4.1.3.1. Using ApplePi-Baker

  1. Insert SD card into your PC or SD card reader.

    ../../../_images/SDcard_insert.jpg
  2. Download ApplePi-Baker and extract it.

    ../../../_images/SDcard_macOS_ApplePi-Baker.png
  3. Press crtl key and click on ApplePi-Baker icon, then click Open in order to run it.

    ../../../_images/SDcard_macOS_open.png
  4. Enter your admin password and click OK.

    ../../../_images/SDcard_macOS_password.png
  5. Select SD card drive. This can be recognized by the size of the card that is 4GB.

    ../../../_images/SDcard_macOS_ApplePi-Baker_drive.png
  6. Select Red Pitaya OS image file.

    ../../../_images/SDcard_macOS_ApplePi-Baker_image.png
  7. Click “Restore Backup” button in order to write image to SD card.

    ../../../_images/SDcard_macOS_ApplePi-Baker_restore.png
  8. It’s coffee time, application will show you Estimated Time for Accomplishment.

    ../../../_images/SDcard_macOS_ApplePi-Baker_wait.png
  9. When operation is completed click “OK” and quit ApplePi-Baker.

    ../../../_images/SDcard_macOS_ApplePi-Baker_quit.png

1.4.1.3.2. Command line

  1. Insert SD card into your PC or SD card reader.

    ../../../_images/SDcard_insert.jpg
  2. Click cmd + space, type Disk Utility into the search box and press enter. From the menu select your SD card and click on Erase button (be careful not to delete your disk!).

    ../../../_images/SDcard_macOS_DiskUtility.png
  3. Click cmd + space, type in Terminal and press enter. In the terminal window type: cd, press enter, then type: cd Desktop and press enter again.

  4. Unmount the partition so that you will be allowed to overwrite the disk. In Terminal type: diskutil list and press enter. This will show you the list of all memory devices.

    ../../../_images/Screen-Shot-2015-08-07-at-16.59.50.png

    Unmount with: diskutil UnmountDisk /dev/diskn (insert the number n of your disk correctly!)

    ../../../_images/Screen-Shot-2015-08-07-at-17.14.34.png
  5. Type in: sudo dd bs=1m if=path_of_your_image.img of=/dev/rdiskn (Remember to replace n with the number that you noted before!) (notice there is letter r in front of the disk name, use that as well!)

    ../../../_images/Screen-Shot-2015-08-07-at-17.14.45.png
  6. Type in your password and wait a few minutes for the image to be written.

  7. When the image is written, type: diskutil eject /dev/diskn and press enter.

  8. Safely eject the SD card.

1.4.2. Background

A Red Pitaya SD card contains two partitions:

  1. 128MB FAT contains the ecosystem
    • boot files: FSBL, FPGA images, U-Boot, Linux kernel
    • Red Pitaya API libraries and header files
    • Red Pitaya web applications, scripts, tools
    • customized Nginx web server
  2. ~4GB Ext4 contains the OS
    • Ubuntu/Debian OS
    • various libraries
    • network setup customization
    • systemd services customization

Most of Red Pitaya source code translates into the ecosystem, Therefore this is updated more often. The OS is changed less frequently.

Note

You can find older and development Red Pitaya OS images and Ecosystem zipfiles on our download server.

Note

A list of new features, bugfixes and known bugs for each Red Pitaya release can be found in our CHANGELOG.

1.5. Upgrading Red Pitaya software

Instead of writing the whole SD card image, it is possible to upgrade only the ecosystem.

1.5.1. Web interface upgrade

At boot Red Pitaya checks for software updates, and alerts the user if a new release is available. Users can also check for updates manually.

  1. Open Red Pitaya desktop using your WEB browser.

  2. Click on the upgrade alert or on the ecosystem version label in bottom right corner.

    ../../../_images/SDcard_upgrade_desktop.png
  3. Select ecosystem version and start OS updater

    ../../../_images/SDcard_update_manager.png
  4. Follow the steps in the OS updater app in order to install new OS.

Note

OS upgrade might cause your Red Pitaya desktop to freeze for a few minutes.

1.5.2. Manual upgrade

A manual upgrade allows you to fix a corrupted SD card image (if only the FAT partition is corrupted) or to install older, newer or custom ecosystem zip files.

  1. Download a zip file from our download server.
  2. Insert SD card into card reader.
  3. Delete all files from the FAT partition. Use Shift + Delete to avoid placing files into a trash bin on the same partition.
  4. Extract the ecosystem zip file contents onto the now empty partition.

If you wish to keep wireless settings skip deleting the next files:

  • wpa_supplicant.conf
  • hostapd.conf