Go to advanced search

by azeam
Thu Mar 21, 2013 7:36 am
Forum: Java
Topic: Using SSHJ to send SSH commands to Raspberry Pi in Java App
Replies: 20
Views: 10426

Re: Using SSHJ to send SSH commands to Raspberry Pi in Java

I made a mistake in the first piece of code, the second that is tested is correct. Change

Code: Select all

ssh.connect("192.168.1.127,22");
to

Code: Select all

ssh.connect("192.168.1.127", 22);
You'll probably need the NullHostKeyVerifier class (or some other solution to that) that I posted as well, don't see that in your code.
by azeam
Thu Mar 21, 2013 7:31 am
Forum: Graphics, sound and multimedia
Topic: ALSA/MPD Crackling on sound reproduction
Replies: 6
Views: 2845

Re: ALSA/MPD Crackling on sound reproduction

This is a known issue and there are several threads about this. It is caused by a USB bug that is being worked on... Azeam: when the solution to the bug is released, how can we know about it? Is there any site we can peruse regularly for this kind of news? Thanks. Following the USB Redux thread is ...
by azeam
Wed Mar 20, 2013 7:34 pm
Forum: Java
Topic: Using SSHJ to send SSH commands to Raspberry Pi in Java App
Replies: 20
Views: 10426

Re: Using SSHJ to send SSH commands to Raspberry Pi in Java

Is that something that can be ignored or fixed? I'm at work right now so I can't see if this will work with the Pi until later tonight, but for now it looks like it keeps trying until it gets a timeout. So I think that's a start. You can ignore it, for this usage I haven't noticed any advantages us...
by azeam
Wed Mar 20, 2013 7:31 pm
Forum: Graphics, sound and multimedia
Topic: ALSA/MPD Crackling on sound reproduction
Replies: 6
Views: 2845

Re: ALSA/MPD Crackling on sound reproduction

... The current workaround is to limit the USB to 1.1 by adding dwc_otg.speed=1 to /boot/cmdline.txt Unfortunately, for me, it does not work, not a sound whatsoever came out. Guess I shall have to wait for the work in progress. It's been a while since I tested it but it used to work, the ethernet g...
by azeam
Wed Mar 20, 2013 6:04 pm
Forum: Graphics, sound and multimedia
Topic: ALSA/MPD Crackling on sound reproduction
Replies: 6
Views: 2845

Re: ALSA/MPD Crackling on sound reproduction

This is a known issue and there are several threads about this. It is caused by a USB bug that is being worked on. The current workaround is to limit the USB to 1.1 by adding dwc_otg.speed=1 to /boot/cmdline.txt
by azeam
Wed Mar 20, 2013 4:55 pm
Forum: Java
Topic: Using SSHJ to send SSH commands to Raspberry Pi in Java App
Replies: 20
Views: 10426

Re: Using SSHJ to send SSH commands to Raspberry Pi in Java

That is also a very old version of SSHJ (0.2.0), you can download the latest (at the moment 0.8.1) from https://github.com/shikhar/sshj/downloads
by azeam
Wed Mar 20, 2013 4:52 pm
Forum: Java
Topic: Using SSHJ to send SSH commands to Raspberry Pi in Java App
Replies: 20
Views: 10426

Re: Using SSHJ to send SSH commands to Raspberry Pi in Java

Add only slf4j-api-1.7.4.jar and slf4j-simple-1.7.4.jar. Here is some actual tested and working code, Exec.java: import java.io.IOException; import net.schmizz.sshj.SSHClient; import net.schmizz.sshj.connection.channel.direct.Session; import net.schmizz.sshj.connection.channel.direct.Session.Command...
by azeam
Wed Mar 20, 2013 8:37 am
Forum: Java
Topic: Using SSHJ to send SSH commands to Raspberry Pi in Java App
Replies: 20
Views: 10426

Re: Using SSHJ to send SSH commands to Raspberry Pi in Java

