Go to advanced search

by pleriche
Wed Jul 20, 2016 10:32 am
Forum: Python
Topic: os.system() in cgi script
Replies: 5
Views: 1672

os.system() in cgi script

I'm trying to get a simple cgi script running for a student (to call the example Pipsta printer programs from a web interface) and for the moment I don't see what's going wrong. In order to narrow it down I picked up an example cgi script from the net and modified it as follows: #!/usr/bin/python im...
by pleriche
Fri May 27, 2016 12:04 pm
Forum: Advanced users
Topic: /dev/video0 missing
Replies: 3
Views: 1195

Re: /dev/video0 missing

PhilE: Err, yes. The camera had already been working fine with raspistill. dmesg | grep bcm2835 gave no relevant messages. But what idiot of a typographer ever thought it'd be a good idea to make a sans lower case L look so much like a figure one? Changed bcm2835_v412 (vee four one two) in /etc/modu...
by pleriche
Thu May 26, 2016 1:50 pm
Forum: Advanced users
Topic: /dev/video0 missing
Replies: 3
Views: 1195

/dev/video0 missing

I have a webcam working fine using motion on a fairly old Pi running a version of Jessie on which I may not have done an apt-get update, upgrade recently, but trying to get it to work on another is defeating me. Both use directly connected Pi camera modules (not USB webcams). The difference seems to...
by pleriche
Fri May 13, 2016 9:00 pm
Forum: Troubleshooting
Topic: Samba problem on Jessie
Replies: 7
Views: 2150

Re: Samba problem on Jessie

OK, so (for the benefit of anyone sent here in the future by Mr Google), according to the smb.conf man page the server role parameter defaults to auto if not given, which causes Samba to determine the server role from the security setting. And the security setting defaults to user if not given, this...
by pleriche
Fri May 13, 2016 11:14 am
Forum: Troubleshooting
Topic: Samba problem on Jessie
Replies: 7
Views: 2150

Re: Samba problem on Jessie

Thank you, that's interesting and makes sense. But what doesn't make sense then is why the given smb.conf doesn't contain a security parameter at all, even commented out! However, I tried removing (with pdbedit) the Pi user entry which I'd added, adding security = user to smb.conf and rebooting, and...
by pleriche
Fri May 13, 2016 8:51 am
Forum: Troubleshooting
Topic: Samba problem on Jessie
Replies: 7
Views: 2150

Re: Samba problem on Jessie

I fixed it by typing smbpasswd -a pi and entering a password. I don't remember having to do this on Wheezy (and an older version of Samba I think), or if I did I twice failed to document it in my notes, and it doesn't seem to appear in the samba setup guides I looked at. Anyway, for reference here's...
by pleriche
Thu May 12, 2016 9:43 pm
Forum: Troubleshooting
Topic: Samba problem on Jessie
Replies: 7
Views: 2150

Samba problem on Jessie

I had Samba working fine on Wheezy and tried to set it up the same on Jessie. I had security = user in smb.conf on Wheezy, and that now seems to have been replaced by server role = standalone server, but otherwise I changed nothing except to insert an identical [homes] section as I had on Wheezy. sm...
by pleriche
Thu May 12, 2016 8:30 pm
Forum: Raspberry Pi OS
Topic: VNC server in Jessie (using a systemd service)
Replies: 28
Views: 106887

Re: VNC server in Jessie (using a systemd service)

This works fine for me - thanks xanthor. Just one little niggle: when I start LXterminal the current directory is / rather than /home/pi. I've compared /etc/profile, /etc/basr.bashrc, .profile, .bashrc and .vnc/xstartup with a Wheezy system which starts LXterminal in $HOME and can see no significant...
by pleriche
Sun Jan 03, 2016 3:10 pm
Forum: Advanced users
Topic: Shutdown button
Replies: 3
Views: 1044

Shutdown button

A shutdown button for an embedded application is very easy to do, but what's harder is how to indicate to a non-technical operator when it's safe to pull the plug. In the script triggered by the shutdown button I could set a GPIO pin to output and write "1" to it. I could use that output to flash a ...
by pleriche
Mon Dec 21, 2015 9:17 am
Forum: Troubleshooting
Topic: WiFi disconnection problem
Replies: 4
Views: 1780

Re: WiFi disconnection problem

Power management is off.
by pleriche
Sun Dec 20, 2015 4:46 pm
Forum: Troubleshooting
Topic: WiFi disconnection problem
Replies: 4
Views: 1780

WiFi disconnection problem

Most weeks I take a Pi down to church to use as a midi sequencer. I log on to it from a laptop over WiFi with PuTTy in order to launch and control the sequencer program, and this has mostly been working fine for nearly 2 years. Nothing I know of has changed recently, but for the last few weeks PuTTy...
by pleriche
Sat Aug 08, 2015 6:37 pm
Forum: C/C++
Topic: Truncate a string in C
Replies: 7
Views: 1580

Re: Truncate a string in C

Yeah, incomplete code fragment. It now compiles cleanly and all works apart from a few refinements.

Regards - Philip
by pleriche
Fri Aug 07, 2015 5:10 pm
Forum: C/C++
Topic: Truncate a string in C
Replies: 7
Views: 1580

Re: Truncate a string in C

Err, yes (red face) - stoopid typo (kicks self in the butt). Brain still in Python mode.

