General Category > Blogs

Raspberry Pi and Python

(1/2) > >>

Dragon:
I recently picked up a book called Raspberry Pi 3 Cookbook for Python Programmers, so here we go.  ;D

Out come the Raspberry Pi hardware again. It's been sitting on the shelf for much too long.

I couldn't remember sure which versions of the hardware that I have. Fortunately I found a handy reference: https://www.raspberrypi-spy.co.uk/2012/09/checking-your-raspberry-pi-board-version/

I also discovered that https://www.raspberrypi.com/software/ has a Raspberry Pi Imager program that can be run on Windows, Linux, or Mac, to make it even easier than before to setup the Raspberry Pi OS onto an SD card than it was last time I had tried it.

Dragon:
On my quest, I've discovered that I have Raspberry Pi B+ with 512 MB RAM, which unfortunately doesn't have Wi-Fi built in. I do have an old Ativa Wireless USB Network Adapter, but it wasn't just plug-and-play.

I found a list of tested Wi-Fi Adapters, https://elinux.org/RPi_USB_Wi-Fi_Adapters, but the Ativa AWGUA54 was not on the list.

A quick Google search and I've come across this: 

--- Quote from: https://forums.raspberrypi.com/viewtopic.php?t=95539 ---...you can use USB adapters if they have Raspberry PI (Linux for ARM6) drivers.
--- End quote ---

And on another site:

--- Quote from: http://en.techinfodepot.shoutwiki.com/wiki/Ativa_Wireless_G_USB_Adapter_(AWGUA54) ---This adapter is the same as the Belkin F5D7050 v4.

--- End quote ---

Back to the first list, the entry for the Belkin says "install firmware-ralink and add usbcore to /etc/modules; use guide" and links to another site. A blogger explained the process of installing the drivers for the Raspberry Pi on Raspberry Pi Wireless - Belkin 802.11g usb adapter Ralink RT2750W.

Dragon:
I saw on the previously mentioned website that the drivers were available at http://ftp.uk.debian.org/debian/pool/non-free/f/firmware-nonfree/firmware-ralink_0.28+squeeze1_all.deb, unfortunately, the file doesn't exist there anymore. However, I did take a look in
http://ftp.uk.debian.org/debian/pool/non-free/f/firmware-nonfree/ and found a more recent Ralink file: firmware-ralink_20190114-2_all.deb. Also, https://archive.debian.org/debian-archive/debian/pool/non-free/f/firmware-nonfree/ does have the firmware-ralink_0.28+squeeze1_all.deb and 5 others that appear to be in between those.   

Dragon:
Looks like the Ralink firmware isn't the right thing for this hardware. Running a different command, lsusb, I see [Zydas ZD12118] at the end of the line for the Belkin Components, so I'm going to try installing the zd1211 firmware, which is actually the same one mentioned on page 56 in the book I got.


--- Code: ---sudo apt-get install firmware-zd1211
--- End code ---

Dragon:
As a follow up to my previous comment, the USB adapter for Wi-Fi is working now.

Continuing into the 2nd chapter of Raspberry Pi 3 Cookbook for Python Programmers, I've found that I needed to install scikit-learn to have the necessary datasets. While trying to install scikit-learn on my RPI the other day, which was taking a very long time, the system went to sleep. The screen would go black after about 10 minutes and I was thinking it might be helpful to adjust the power settings so it wouldn't do that. The GUI doesn't have anything that I could find to change it, but I did find some command line stuff that worked without installing anything more.


--- Quote from: https://stackoverflow.com/questions/30985964/how-to-disable-sleeping-on-raspberry-pi#58698636 --- I found there are two settings that have to be changed as either one of them will blank the screen in ten minutes under the default settings.
set screen saver timeout to zero:

xset s 0

and set dpms (EnergyStar) to disabled:

xset -dpms

This way I haven't needed to install anything (no screensaver). It was confusing because I'd tried both items, but it wasn't until I learned they both were blanking the screen at ten minutes that I saw what was going on.
As this has tested out OK, the next step for me is to put them into an autostart routine.
ps Verify your settings with

xset q

--- End quote ---

Navigation

[0] Message Index

[#] Next page

Go to full version