Eclipse is returning a whole jumble of errors when trying to execute one of the commands from a button click. Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory at net.schmizz.sshj.DefaultConfig.<init>(DefaultConfig.java:92) at net.schmizz.sshj.SSHClient....
by azeam
Wed Mar 20, 2013 8:31 am
Forum: Other projects
Topic: Pianobar freezes without sudo
Replies: 9
Views: 1924

Re: Pianobar freezes without sudo

Okay i'm going to wait to remove pianobar with a fresh os install and wipe everything out and start over until i'm certain i have to. sorry in advance if I am being vague or unclear in how I did everything. I'm trying to fill you in the best I can. Appreciate the help :) Couldn't be more clear :) T...
by azeam
Tue Mar 19, 2013 8:38 pm
Forum: Other projects
Topic: Pianobar freezes without sudo
Replies: 9
Views: 1924

Re: Pianobar freezes without sudo

so i found this sound file.. -( sudo aplay /usr/share/sounds/alsa/Front_Center.wav Playing WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono) I took out the sudo and it still played the file through my speaker. Im starting to think it is only through ...
by azeam
Tue Mar 19, 2013 8:34 pm
Forum: Java
Topic: Using SSHJ to send SSH commands to Raspberry Pi in Java App
Replies: 20
Views: 10426

Re: Using SSHJ to send SSH commands to Raspberry Pi in Java

A few questions, what's the purpose of the "22" in this line?: ssh.connect("192.168.1.xxx, 22"); It's the port number, change it if necessary. Also, is this working code or just an example? I'm away from my Pi at the moment, but if I were to add the code into an ActionListener for a button and chan...
by azeam
Tue Mar 19, 2013 10:06 am
Forum: Other projects
Topic: Pianobar freezes without sudo
Replies: 9
Views: 1924

Re: Pianobar freezes without sudo

Are you able to play sound with other applications without using sudo? See if adding yourself to the audio group makes any difference, if "pi" is your username:

Code: Select all

sudo adduser pi audio
by azeam
Tue Mar 19, 2013 9:58 am
Forum: Java
Topic: Using SSHJ to send SSH commands to Raspberry Pi in Java App
Replies: 20
Views: 10426

Re: Using SSHJ to send SSH commands to Raspberry Pi in Java

The problem with SSHJ is that there's (afaik) no easy way to use it with interactive sessions (when it asks for the sudo password) without writing a GUI application and implement the PTY function, so you'll probably need to send the password in one command, like echo raspberry | sudo -S reboot If yo...
by azeam
Mon Mar 18, 2013 12:09 pm
Forum: Beginners
Topic: I’ve misplaced a user cron job (and it is still running)
Replies: 15
Views: 3660

Re: I’ve misplaced a user cron job (and it is still running)

Check in the /etc/cron* folders (probably /etc/cron.daily) and see if you can find it there. Otherwise you can search for it like this

Code: Select all

grep -r "find /mnt/share/webcam/* -mtime +2 -exec rm {} \;" /
by azeam
Mon Mar 18, 2013 12:00 pm
Forum: Media centres
Topic: Headless Audio Player & Android/PC Remote
Replies: 12
Views: 12857

Re: Headless Audio Player & Android/PC Remote

Also PulseAudio is an unnecessary complication for an audio streamer. What we want is MPD talking directly to the card through ALSA so that the bit depth and sample rate of the original file remain intact. As such MPD is set to output to hw:0,0 rather than any of the alsa / dmixer options Ok, what ...
by azeam
Mon Mar 18, 2013 11:57 am
Forum: Java
Topic: Pianobar remote control
Replies: 45
Views: 16794

Re: Pianobar remote control

Hi guys, this looks like a nice setup, but I have an alternative if you want to check it out. Here's a quick blurb . Thanks. I've thought of using pianod instead of pianobar but never really gotten to it yet, there's also an Android app for pianod ( https://github.com/hinesmr/pianod-mobile ) that I...
by azeam
Mon Mar 18, 2013 11:50 am
Forum: Media centres
Topic: Headless Audio Player & Android/PC Remote
Replies: 12
Views: 12857

