• Home
  • Help
  • Search
  • Login
  • Register
  Show Posts
Pages: [1] 2
1  Linux Stuff / General Linux questions / Streaming audio with dreamplug on: July 20, 2013, 01:33:02 PM
Hello all Smiley

Just wondering how to stream audio from my dreamplug. Currently the dreamplug is running debian 6.0.2 .

I understand that ffmpeg can stream via rtp/rtsp but I'm honestly not sure how to use it. I can find several examples on other websites however first of all they aren't dreamplug specific, and secondly they don't ever tell you how to play the stream once it is set up!

After poking around on the 'net I came up with the following. First, on the dreamplug:

Code:
ffmpeg -i test.mp3 -ab 32k -ac 1 -re -f rtp rtp://192.168.0.39:1234

This seems to do *something* .


And then try to play the file on a normal linux box;
Code:
mplayer rtsp://192.168.0.39:1234

But I then get;
Code:
Playing rtsp://192.168.0.39:1234.
Resolving 192.168.0.39 for AF_INET6...

Couldn't resolve name for AF_INET6: 192.168.0.39
Connecting to server 192.168.0.39[192.168.0.39]: 1234...

connect error: Connection refused
Resolving 192.168.0.39 for AF_INET6...

Couldn't resolve name for AF_INET6: 192.168.0.39
Connecting to server 192.168.0.39[192.168.0.39]: 1234...

connect error: Connection refused
No stream found to handle url rtsp://192.168.0.39:1234

Do I have to specify a file somewhere in all of this? I was thinking that with audio streaming the idea was that you downloaded a small file, then pointed your player at that file which then read that file which presumably contains the streaming info and then plays from that point. But I'm really not sure how  to do it.

Can anyone help on this? Thanks

ljones
2  General Category / General Discussion / D2Plug Video Chipset/Driver on: October 01, 2011, 08:00:37 AM
Hello all Smiley

I've been looking around at all the various ARM based devices you can get, and I've noticed 3 which look pretty intresting;

