Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x

Raspberry Pi

141

Solutions

258

Contributors

The Raspberry Pi Foundation works to put the power of digital making into the hands of people all over the world, so they are capable of understanding and shaping our increasingly digital world, able to solve the problems that matter to them, and equipped for the jobs of the future.

We provide low-cost, high-performance computers that people use to learn, solve problems and have fun. We provide outreach and education to help more people access computing and digital making. We develop free resources to help people learn about computing and how to make things with computers, and train educators who can guide other people to learn.

Share tech news, updates, or what's on your mind.

Sign up to Post

I have tried various approaches to logging in as the root to mysql deployed on a raspberry pi 3.  I keep getting a 1698 error.  I can login under sudo.  Thanks
0
So I'm embarking on a new adventure, that of learning Python, and I'm trying to get some insights on...well, the questions I don't know enough to ask. So here's a list of what I'm trying to accomplish and perspectives/suggestions I'm hoping to gather from the EE community:

Your thoughts on:
  1. Embracing an incredibly loose language (I'm not used to that).
  2. Picking up learning techniques and perspectives which:
        a. Lend themselves to writing code for a broad variety of settings (ie. AI development, microcontroller coding (RPi, Arduino), robotics, IOT). I don't want find out later that I've wasted my time (eg. find out that I should have stuck with Python inside Visual Studio instead of going to the trouble of learning Pycharm -- or a similar kind of misstep).
  3. Biggest surprises and gotcha's coming from the .NET world to Python.  
  4. Anything else you can think of that I really need to know to make Python easier to pick up and make me the most versatile Python coder I can be.

By the way, I've not done any Raspberry Pi or Arduino coding yet (or AI stuff) yet. I'm a programmer by trade, just not in those areas.
0
good day, I am testing serial port communciation on raspberry pi 3 interface with SIM 900 module. The code are attached with error message. Thanks

import serial
import os, time
 
# Enable Serial Communication
port = serial.Serial("/dev/ttyS0", baudrate=38400, timeout=1)
 
# Transmitting AT Commands to the Modem
# '\r\n' indicates the Enter key
 
port.write('AT'+'\r\n')
rcv = port.read(10)
print (rcv)

>>> 
======================== RESTART: /home/pi/SIM900.py ========================
Traceback (most recent call last):
  File "/home/pi/SIM900.py", line 1, in <module>
    import serial
  File "/home/pi/serial.py", line 5, in <module>
    port = serial.Serial("/dev/ttyS0", baudrate=38400, timeout=1)
AttributeError: module 'serial' has no attribute 'Serial'
>>>
0
Hi, I am monitoring weather status remotely. I am intend to use Huawei E303F -usb dongle to push data. I did try sakis3g, doesn't help auto-connection after restart. please do assist me how to set internet connection automatically after restart and network down.
0
Congratulations to our High-Tech Treats winners!

1st Place: Razi Riaz
Prize: PS4 Pro
2nd Place: Geri Hames
Prize: Echo Dot
3rd Place: Robert Coan
Prize: Raspberry Pi 3

Thank you to all who participated! Be on the lookout for future tech gadget giveaways.
1
 
LVL 8

Expert Comment

by:Mark Bill
well done guys

well done EE
0
Good day, I am newbie in python programming. Can get some information on treading (multi processing). I am doing project with raspberry pi 3 to monitor the following sensor: -
1. temperature
2.humidity
3. CO
At same time using 3g USB dongle to push data to cloud. My critical issue is 3g USB dongle, need to monitor that everytime.
0
This is using a raspberry-pi. My co-worker has defined a bridge called br-lan on top of the physical eth0. Please see attached docx for ifconfig command. Please also see the networking settings on /etc/network/interfaces, /etc/network/interfaces.d/br-lan, and /etc/dhcpcd.conf files. See the ip addressing settings of br-lan as follows:

       ip - 192.168.100.199
       mask - 255.255.255.0
      default gateway - 192.168.100.2
     dns - 203.211.152.66

However, the default gateway setting doesn't seem to work. Please see the results of route -n. I also try to set br-lan to dhcp, and the result is, eth0 grabs the ip - 192.168.100.199.

Appreciate for any help. Thanks in advance.
0
Issue:
Python Script will not run because sshtunnel import to Python 3 does not seem import properly to the Pi.
I am thinking we are using the wrong version of ssh module python script for the Pi but I am struggling.  

 Hardware :
Raspberry Pi 3 Model B -  V 1.2  2015

OS Software :
pi@raspberrypi:~ $ cat /etc/*-release
PRETTY_NAME="Raspbian GNU/Linux 8 (jessie)"
NAME="Raspbian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=raspbian
ID_LIKE=debian

Script:
import sshtunnel #import SSHTunnelForwarder
import mysql.connector

ID_String_Last = ["0"]

sshtunnel.SSH_TIMEOUT = 5.0
sshtunnel.TUNNEL_TIMEOUT = 5.0

with sshtunnel.SSHTunnelForwarder(
    ('**********this is the host in here **********'),
    ssh_username='', ssh_password='**********************',
    remote_bind_address=('127.0.0.1,', 3306)
) as tunnel:
    connection = mysql.connector.connect(
        user='*********username**********', password='*****************',
        host='127.0.0.1', port=tunnel.local_bind_port,
        database='northgm7_489.log_1001',
    )


Output:
Python 3.4.2 (/usr/bin/python3)
>>> %Run '17-10- 15 V6.1 Pi mySQL to Ash server.py'
Traceback (most recent call last):
  File "/home/pi/Desktop/17-10- 15 V6.1 Pi mySQL to Ash server.py", line 3, in <module>
    import sshtunnel #import SSHTunnelForwarder
ImportError: No module named 'sshtunnel'


Question:
Does anybody know what version of module is required for this platform so that it …
0
Hello All

I am saying sorry in advance because I know less than zero about the capabilities of the Raspberry Pi, so if my question sounds stupid, take it from where it is coming from :D

Can a Pi run a pre-made GUI interface like windows or do I have to program my own?  If it can run a windows-looking OS can it connect to the internet? If the Pi loses power, when power returns can it be setup (like in windows there is an area for programs to begin at startup) so that the GUI comes back up and the internet automatically reconnects to a site?

Thanks!
0
Hi

I have a Raspberry Pi 3 Model B that a supplier gave me for a demo unit. It runs their OS for their demo software.

I want to try another application today using the Raspian OS. I have a 2nd new formatted SD Card.

Can I just swap the SD Cards in the Pi and install Raspian on the new card or could there be some files/configs from the original OS&app that are stored on some local storage (ie not purely on the SD Card)?

In other words, by swapping the new SD Card into the Pi and installing Raspbian on it, could I damage the original OS or is it 100% contained on the original SD Card? After this new test, I need to go back to the original OS (by inserting the original SD Card).

And yes, I know that Rapsberry Pi's are really cheap, but I can't get one until tomorrow and need to test something today.

ThanksQ!
0
Thank you for your time to read & answer this question.

So, the project I am currently doing is a child car alert system using RPi 3 Model B. The RPi would be able to detect the temperature, sound and presence of the child (PIR Sensor) from a child car seat in a vehicle then the Android app through BLE will be able to receive and display data from the RPi & send alert through app when sensors in RPi is triggered (i.e. high temperature in car).

So far, I have managed to build the RPi board with all sensors attached using Adafruit IDE in Raspbian. The problem now is building an Android app that could connect to my RPi board. I have researched some viable options and mostly suggested App Inventor. Is this true?

I am hopeful if anyone could guide me through any webpage or video tutorial on how to execute my project as I am very inexperienced in using RPi.

P.S: I am very new to RPi (~ 3 months) and learn solely from the Net so I appreciate any comments or tips from other experienced users on how to carry on with this project.
0
I am trying to install wordpress on my Raspberry Pi. I can install apache2 and php without a problem
When I try and install MySQL I dont get asked to change the Password after the install
Also when I try to install php5-mysql I get an error saying dependency is missing

How do I fix this so I can continue the Wordpress install
0
USB GPS Detection on Raspberry PI

I have some python code that scans WIFI packets and in my receiver code I have an instance of a GPSPoller class.

The issue I am having is that withing the gps library gpscommon.read() blocks when there is no GPS dongle connected to the Pi.

I couldn't seem to find an elegant way to check to see if gpds has any devices added to its device pool so I could skip my code that starts polling gpsd for position data.

I don't want to write code to check for /dev/ttyUSB0 as that does not seem like a very elegant solution.

Can anyone provide advice?
0
 

Author Comment

by:spencerturbine
lsusb would list my device but then I would have to write software that looks for the specific device. If I swapped out the receiver for a different kind I would have to change the code to take that into account.

I hope there is a better way to do it that lsusb.
0
 

Expert Comment

by:Mark Wieder
Yeah, if you want the code to be more generic (how often do you intend to swap out a different gps dongle?) then lsusb probably won't help here. You might try setting up a socket connection to port 2947 and trap the error, but you'll have to do this before instantiating the gps class because the class initializer does that as well.
0
pip install twilio
works perfectly on a Pi2.   Just bought a new Pi3 with the latest NOOB.  
same version of python (2.7.9), same version of pip (1.5.6).  I keep getting the error:

TypeError: __str__ returned non-string (type Error)

Googling around, I checked and verified that
- no network issue, Chromium connects to https://pypi.python.org/simple/twilio/
- my date/time on the computer is correct
- some talk about --trusted-host=http://pypi.python.org/simple/ but that parameter is not valid on pip
- some talk about creating an /etc/pip.conf file and adding trusted-host=pypi.python.org but that makes no difference (assuming pip every reads that file...)

My guess is that it has something to do with the SSL certificates... but I have no idea how to solve it.  
sudo apt-get install libssl-dev did not help

Thoughts?
pip.log
0
Hi all,

I am using Backuppc, installed on a Linux server, to backup one of my Raspberry Pi.

I've configured the host as you see here:
backuppc_host_settings.png
But, when I run my full backup, I can still see the /mnt folder and its files into it:
backuppc_folders.png
What am I doing wrong?
0
My son has set up a Raspberry Pi in the home to display images. He enabled FTP and told me to connect via WinSCP. I have done this, and I see all the folders on the Raspberry Pi. However, I cannot upload images or do anymodifications on the raspberry pi due to a permissions problem.

Any ideas what could be the cause of this?

I am logging in with his username and password, which has full rights to the Pi.

Thank you.
1
I have about 80 desktop users. Each has an APC SmartUPS.  We've never bothered connecting them via USB to the computers because we didn't want to contend with the PowerChute management software.  But this is no good. As it is, the way I usually find out that a battery is no good is when we have a power outage and someone's UPS fails. I need to get a better system than that :-)

Has anyone found a centralized UPS management solution? APC has a business edition of PowerChute, but it's limited to just 25 devices. What's up with that? I need a that could monitor and manage all of our UPS devices.

Someone should build a Raspberry Pi solution for this that connects to the UPS via USB and the network via WiFi.
0
How do I embed VideoLan VLC player in a HTML webpage on Raspbian on RPi3?
0
I would like a script to change audio output from HDMI to Bluetooth (and vice versa) for a Raspberry Pi 3. Not knowing scripting on linux (Raspbian). I have the bluetooth enabled.

Also would like to run this script from a remote computer.

Any assistance appreciated.
0
Hi everyone,

So I've spent the past week reading and trying to understand the python language and more importantly the CherryPy web framework.
To be honest Im getting no-where quickly...

What I'm trying to do is simply build a frontend to a Raspberry Pi project I've been developing.
The CherryPy web framework seems perfect for this as it is small and contains its own web server that would suite my needs perfectly.

An admin user attaches to the Raspberry PI AP and is immediately directed to a webpage (This I have solved quite easily).
The webpage is presented by the CherryPy web server.

I have an index.html which it returned from my CherryPy script.

import os, os.path, sys
import cherrypy

# Configuration file to access server over network and define ports
cherrypy.config.update("server.conf")

class menu(object):
    @cherrypy.expose
    def index(self):
        return open('index.html')

(Fairly simply until now I know)

What I would like to do is have buttons on my index.html that can be pressed and return os.system('mkdir boom')  (obviously my system commands will be a little more than this.. They will start and stop services.

The buttons will eventually be toggle switches, so going to the page will need to return the current status of the running process. Red if the process is not running and Green if it is running. I think I need to be interacting with jquery on my index.html page to achieve this...

This whole area is new to me and …
0
Which is the best handheld device for learning programming and later also developing programs on the go anywhere?

So that I can write a few lines of code on the metro, bus, when waiting for a flight etc.

I was thinking of this Raspberry Pi, but some don't recommend it for learning programming.

Is there any other alternative, something with long battery life in the size of a big smartphone (or maybe 9 inches display)?
0
Hello,

Recently I used the Retropie emulation software for Raspberry Pi. It is a really cool software and is very handy and attractive. So, I was wondering whether I could replicate these softwares on sd cards, install them on pis and start selling them for some small scale business. I would like to know, if doing such a thing would be legal. Actually, there are quite few ideas about using pis as portable media centers, portable game consoles, a simple portable desktops or just a cheap monitoring cameras. It can be customized to the very end for users and can be an attention grabber in certain circles. But what would be my legal position and what, if any, licensing would it require to start such a business?

Thanks in advance.
0
Is it possible to program the Raspberry PI camera to do OCR?
Need it to recognize a list of characters and when seen, write the info to a file.  
Need the following info with each entry;
Captured data
Date and time (down to the second)
Location (can be GPS or user entry)

And once a day (or at user request) upload data to a online database.
0
I need a code in Embedded C for making call andi sending SMS by using Raspberry pi 3 and GSM SIM 900. Please help me. I am new to Raspberry pi
0
I have FreeRadius installed on a Raspberry Pi and would like to know how to enable Accounting.

Thanks
0

Raspberry Pi

141

Solutions

258

Contributors

The Raspberry Pi Foundation works to put the power of digital making into the hands of people all over the world, so they are capable of understanding and shaping our increasingly digital world, able to solve the problems that matter to them, and equipped for the jobs of the future.

We provide low-cost, high-performance computers that people use to learn, solve problems and have fun. We provide outreach and education to help more people access computing and digital making. We develop free resources to help people learn about computing and how to make things with computers, and train educators who can guide other people to learn.