Re: Headless Audio Player & Android/PC Remote

I have just configured a pi & nas as an MPD server, and have it connected to my Cyrus hifi via a Cambridge DacMagic Azur (which is detected at startup by ALSA). I can see the sample rate on the dac switching when I play different quality of audio files and the difference between 16 bit and 24 bit i...
by azeam
Thu Mar 07, 2013 10:44 pm
Forum: Troubleshooting
Topic: USB redux
Replies: 514
Views: 198704

Re: USB redux

Have you tried using nrpacks in your modprobe config. I found I had to do that with my PCM2704 card (16bit). See http://alsa.opensrc.org/Usb-audio#Tuning_USB_devices_for_minimal_latencies. I needed to use nrpacks=1 options snd-usb-audio index=0 nrpacks=1 You might want to look at picking up a PCM27...
by azeam
Thu Mar 07, 2013 9:00 am
Forum: Media centres
Topic: Headless Audio Player & Android/PC Remote
Replies: 12
Views: 12857

Re: Headless Audio Player & Android/PC Remote

I've also written a quick guide to setting up a headless music server with MPD/pianobar, controlled by an Android device. See http://www.instructables.com/id/Linux-m ... id-device/
by azeam
Wed Mar 06, 2013 2:53 pm
Forum: Troubleshooting
Topic: USB redux
Replies: 514
Views: 198704

Re: USB redux

M33P wrote:Unless the USB DACs are causing the Pi to freeze hard and become completely unresponsive, then probably not.
Ok, thanks. The issue isn't that, it's that the sound is distorted (seems as if it can't push the data fast enough), so I'll wait a bit with the rpi-update. Keep up the good work! :)
by azeam
Wed Mar 06, 2013 2:27 pm
Forum: Troubleshooting
Topic: USB redux
Replies: 514
Views: 198704

Re: USB redux

Would this by any chance affect the bug with 24bit audio on USB DACs? My most recent patch has been merged into the github repository - it should be available from rpi-update. This adds support for handling of data toggle errors during SPLIT transactions in the driver - previously the Pi would loop ...
by azeam
Tue Mar 05, 2013 8:33 am
Forum: Java
Topic: Pianobar remote control
Replies: 45
Views: 16794

Re: Pianobar remote control

melsaxing wrote:If I just create the ctl file, the permissions are prw-r--r--.
As long as it works that's fine. The main difference between a ctl file and a "normal" file is the "p" in the beginning.
by azeam
Mon Mar 04, 2013 1:13 pm
Forum: Beginners
Topic: SD image too big for another SD Card
Replies: 48
Views: 146666

Re: SD image too big for another SD Card

simplesi wrote:Now I come to think about it, can we not simply plug a £1 shop USB SD card reader into an RPi and get it to do the DD ing itself?

Simon
"dd:ing" an image of a running os is not a good idea at all, better to unmount the sd card and do it externally.
by azeam
Mon Mar 04, 2013 1:04 pm
Forum: Networking and servers
Topic: how do you limit the overall upload/download speed of the pi
Replies: 3
Views: 2997

Re: how do you limit the overall upload/download speed of th

You could also check out wondershaper

Code: Select all

sudo apt-get install wondershaper
To limit eth0 to 1024kbit/1024kbit

Code: Select all

sudo wondershaper eth0 1024 1024
by azeam
Mon Mar 04, 2013 12:50 pm
Forum: General discussion
Topic: transmission daemon issue - solved...."per say" - thanks
Replies: 8
Views: 5077

Re: transmission daemon issue

Are you using the web interface to add torrents? Have you tried adding a link instead of a .torrent file? Check your log files for error messages

Code: Select all

cat /var/log/syslog

Go to advanced search