Go to advanced search

by DougieLawson
Wed Aug 15, 2018 1:57 pm
Forum: Networking and servers
Topic: Raspberry pi doesn't connect to internet
Replies: 20
Views: 335

Re: Raspberry pi doesn't connect to internet

What's in /etc/resolv.conf?
by DougieLawson
Wed Aug 15, 2018 1:54 pm
Forum: Troubleshooting
Topic: Bash Script when reboot
Replies: 10
Views: 89

Re: Bash Script when reboot

If you're going to stick with the old sysvinit stuff you need to add a bunch of LSB tags. It should also have "start", "stop" options in the script (take a look at /etc/init.d/skeleton if it still exists). But with Raspbian Jessie, Raspbian Stretch and other current DebIan derivatives you should use...
by DougieLawson
Tue Aug 14, 2018 11:35 pm
Forum: Networking and servers
Topic: Running Splunk on Raspberry Pi 3
Replies: 2
Views: 45

Re: Running Splunk on Raspberry Pi 3

Here are the specifications: SoC: Broadcom BCM2837 CPU: 4× ARM Cortex-A53, 1.2GHz GPU: Broadcom VideoCore IV RAM: 1GB LPDDR2 (900 MHz) There doesn't appear to be any version of Splunk for non-X86_64 processor architectures (unless you're running a special beta version from the vendor). So, how do y...
by DougieLawson
Tue Aug 14, 2018 11:20 pm
Forum: General discussion
Topic: New user no login
Replies: 3
Views: 89

Re: New user no login

Set the shell variable in /etc/password to /bin/false

Code: Select all

vpnonly:x:1200:1200::/home/vpnonly:/bin/false
You don't even need to create the /home/vpnonly directory.
by DougieLawson
Tue Aug 14, 2018 11:12 pm
Forum: C/C++
Topic: C and mysql query in a loop issue
Replies: 6
Views: 136

Re: C and mysql query in a loop issue

How about this version: #include <stdio.h> #include <unistd.h> #include <string.h> #include <my_global.h> #include <mysql.h> #define DATABASE_HOST "192.168.3.14" #define DATABASE_NAME "dbname" #define DATABASE_USERNAME "dbuser" #define DATABASE_PASSWORD "dbpasswd" int main (int argc, char * argv[]) ...
by DougieLawson
Tue Aug 14, 2018 7:53 pm
Forum: C/C++
Topic: C and mysql query in a loop issue
Replies: 6
Views: 136

Re: C and mysql query in a loop issue

Closing the connection in the loop is very bad. It costs lots of MySQL server CPU & I/O to establish a new connection each time.

I'd also like to see how proc_getTargetModeCwire() is defined.
by DougieLawson
Tue Aug 14, 2018 7:49 pm
Forum: Beginners
Topic: How to query a MS SQL DB with Pi ?
Replies: 2
Views: 48

Re: How to query a MS SQL DB with Pi ?

Try this Google search: "raspberry unixodbc mssql site:raspberrypi.org".
by DougieLawson
Tue Aug 14, 2018 7:46 pm
Forum: General discussion
Topic: Which operating system for Pi Zero W as access point, MQTT only
Replies: 28
Views: 516

Re: Which operating system for Pi Zero W as access point, MQTT only

Heater wrote:
Tue Aug 14, 2018 7:00 pm
Hmm... can you run an MQTT broker on an ESP ?

I doubt it.
You can run Nick O'Leary's pub/sub client code: https://github.com/knolleary/pubsubclient
But you can't run a broker.

The broker can be anywhere in the internet (LAN or WAN).
by DougieLawson
Tue Aug 14, 2018 12:28 pm
Forum: Python
Topic: pi to pi communication
Replies: 1
Views: 40

Re: pi to pi communication

python with mosquitto talking MQTT pub/sub is a simple well documented way to do that stuff.
by DougieLawson
Tue Aug 14, 2018 12:22 pm
Forum: Troubleshooting
Topic: Tutorial for MQTT on Raspbian Jessie?
Replies: 41
Views: 57595

Re: Tutorial for MQTT on Raspbian Jessie?