* Efika MX Smartbook ( http://www.genesi-usa.com/products/smartbook ) . There is also a desktop version

* Rasberry PI ( http://www.raspberrypi.org/ )

* D2Plug (Did not know of its existance until very recently!).

Only reason why I'm writing here is that I'm just wondering what chipset the d2plug uses for video, and if the drivers for the chipset are open or propietary or not? Unfortunatly the efika mx devices use propietary video drivers and I believe the rasberry pi will also too which makes getting any usable X based linux desktop without using the "blessed" linux distro proivided is very hard or almost impossible (you would have to use the *very* slow fbdev/vesa driver). Is the d2plug in the same boat at all?

Thanks

ljones
3  General Category / General Discussion / Updating sheevaplug software on: January 22, 2011, 02:44:21 PM
Hello all Smiley

I just recently dug out my old sheevaplug -- I haven't used it in quite a while. I was going to use it (back in 2009) as a server but random disconnects with a wireless adapter put paid to that.

What I was wondering now we're 2 years on from 2009 has the sheevaplug software (ubuntu) been updated at all? (I'm thinking updating the whole thing, not just using apt-get).

Here's what I get at boot-up;
Code:
         __  __                      _ _
        |  \/  | __ _ _ ____   _____| | |
        | |\/| |/ _` | '__\ \ / / _ \ | |
        | |  | | (_| | |   \ V /  __/ | |
        |_|  |_|\__,_|_|    \_/ \___|_|_|
 _   _     ____              _
| | | |   | __ )  ___   ___ | |_
| | | |___|  _ \ / _ \ / _ \| __|
| |_| |___| |_) | (_) | (_) | |_
 \___/    |____/ \___/ \___/ \__|
 ** MARVELL BOARD: SHEEVA PLUG LE

U-Boot 1.1.4 (May 13 2009 - 13:10:52) Marvell version: 3.4.16

U-Boot code: 00600000 -> 0067FFF0  BSS: -> 006CF100

Soc: 88F6281 A0 (DDR2)
CPU running @ 1200Mhz L2 running @ 400Mhz
SysClock = 400Mhz , TClock = 200Mhz

DRAM CAS Latency = 5 tRP = 5 tRAS = 18 tRCD=6
DRAM CS[0] base 0x00000000   size 256MB
DRAM CS[1] base 0x10000000   size 256MB
DRAM Total size 512MB  16bit width
Flash:  0 kB
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done
NAND:512 MB

CPU : Marvell Feroceon (Rev 1)

Streaming disabled
Write allocate disabled


USB 0: host mode
PEX 0: interface detected no Link.
Net:   egiga0 [PRIME], egiga1
Hit any key to stop autoboot:  0

NAND read: device 0 offset 0x100000, size 0x400000

Reading data from 0x4ff800 -- 100% complete.
 4194304 bytes read: OK
## Booting image at 00800000 ...
   Image Name:   Linux-2.6.30.5
   Created:      2009-08-17   0:37:18 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2626164 Bytes =  2.5 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK

Starting kernel ...

Code:
root@ubuntu:~# uname -r
2.6.30.5

The distro on my sheevaplug is Ubuntu 9.04

ljones

4  Hardware and U-Boot firmware / Hardware / Re: Best USB wireless stick for sheevaplug? on: March 14, 2010, 04:28:22 PM
Yep, I've tried running the wireless USB device straight off the sheevaplug, but it dosen't make any difference. It still drops out and misses pings like there's no tomorrow.

The link to the 400mW USB wireless device looks intresting,  though a pity (so far as I can tell right now) it isn't sold in the UK.

Is it me or are a lot of people having issues with USB wireless devices and the sheevaplug? It would point back to either a software or hardware failure on the sheevaplug.....maybe its USB controller isn't too great?

ljones
5  Hardware and U-Boot firmware / Hardware / Best USB wireless stick for sheevaplug? on: March 14, 2010, 05:42:41 AM
Hello all Smiley !

A long time ago I was trying to figure out how to get my sheevaplug to work via USB wireless. I managed to do this originally with a netgear WG111V2 (there's a thread about this here - http://plugcomputer.org/plugforum/index.php?topic=624.0 ) . Eventually I replaced that adapter with an Alfa networks wireless adaptor which seemed to work better.

Unfortunatly though the idea to use the sheevaplug over wireless still isn't 100% . The original problem with the WG111V2 was that it would drop the connection (if it would even connect at all) plus it ran very warm. The alfa networks device (actually an alfa networks AWUS036H) works better but it is still extremely prone to random disconnects and dropout. In fact I eventually ended up (with help) writing a script like this;

Code:
#!/bin/sh
#
# Tidied up script which checks if the sheevaplug is conencted, if it isn't
# then a connection is made for five attempts, and if it fails on the fifth
# go then the sheevaplug is reset.
#
# Uses a file called "count.var" to store the variable count into a file
#

# First check to see if the file count.var exists, and if not - make it!
if [ -e "count.var" ]
then
 :                      #  The file exists, so no need for any action
else
 echo 0 > count.var     #  No file, so put 0 into the file count.var
fi

# Read count.var and put it into variable count
count=`cat count.var`

# Check to see if the connection has been lost
if=wlan0
if iwconfig $if | grep -q Not-Associated ;
then
 :                      # Uh oh, lost connection so ....
else
 count=0                # We're connected so set count to 0
 rm count.var           # Get rid of count.var
 exit
fi

# Since we're not connected carry on....
# Has the counter reached 5 yet? If so, reboot.
if [ $count -eq 5 ] then
 count=0                # Set counter to 0
 rm count.var           # Get rid of count.var
 shutdown -r now        # Not connected :-( so restart sheevaplug
 exit                   
fi

# Counter hasn't gotten to 5 yet, so add 1 to count
count=$(($count +1))

# Save it to count.var
echo $count > count.var

# And try to reconnect ....
iwconfig $if ap auto

....because it drops out and disconnects so much. Pinging it also shows it is missing pings as well! So does anyone here know of a good stable usb wireless device that will work with the sheeva without all the dropout and disconnects?

Also one more thing -- I use the service noip and in order for it to function a small program ( noip-2.1.9-1 , http://www.no-ip.com/downloads.php ) is needed to make it work. I can compile this to run ok on a normal PC but does anyone have a version compiled for the sheevaplug at all?

BTW I have enclosed a (pretty crude!) diagram showing how I am hooking all this up together.

thanks

ljones
6  General Category / General Discussion / Re: Setting up sheevaplug with wlan on: February 28, 2010, 07:54:58 AM
Ok, I've not tired it yet but here's a stab at a script. Snag is though I am not sure how the script "runs". Let me explain -- once the script has finished do all the variables (I'm using one called $count) get cleared out or will they remain once the script ends (not sure). Anyways here's my first attempt at a better script. This one saves the variable count as well, as I'm not sure if it gets wiped once the script ends ....

Code:
#!/bin/sh
#
# Tidied up script which checks if the sheevaplug is conencted, if it isn't
# then a connection is made for five attempts, and if it fails on the fifth
# go then the sheevaplug is reset.
#
# Uses a file called "count.var" to store the variable count into a file
#

# First check to see if the file count.var exists, and if not - make it!
if [ -e "count.var" ]
then
 :                      #  The file exists, so no need for any action
else
 echo 0 > count.var     #  No file, so put 0 into the file count.var
fi

# Read count.var and put it into variable count
count=`cat count.var`

# Check to see if the connection has been lost
if=wlan0
if iwconfig $if | grep -q Not-Associated ;
then
 :                      # Uh oh, lost connection so ....
else
 count=0                # We're connected so set count to 0
 rm count.var           # Get rid of count.var
 exit
fi

# Since we're not connected carry on....
# Has the counter reached 5 yet? If so, reboot.
if [ $count -eq 5 ] then
 count=0                # Set counter to 0
 rm count.var           # Get rid of count.var
 shutdown -r now        # Not connected :-( so restart sheevaplug
 exit                   
fi

# Counter hasn't gotten to 5 yet, so add 1 to count
count=$(($count +1))

# Save it to count.var
echo $count > count.var

# And try to reconnect ....
iwconfig $if ap auto

EDIT: Found 1 error. Missed off "-" off "-eq" (if [ $count -eq 5 ] ) .

ljoens
7  General Category / General Discussion / Re: Setting up sheevaplug with wlan on: February 13, 2010, 10:23:58 PM
I really must get back to doing this. Never finished all this off because the hard drive I had plugged into the sheevaplug .... I needed it for other stuff! But must get back into all of this. Smiley

ljones
8  General Category / General Discussion / Re: Setting up sheevaplug with wlan on: September 19, 2009, 04:29:54 PM
Might be related to things like this:

http://patchwork.kernel.org/patch/38530/

There seem to be a few post about "No probe response from AP" timeouts since 2.6.30-rc3.  Apparently fixed at 2.6.31.2.  But they may be driver-specific (and neither is RTL8187).

My scripts to re-associate (which are at least a workaround) are these:
5-min crontab job (/etc/cron.d/WifiCheck)
Code:
# Check the Wifi status
#
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/local/bin

01-58/5 * * * * root /local/bin/wireless-check
The actual script (/local/bin/wireless-check):
Code:
#!/bin/sh
#
if=wlan0

if iwconfig $if | grep -q Not-Associated; then
   : Not associated, so get it to retry
else
   exit     # All OK
fi

iwconfig $if | Mail -s 'Wifi lost association on plug' {my-mail-address}
# Force re-association
iwconfig $if ap auto
(I've got mail setup...)
The result, earlier today, showed this in in dmesg (as well as mailing me the Not-Associated details):
Quote
wlan0: no probe response from AP 00:02:cf:xx:xx:xx - disassociating
wlan0: direct probe to AP 00:02:cf:xx:xx:xx try 1
wlan0: direct probe to AP 00:02:cf:xx:xx:xx try 2
wlan0: direct probe to AP 00:02:cf:xx:xx:xx try 3
wlan0: direct probe to AP 00:02:cf:xx:xx:xx timed out
wlan0: direct probe to AP 00:02:cf:xx:xx:xx try 1
wlan0: direct probe to AP 00:02:cf:xx:xx:xx try 2
wlan0 direct probe responded
wlan0: authenticate with AP 00:02:cf:xx:xx:xx
wlan0: authenticated
wlan0: associate with AP 00:02:cf:xx:xx:xx
wlan0: RX ReassocResp from 00:02:cf:xx:xx:xx (capab=0x431 status=0 aid=4)
wlan0: associated


I've just had a thought. I lost my internet connection for a short time tonight but the sheevaplug didn't seem to manage to connect. My idea would be as follows -- to have a simple counter which adds by one every time the sheeva fails to reconnect, and if it reaches say .... 5 the sheeva is rebooted.

Code:
#!/bin/sh
#
if=wlan0

if [count==5] then
  count=0
  shutdown -r now 

fi
if iwconfig $if | grep -q Not-Associated; then
   : Not associated, so get it to retry
else
  count=0
   exit     # All OK
fi

iwconfig $if | Mail -s 'Wifi lost association on plug' {my-mail-address}
# Force re-association
count=count+1
iwconfig $if ap auto

Not sure if I have it right there or not.

ljones
9  General Category / General Discussion / Re: Setting up sheevaplug with wlan on: September 09, 2009, 10:08:57 AM
Ok, giving those scripts a try. Do I have to do anything extra to activate them?
No - just drop the control file into /etc/cron.d.  cron will see that the directory has changed at its next minute-wakeup.
Quote
I got the new wlan, btw.
New wlan?  You mean the Alpha USB dongle?

Sorry for the delay - !

BTW the scripts so far seem to be working, though I still have yet to find a proper place to put the sheevaplug (and ext. hard drive).

Yep the new wlan is an alfa one, so far so good -- much better than the netgear!

I can get into the sheevaplug/hard drive with both "ftp" or "gftp" on another linux machine.

*Snag is.....*
Now I need how to figure out how to do port forwarding on the sheevaplug (as I'm using no-ip.com as well). No idea on that one -- !

ljones
10  General Category / General Discussion / Re: Setting up sheevaplug with wlan on: August 26, 2009, 01:40:39 PM
Ok, giving those scripts a try. Do I have to do anything extra to activate them?

I got the new wlan, btw. So far I've had mixed results. On the first attempt it lost the connection very quickly - within the first 10 or so seconds. A Second try lasted for several hours.

ljones
11  General Category / General Discussion / Re: Setting up sheevaplug with wlan on: August 23, 2009, 06:16:01 AM
 Sad Sad

Spoke to soon. More problems!

I have everything up and running with lighttp and an ftp server now. I'm using a powered USB hub to connect the WLAN to the sheevaplug (and also an external hard drive).

Snag is the connection from the USB WG111V2 is really flaky. I mean seriously flaky. I can ping the WG111V2/Sheeva and it often misses pings or completely fails! I've also noticed that the WG111V2 although it connects - its blue light never switches on (it should come on and flash or do something). It is also getting very hot - in fact after a time, the metal USB connector of the WG111V2 gets so hot it is not that far away from being the right tempeature to burn your skin. I'm just glad it is not in the sheeva directly.

I've seen this before with another USB wireless device though and yes another WG111V2 (not my one though!). The light failed to come on and it got very hot though that one also refused to connect to anything (which was from memory a driver problem). Once it connected, the blue light turned on and it didn't get anywhere near as hot.

What I am not sure about is if I am looking at some sort of driver problem or weather or not my WG111V2 is dying. Only thing I can do (and I don't want to get another WG111V2) is to try a different devicel I just bought one off ebay, an Alfa Network AWUS036H . It uses an RTL8187L chipset (which I think is the same as the WG111V2, not an RTL8187B chipset, that one won't work). So I hope to try that one out and see how far I get with it.

Does anyone know if my WG111V2 is on its way out, or maybe it is a software problem?

ljones
12  General Category / General Discussion / Re: Lighttpd & sftp on: August 22, 2009, 02:57:14 AM
Ok, I'm giving proftpd a go Smiley !

SP
13  General Category / General Discussion / Lighttpd & sftp on: August 21, 2009, 03:18:18 PM
Hello Smiley ! Well wireless on my sheevaplug is working, thanks to help here ( http://plugcomputer.org/plugforum/index.php?topic=624.0) and after installing lighttp ( http://www.plugcomputer.org/plugwiki/index.php/QuickStart ) I'm wondering is there way to ftp or sftp into the sheeva? I found that sftp is installed on the sheeva, but I don't know the password to get into it (it's not nosoup4u) and I'm not sure if I can get to the directory (/var/www) lighttp uses via sftp. Can anyone help?

Thanks

ljones
14  General Category / General Discussion / Re: Setting up sheevaplug with wlan on: August 21, 2009, 01:31:05 PM
If ftp won't work I wonder if the sheeva can be setup to serve webpages? (Was hoping to do it via ftp, as (usually) its pretty easy. Smiley

ljones
15  General Category / General Discussion / Re: Setting up sheevaplug with wlan on: August 21, 2009, 12:20:55 PM
Good news! After reading the wiki (the 2.6.30.5 kernel definately needs installing too!) on installing alpha6 & the kernel (everything worked something seems to be working. I set the IP address for the stick as 192.168.0.50, and I can successfully ping that address from another system. Pinging google.com also works on the sheeva, so far so good Smiley all seems to be working! Now .... how to setup a simple FTP server.....?

Notes (or things I found out on the way while doing all of this.....)

1 As I had a newer sheevaplug I had to change the pid's as laid out here ( http://www.plugcomputer.org/plugwiki/index.php/SheevaPlug_Installer ) . The page didn't seem to specify which file to change exactly, though I managed to find which one. I found it in ~/sheeva/sheevaplug-installer-alpha-6/scripts-linux/openocd/config/interface/sheevaplug.cfg . (Decompressed on my main linux system, not the sheeva!).

2. Installing a new kernel ( http://www.plugcomputer.org/plugwiki/index.php/Install_Prebuilt_Kernels_From_sheeva.with-linux.com ) I installed a new kernel following those instructions but used 2.6.30.5, rather than 2.6.30.3. I followed all the instructions including the setenv's and everything after. The printenv bootargs didn't work, but everything else did.

3. I used the command cu -s 115200 -l /dev/ttyUSB1 to connect the sheevaplug from the command line, works with no problems.

4. After all this I could add in the auto/iface commands above Smiley .

ljones
Pages: [1] 2