Staffan Ek
Posts: 1
Joined: Tue Oct 17, 2017 7:42 pm

Problems of a kind I can not describe

Tue Oct 17, 2017 8:04 pm

Hello
I am having problems but since I belong to the target market of this cute little education device a can not describe the nature of it in the subject field, less make any good descriptions of fault finding of the kind "I tried sudo x but then y happened". I have to revert into plain English and hope that some friendly person out there can help med (I have posted on a few forums more connected to the applications I try to run).

I wanted to use my Pi for home automation. Having discovered MySensors and the possibility to build sensors of my own with Arduino. I am quite experienced with programming Arduino and designed and programmed walking robots on my own.

So I decide to try some sort of controllers on my Pi to control my sensor network and go on with downloads. What I have tried with zero success is MyController, PiDome and Domoticz. All have one thing in common. Logging in is typically done by writing in the form ipnumber:port, as example localhost:8080 or 127.0.0.1:8080 sometimes the IP number I get when typing localhost -I. This were the fun stops. It doesn't work!

I get the message "Connection refused". I have no clue why. I have the latest version of the Raspbian OS (using NOOBS since I am one). I reinstalled it a few times (doing a new download of NOOBS and copying to the SD card) so I was sure that the installation was fresh. Browsing and working with other applications work. The computer itself seems OK.

So what can be the problem?

I have spent one full Sunday and two evenings swearing over my Pi and my family is missing me.

Staffan

steveb4pi
Posts: 62
Joined: Sun Aug 11, 2013 6:12 pm

Re: Problems of a kind I can not describe

Sun Oct 22, 2017 10:12 am

I assume you are using 'LITE' not l'NOOBS or Desktop (if you are using NOOBS / Desktop, you need a HD screen pluggind into the Pi and a Keyboard plugged into the USB socket plus it neds Internet acess so you still need the Ethernet cable so that means using a USB hub in the Pi zero)

If you have LITE you need to 'allow' network access tot he Pi by placing a 'flag' (file) called 'ssh' in the Pi boot partition == the FAT32 partition of the SD card

Move the SD card into a SD Reader on your PC/laptop, 'open' the card ... in Windows you should see about 40Mb 'FAT32' partition ==
Create a new file in the FAT32 == 'ssh' (3 letters only, NOT a ssh.txt - file can be empty, Pi just needs the name) .. this allows connection from a PC running the PuTTY command terminal tool ..

Put the card back in the Pi and boot it ..I assume you have a micro-USB Eternet 'dongle' plugged into your LAN .. if you have a screen attached to the Pi you will see it's DHCP obtained IP address at then end of the bootup 'log' .. IF no screen, then you either need to look in your Router for the address DHCP assigned to the Pi (or you need the Apple 'Bonjour' service that lets you use 'names' rather than IP addresses)

From PuTTY, you enter the Pi's IP, then 'log in' to the pi user 'pi', password 'raspberry'

Finally - in Linux NOTHING is easy .. for a start files don't have 'execute' permissions by default (so you can't just use the 'nano' text editor to craete a BASH shell-script (.sh) and expect it to run ... you have to 'sudo chmod +x myflie.sh' first) and since the 'pi' user is like Windows 'guest'. (ie. 'pi' user has few rights) you have to prefix just about anything with 'sudo' (means 'super user do')

Good Luck !
Last edited by steveb4pi on Sun Oct 22, 2017 1:57 pm, edited 1 time in total.

drgeoff
Posts: 11227
Joined: Wed Jan 25, 2012 6:39 pm

Re: Problems of a kind I can not describe

Sun Oct 22, 2017 11:07 am

1. Yes nothing seems easy in Linux if you have been brainwashed by Windows.

2. Using sudo everywhere is not the correct solution.
Quis custodiet ipsos custodes?

User avatar
B.Goode
Posts: 10725
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Problems of a kind I can not describe

Sun Oct 22, 2017 2:35 pm

So I decide to try some sort of controllers on my Pi to control my sensor network and go on with downloads. What I have tried with zero success is MyController, PiDome and Domoticz. All have one thing in common. Logging in is typically done by writing in the form ipnumber:port, as example localhost:8080 or 127.0.0.1:8080 sometimes the IP number I get when typing localhost -I. This were the fun stops. It doesn't work!

I get the message "Connection refused". I have no clue why. I have the latest version of the Raspbian OS (using NOOBS since I am one). I reinstalled it a few times (doing a new download of NOOBS and copying to the SD card) so I was sure that the installation was fresh. Browsing and working with other applications work. The computer itself seems OK.

So what can be the problem?
It looks as though you are attempting to access some sort of 'web' service on your RPi? (Deduced from the fact that you are specifying port 8080.) Presumably you enter this into a web browser? Is the browser running on the RPi or on another machine on the same network?

What steps have you taken to get a web server running to respond to that connection request? Have you verified that the server is actually running?

(If I am correct about you trying to use port 8080 then all the previous advice about enabling access via SSH is a diversion.)

Return to “Troubleshooting”