You can assign your 169.254.78.169 IP with sudo ifconfig eth0 169.254.78.169/16 Maybe not... This is an RPi Zero, hence no Ethernet port, and it has been set up as a standalone WiFi access point. (You have also advised the same user in this parallel thread: https://www.raspberrypi.org/forums/viewto...
by DougieLawson
Tue Aug 14, 2018 12:20 pm
Forum: Beginners
Topic: Move ssh key to other builds?
Replies: 8
Views: 142

Re: Move ssh key to other builds?

The simple answer is don't. You compromise your security doing that. Raspbian discovered that flaw and they regenerate SSH keys on first boot.

So you can steal borrow the code from Raspbian.
by DougieLawson
Tue Aug 14, 2018 12:20 pm
Forum: Beginners
Topic: Move ssh key to other builds?
Replies: 8
Views: 142

Re: Move ssh key to other builds?

The simple answer is don't. You compromise your security doing that. Raspbian discovered that flaw and they regenerate SSH keys on first boot.

So you can steal borrow the code from Raspbian.
by DougieLawson
Tue Aug 14, 2018 12:17 pm
Forum: Beginners
Topic: Syncing Current IP
Replies: 2
Views: 85

Re: Syncing Current IP

Anything that uses an IP address for any kind of security credential is never going to be secure.

There's dozens of ways to determine your public IP. The usual one is with the dyndns auto updater. That's a simple C program that's easy to hack for your own purpose.
by DougieLawson
Tue Aug 14, 2018 12:10 pm
Forum: Troubleshooting
Topic: I need help with connecting my Pi to a WPA2 Enterprise Wifi
Replies: 2
Views: 67

Re: I need help with connecting my Pi to a WPA2 Enterprise Wifi

Pay a visit or pick up the phone. Your uni/school help desk are paid to help you get connected. That's their day job.
by DougieLawson
Tue Aug 14, 2018 9:07 am
Forum: General discussion
Topic: MQTT installation on Stretch fixed?
Replies: 9
Views: 4495

Re: MQTT installation on Stretch fixed?

sudo apt install mosquitto mosquitto-client*
Works on latest Stretch.
by DougieLawson
Tue Aug 14, 2018 8:57 am
Forum: Beginners
Topic: mariadb connection
Replies: 3
Views: 73

Re: mariadb connection

As Dirk says error 111 has three possible causes.

1. Wrong IP, port may be right or wrong
2. Right IP, wrong port
3. Right IP, right port server not listening

You problem is clearly #3.
by DougieLawson
Tue Aug 14, 2018 8:50 am
Forum: AIY Projects
Topic: AIY Voice V1 - No luck with RPI 3 B+
Replies: 1
Views: 45

Re: AIY Voice V1 - No luck with RPI 3 B+

That's not true.

My AIY has been on my 3B+ since I got it.

I built it by copying /opt/aiy/* from the downloaded image then installing all of the aiy* packages over that with apt-get.
by DougieLawson
Tue Aug 14, 2018 8:42 am
Forum: Troubleshooting
Topic: Ethernet port has no lights turned on
Replies: 11
Views: 187

Re: Ethernet port has no lights turned on

... " CAT6 Flat Ethernet Cable " ... Just FYI you cannot have flat cat6 cable but the rest is interesting Who cares? If we assume the OP has tested whatever cable he/she is using means your meta-discussion is off-topic. Can we concentrate on offering solutions that might help ratherr than discussin...
by DougieLawson
Tue Aug 14, 2018 8:36 am
Forum: General discussion
Topic: Which operating system for Pi Zero W as access point, MQTT only
Replies: 28
Views: 516

Re: Which operating system for Pi Zero W as access point, MQTT only

MQTT is a layer 4 protocol. Layer 4 has an assigned PORT number.

IP addresses are assigned at layer 2.

What you mean is the IP address for the server running your MQTT broker (which is most likely Mosquitto at port 1883).
by DougieLawson
Tue Aug 14, 2018 8:31 am
Forum: Troubleshooting
Topic: My pi keeps getting frozen , sometimes screen pixel freeze, what should I do ,
Replies: 1
Views: 79

Re: My pi keeps getting frozen , sometimes screen pixel freeze, what should I do ,

Try building a new SDCard with Raspbian Stretch. You'll get a year's worth of fixes that way.
by DougieLawson
Tue Aug 14, 2018 8:28 am
Forum: Python
Topic: sending data from raspberry pi3 to ms sql server
Replies: 6
Views: 101

Re: sending data from raspberry pi3 to ms sql server

Search "raspberry mssql unixodbc site:raspberrypi.org" and you'll find the old posts. I'd do it for you but it's not easy on my phone in an airport.
by DougieLawson
Tue Aug 14, 2018 8:25 am
Forum: Troubleshooting
Topic: Tutorial for MQTT on Raspbian Jessie?
Replies: 41
Views: 57595

Re: Tutorial for MQTT on Raspbian Jessie?

You can assign your 169.254.78.169 IP with

sudo ifconfig eth0 169.254.78.169/16
by DougieLawson
Tue Aug 14, 2018 8:21 am
Forum: Troubleshooting
Topic: MotioneyeOS: Change default date after crash
Replies: 1
Views: 19

Re: MotioneyeOS: Change default date after crash

Add an external RTC like a ds1307 or ds3231.
by DougieLawson
Tue Aug 14, 2018 8:14 am
Forum: Python
Topic: sending data from raspberry pi3 to ms sql server
Replies: 6
Views: 101

Re: sending data from raspberry pi3 to ms sql server

Is your local Google broken?

Go to advanced search