Regards - Philip
PS Peter - I read it 30 years ago. Can you remember all the books you read 30 years ago?
by pleriche
Fri Aug 07, 2015 2:08 pm
Forum: C/C++
Topic: Truncate a string in C
Replies: 7
Views: 1580

Truncate a string in C

I'm trying to adapt a program written in Borland C (the Locus data parser for the Adafruit MTK3339 GPS module) to compile with gcc and I'm down to one last problem. I need to change the .bin extension on the input file name to .loc. Scratching around in my memory for what I learned about C in the 19...
by pleriche
Sun Jun 14, 2015 3:14 pm
Forum: Troubleshooting
Topic: I2C stopped working
Replies: 3
Views: 2433

Re: I2C stopped working

As I thought, a simple problem, but why?? A couple of weeks ago I was struggling to get sounds out of Pygame, and went into raspi-config to force audio through the 3.5mm jack. I didn't do anything else in there, but it seems it disabled i2c. I've just re-enabled it using raspi-config and my i2c inte...
by pleriche
Sat Jun 13, 2015 10:45 pm
Forum: Troubleshooting
Topic: I2C stopped working
Replies: 3
Views: 2433

Re: I2C stopped working

Not touched anything of that sort since it last worked, and certainly not on both Pis. The only thing I'm aware of having changed is the rubber band holding my interface onto the top of the Pi case!
by pleriche
Sat Jun 13, 2015 10:15 pm
Forum: Troubleshooting
Topic: I2C stopped working
Replies: 3
Views: 2433

I2C stopped working

I have a home-built interface which uses i2c and recently stopped working. i2cdetect says Error: Could not open file `/dev/i2c-1' or `/dev/i2c/1': No such file or directory I tried another i2c peripheral (XLoBorg), and i2cdetect gives the same error with that plugged in instead. This is on both my P...
by pleriche
Fri Jun 05, 2015 8:38 am
Forum: Python
Topic: How do you use Python to play MP3 files?
Replies: 28
Views: 14230

Re: How do you use Python to play MP3 files?

I'm trying to do something very similar with virtually the same code (but with a wav file) but I get no sound out at all. However, I can play it from the command line using omxplayer, so the sound system and my mini speaker are definitely functional. Laurens - can you confirm that this still works h...
by pleriche
Sat May 23, 2015 4:10 pm
Forum: General programming discussion
Topic: Playing sounds
Replies: 1
Views: 539

Playing sounds

I want to generate sounds such as bells or piano notes from the General Midi set, but specifying the pitch of each individual note in Hz, in order to explore different tonalities. Can anyone give me a leg-up with a pointer or two please - there seems to be a dearth of tutorials, and documentation ge...
by pleriche
Fri Nov 28, 2014 10:03 am
Forum: General discussion
Topic: Midori - no address bar
Replies: 9
Views: 8261

Re: Midori - no address bar

One small but important point is missing from this thread, or only alluded to in passing. Having got the menu bar back as described I still didn't have the address or search boxes in it. After driving myself crazy I discovered that they only appear if the Midori window is wider than a certain width....
by pleriche
Sat Nov 08, 2014 11:05 pm
Forum: General discussion
Topic: Adafruit MPL115A2 Temp/Pressure sensor - Python
Replies: 6
Views: 4301

Adafruit MPL115A2 Temp/Pressure sensor - Python

The documentation that comes with the MPL115A2 temperature and pressure sensor from Adafruit only gives C code for Arduino, which is less useful than might have been hoped. I've searched in vain for Python code for the Raspberry Pi. After quite a long slog, I think I have it working. Gotchas along t...
by pleriche
Sun Oct 26, 2014 2:47 pm
Forum: Raspberry Pi OS
Topic: DHCP IP addr and Avahi/mDNS
Replies: 1
Views: 853

DHCP IP addr and Avahi/mDNS

I'm writing a setup guide for students at a school computer club, to set up their own Raspberry Pi headless with the possibility of bringing it in to school. For home use, a static ip has something to be said for it, but foolproof instructions for choosing an ip address aren't easy. Conversely, if I...
by pleriche
Mon Sep 22, 2014 6:28 pm
Forum: Camera board
Topic: Red color in the middle of the camera
Replies: 55
Views: 17514

Re: Red color in the middle of the camera

Thank you 6by9 - this is most encouraging. When might we see this in the standard Raspian update stream - days? Weeks? I'm not sure I've got the stomach to install the build environment and build it from the git sources though I'm sure it's not that hard really. Is it just a raspistill or firmware b...
by pleriche
Sat Sep 13, 2014 5:43 pm
Forum: Camera board
Topic: Red color in the middle of the camera
Replies: 55
Views: 17514

Re: Red color in the middle of the camera

Thank you KarlS for that observation. I'd really like to see a solution to this problem as it's a show-stopper for anything but pure toy applications.

Regards - Philip
by pleriche
Wed Aug 27, 2014 3:04 pm
Forum: Troubleshooting
Topic: PANIC: VFS: Unable to mount root fs on unknown-block(0,0)
Replies: 0
Views: 2712

PANIC: VFS: Unable to mount root fs on unknown-block(0,0)

I'm not really expecting anyone to reply to this post as I've sorted the problem. I'm posting in case anyone else hits the same problem and googles for it. I'm using my Pi as a midi sequencer. I tested it out to make sure all was working, then shut it down. Two days later, an hour before leaving the...

Go to advanced search