Streaming music from FTP server to Android - Android Q&A, Help & Troubleshooting

Folks, I am stumped. I need help. I used to run an FTP server on my E4200v1 router, and I had my music available to stream to all of my Android devices anywhere on the Internet. Anytime, anywhere. Everything was just fine and dandy ... that is, until I switched to a new kick-ass router (Netgear's R7000). This one has an FTP server too, and much better USB throughput. So I configured R7000's FTP server (bftpd) in a similar way to E4200's FTP server (see configuration file below). Regular FTP clients, regardless of the platform, work just fine, and Windows FTP streaming clients stream music just fine. It is only Android music streaming clients that do not work anymore. It's just mind boggling! How can this be? Anyway, I did some digging, and uncovered VLC's log (see below): it turns out that VLC just cannot find the file on the FTP server! No other Android streaming client works either, and I am tempted to assume that that is due to the same reason as VLC. Please help! I am attaching below the relevant excerpt from VLC's log, as well as the FTP server's configuration file. My hunch is that there's something rotten in the FTP server's configuration that prevents VLC from finding the file. Many thanks!
Here's VLC's log:
Code:
main access: net: connecting to aqualung.mynetgear.com port 58692
main access: connection succeeded (socket = 53)
ftp access: received response: "230 User logged in."
ftp access: connection accepted (230)
ftp access: sending request: "FEAT" (6 bytes)
ftp access: received response: "211-Extensions supported:"
ftp access: sending request: "USER admin" (12 bytes)
ftp access: received response: "230 User logged in."
ftp access: user accepted
ftp access: sending request: "EPSV ALL" (10 bytes)
ftp access: received response: "229 Entering extended passive mode (|||58472|)"
ftp access: sending request: "TYPE I" (8 bytes)
ftp access: received response: "200 Transfer type changed to BINARY"
[COLOR="Red"][COLOR="Yellow"][COLOR="Red"]ftp access: sending request: "SIZE shares/RouterHDD/Fernando.flac" (37 bytes)
ftp access: received response: "550 Error: No such file or directory."
ftp access: sending request: "CWD shares/RouterHDD/Fernando.flac" (36 bytes)
ftp access: received response: "451 Error: No such file or directory."
ftp access: file or directory does not exist
main access: no access modules matched
main input: open of `ftp://admin:[email protected]:58692/shares/RouterHDD/Fernando.flac' failed
main input: Your input can't be opened
main input: VLC is unable to open the MRL 'ftp://admin:[email protected]:58692/shares/RouterHDD/Fernando.flac'. Check the log for details.
main input: Destroying the input for 'ftp://aqualung.mynetgear.com:58692/shares/RouterHDD/Fernando.flac'[/COLOR][/COLOR][/COLOR]
Here goes the FTP server's config file as well:
Code:
global {
DENY_LOGIN="no"
PORT="58692"
PASSIVE_PORTS="30001-30050"
DATAPORT20="no"
ADMIN_PASS="x"
PATH_BFTPDUTMP=""
XFER_BUFSIZE="131072"
XFER_DELAY="0"
ALLOW_FXP="no"
CONTROL_TIMEOUT="300"
DATA_TIMEOUT="30"
RATIO="none"
ROOTDIR="/tmp"
UMASK="022"
LOGFILE="/var/log/bftpd.log"
HELLO_STRING="bftpd %v at %i ready."
AUTO_CHDIR="/shares"
AUTH="PASSWD"
RESOLVE_CLIENT_IP="no"
MOTD_GLOBAL="/etc/ftpmotd"
MOTD_USER="/.ftpmotd"
RESOLVE_UIDS="yes"
DO_CHROOT="yes"
LOG_WTMP="no"
BIND_TO_ADDR="96.42.222.53"
PATH_FTPUSERS="/tmp/ftpusers"
AUTH_ETCSHELLS="no"
HIDE_GROUP=""
QUIT_MSG="See you later..."
USERLIMIT_GLOBAL="0"
USERLIMIT_SINGLEUSER="0"
USERLIMIT_HOST="0"
GZ_UPLOAD="no"
GZ_DOWNLOAD="no"
}
user admin {
ALLOWCOMMAND_NLST="yes"
ALLOWCOMMAND_LIST="yes"
ALLOWCOMMAND_DELE="yes"
ALLOWCOMMAND_STOR="yes"
ALLOWCOMMAND_MKD="yes"
ALLOWCOMMAND_RMD="yes"
ALLOWCOMMAND_XMKD="yes"
ALLOWCOMMAND_XRMD="yes"
directory "/shares" {
ALLOWCOMMAND_DELE="no"
ALLOWCOMMAND_STOR="no"
ALLOWCOMMAND_MKD="no"
ALLOWCOMMAND_RMD="no"
ALLOWCOMMAND_XMKD="no"
ALLOWCOMMAND_XRMD="no"
}
}
user guest {
ANONYMOUS_USER="yes"
ALLOWCOMMAND_NLST="yes"
ALLOWCOMMAND_LIST="yes"
ALLOWCOMMAND_RETR="yes"
ALLOWCOMMAND_DELE="yes"
ALLOWCOMMAND_STOR="yes"
ALLOWCOMMAND_MKD="yes"
ALLOWCOMMAND_RMD="yes"
ALLOWCOMMAND_XMKD="yes"
ALLOWCOMMAND_XRMD="yes"
directory "/mnt/usb0/part1" {
ALLOWCOMMAND_NLST="yes"
ALLOWCOMMAND_LIST="yes"
ALLOWCOMMAND_RETR="yes"
ALLOWCOMMAND_DELE="yes"
ALLOWCOMMAND_STOR="yes"
ALLOWCOMMAND_MKD="yes"
ALLOWCOMMAND_RMD="yes"
ALLOWCOMMAND_XMKD="yes"
ALLOWCOMMAND_XRMD="yes"
}
directory "/shares" {
ALLOWCOMMAND_DELE="no"
ALLOWCOMMAND_STOR="no"
ALLOWCOMMAND_MKD="no"
ALLOWCOMMAND_RMD="no"
ALLOWCOMMAND_XMKD="no"
ALLOWCOMMAND_XRMD="no"
}
}
My hope is that somebody who knows how to read these things might be able to spot issues. Again, many thanks!

Related

[MOD] LEAP/PEAP wifi

This mod take a couple of minutes to complete and allows for PEAP wifi connections. Requires root access and ADB knowledge.
I AM NOT RESPONSIBLE FOR ANY ISSUES YOU CREATE WITH THIS. IT IS A ROUGH GUIDE AND WORKS FOR ME. DO AT OWN RISK.
Tutorial For Adding LEAP/PEAP Wifi
1. Open Command prompt window in Windows.
2. Go to your directory that you have Android SDK in.
3. Change directory to Tools. So for eg. C:\Android\Tools
4. Type in adb devices. You should see your device. If not install ADB driver. Google it.
5. Type in adb pull /data/misc/wifi/wpa_supplicant .conf c:\wpa_supplicant.conf
6. This stores wpa_supplicant.conf on your C: drive.
7. Open file with wordpad.
8. Add the following to the files:
for PEAP add this code:
network={
ssid="Your SSID"
key_mgmt=WPA-EAP
identity="Your Username"
password="Your Password"
}
for LEAP use this:
network={
ssid="Your SSID"
scan_ssid=1
key_mgmt=IEEE8021X
auth_alg=OPEN SHARED LEAP
eap=LEAP
identity="Your Identity"
password="Your Password"
}
9. Save the file.
10. Type push c:\wpa_supplicant.conf /data/misc/wifi/wpa_supplicant .conf
11. Now the important part. If you miss this your wifi will not work after reboot.
12. Type adb shell
13. Should get # prompt.
14. Type su.
15. Type cd /data/misc/wifi
16. Type chown 1010 wpa*
17. Type chgrp 1010 wpa*
18. Close command prompt window and enjoy LEAP/PEAP wifi.
What is the difference between the two?
A question that might help the unacknowledged
EAP and LANs
EAP originated with the dial-up PPP protocol in order to support protocols beyond PAP and CHAP. For use on packet networks, EAP Over LAN (EAPOL) was created. EAPOL added new message types and allowed an Ethernet header to be prefixed onto EAP messages so they could be transmitted via Ethernet. Following are various EAP methods used mostly in wireless networks, but also in wired networks. See 802.1X, WPA and 802.11i.
EAP-TLS (EAP-Transport Layer Security)
Uses the handshake protocol in TLS, not its encryption method. Client and server authenticate each other using digital certificates. Client generates a pre-master secret key by encrypting a random number with the server's public key and sends it to the server. Both client and server use the pre-master to generate the same secret key.
EAP-TTLS (EAP-Tunneled TLS)
Like EAP-TLS above except only the server has a certificate to authenticate itself to the client first. As in EAP-TLS, a secure connection (the "tunnel") is established with secret keys, but that connection is used to continue the authentication process by authenticating the client and possibly the server again using any EAP method or legacy method such as PAP and CHAP.
PEAP (Protected EAP)
Similar to EAP-TTLS above except it does not support legacy methods. It only moves EAP frames. Windows XP natively supports PEAP.
LEAP (Light EAP, Cisco LEAP)
From Cisco, first implementation of EAP and 802.1X for wireless networks. Uses preshared keys and MS-CHAP protocol to authenticate client and server to each other. Server generates and sends session key to access point. Client computes session key independently based on data received in the CHAP challenge.
EAP-FAST
(EAP-Flexible Authentication via Secure Tunneling)
Enhancement to LEAP from Cisco that provides an encrypted tunnel to distribute preshared keys known as "Protected Access Credential" (PAC) keys. PAC keys may be continuously refreshed to prevent dictionary attacks. EAP-FAST is defined in Cisco's Cisco Compatible Extensions (see CCX).
EAP-SIM (GSM Cellphones)
For GSM phones that switch between cellular and Wi-Fi networks, depending on which is in range. The Subscriber Identity Module (SIM) smart card in the GSM phone (see GSM) contains the secret key used for challenge/response authentication and deriving session keys for encryption.
Click to expand...
Click to collapse
Source:www.pcmag.com/encyclopedia_term
thanks
Thanks for the help clarifying that for peoples.... its finally great to be able to use the WiFi at school... would be nice to implement it automatically, I can't write the code.... but if anyone would like too it would really add to the community....
Maybe I'm misunderstanding this but i know when i try to use LEAP at school, it already has options and what not for it on my phone, none of this is necessary for me
I know with my school which is (PEAP) you couldn't input a username just a password! so if you are having troubles connecting to a LEAP or PEAP connection this is a way to workaround and get it working. If you can already connect don't worry about it! this is for those who cant connect and get crappy data in class! haha
Does this work with MS-CHAP ? How do I define it?
Thanks!
MS-CHAP already works out of the box. At least I can connect at work with PEAP, MS-CHAPv2. Could be a CM 5 thing though.
Thanks for posting this! while it did not directly solve my problem, it made me redouble my efforts to get on my company's wlan with my N1. I have tried this many times over the years with various phones including UIQ3, WM6 and never got anywhere. I always assumed that there was some sort of certificate or windows domain stuff going on.
So this morning I did a wireshark trace and put my laptops drivers into debug logging to find out how my laptop connects.
A bit of googling for the stuff I found enabled me to get a working supplicant.conf on the third attempt and I am amazed!
Appear to be using WPA2 Enterprise with EAPOL LEAP with CCMP encryption on Cisco access points.
Here is the network part of my wpa_supplicant.conf in case it helps anyone:
network={
ssid="SSID"
scan_ssid=1
key_mgmt=WPA-EAP IEEE8021X
auth_alg=SHARED LEAP
group=CCMP
eap=LEAP
identity="DOMAIN\User"
password="Password"
}
maedox said:
MS-CHAP already works out of the box. At least I can connect at work with PEAP, MS-CHAPv2. Could be a CM 5 thing though.
Click to expand...
Click to collapse
Doesn't work for me on stock rom.
What works for PEAP with MSCHAPv2 in my school is:
network={
ssid="<ssid>"
scan_ssid=1
key_mgmt=IEEE8021X
eap=PEAP
identity="<userid>"
password="<password>"
phase2="auth=MSCHAPV2"
priority=2
}
(Previously posted on my blog at http://zitseng.com/archives/2729)
It works, Thanks!
There's a way of doing that without root access:
code.google.com/p/android/issues/detail?id=1871
Step 16 17
when i type
16. Type chown 1010 wpa*
17. Type chgrp 1010 wpa*
i get the error:
"no such user '1010'"
"chgrp: not found"
what is it mean?
Is there anything I may have done wrong?
tanks
Doesn't work for me for some reason. Do you think having CM6 RC3 would make a difference? Not that I could see it doing so.
I've tried a few of the above suggestions but none work for me
The worst thing is it worked fine before I updated my Nexus One to FroYo!
my current settings for the uni are:
network={
ssid="UoN-secure"
key_mgmt=WPA-EAP IEEE8021X
eap=PEAP
identity="username"
password="password"
phase2="auth=MSCHAPV2"
}
Any help would be appreciated
The problem I am having is that it will not keep the Phase 2 auth - MSCHAPV2 setting when I set it up. Every time I go back into the ssid settings (modify network) it has reverted back to "none". However the information above was pulled from the phone so it obviously is storing the MSCHAPV2 setting, just doesn't seem to be using it!
actually cm6 rc3 should have support for Leap/PEAP i have been using it for a while without this hack.... what type of connection are you trying to connect too?

android app: network access for external programs

Dear All,
I am trying to develop an app which calls a external program (written in C) using Runtime.getRuntime().exec method. This program is basically an gstreamer based rtsp server and it works good if I run from the android command prompt. However, when I run the program from the app, I am getting the following error.
Failed to bind socket (Permission denied)
I had given the network access in my AndroidManifest.xml file.
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
I also tried this
String cmd = "ping localhost";
Runtime.getRuntime().exec(cmd);
for which I got
ping: icmp open socket: Operation not permitted
I also tried to run an another program from an app (which shows an image on the android screen - surfaceflinger sink). So, I included android.permission.ACCESS_SURFACE_FLINGER in the manifest file. However, it wasn't able to display on surfaceflinger sink.
So, I have a feeling that these permissions are not passed on to these external programs. Is there a way to achieve this? I don't want to convert these 'C' based programs to Java. Can anyone please help me out.
Thanks,
Krishnan

[Q] Error generating URL

Archos 101IT G8 + UrukDroid 1.6.2.
In my logs I have many messages like this:
Code:
I//usr/bin/djmount(20626): [E] Error generating URL from 'http://192.168.1.1:49000/igddesc.xml' + 'http://fritz.box'
192.168.1.1 is my nameserver/router.
Any idea what djmount tries to do, and why?
At first glance, it seems to try to mount "something" from the UPNP of your router.
What does the 'fritz.box' resolve to? Maybe a computer on your lan?
frotz.box is the avm router.
Indeed, but it is not accessible by that name.
http://192.168.1.1:49000/igddesc.xml does return some information about this router.

[Q] Error in establishing openvpn connection on Toshiba Thrive (Android 3.2.1)

Hello All,
I have been searching for a solution to the below mentioned issue all over the net since last one month and finally referred to this forum by my vpn service provider 'cyberghostvpn'.
I am enclosing my config file (test.ovpn.txt), log file(log.txt) & sample password file for 'auth-user-pass' (pass.txt).
Following are the highlighted points regarding this issue :
While the same config file is working fine on my linux machine on android the same is stopping at the prompt "Enter Auth Username :". After entering username the connection sequence continues but the prompt "Enter Auth Password :" never comes like linux.
Hence my analysis is that the openvpn binary is unable to pass my the username-passowrd combination to my vpn server in the console input mode and an auth-failure control message is received shortly later terminating the connection.
If I pass the username-passord combination through the password file as 'auth-user-pass pass.txt' then also the same thing happens (an auth-failure control message is received terminating the connection).
In linux both of these methods are working successfully in establishing the connection proving that there is nothing wrong with cyberghostvpn.
One important point is though on android the openvpn binary is unable to read the config from the .ovpn file, it runs when the options are given as command line arguments as shown below and the enclosed log file is generated in this method.
# openvpn --client --ca ca.crt --cert my_user_name.crt --key my_user_name.key --remote ch.openvpn.cyberghostvpn.com 9081 ..........--tun-mtu 1500 --fragment 1300 --mssfix > log.txt
Anyone who can either help me resolving this issue or refer it to some expert developer on openvpn will be very much appreciated.
Kind regards,
kingsukm

What can I do if I cannot upload the native symbol file when using the Crash service?

I have been using the Crash service provided by HUAWEI AppGallery Connect recently. However, I encountered two problems when using it. One is that the native symbol file failed to be generated, and two, I failed to upload the file. In this post, I summarized my experience in the hope that it will help others who encounter the same problem.
Generating a Native Symbol File​I added the following code by referring to the official materials but couldn't find the agcp task in the Tasks directory under
Gradle.
Code:
agcp{
debug = true
appVersion = 1.0
symbolUpload = true
debugSoDirectory = "D:\\Onebox\\AndroidProject\\crashdemo\\app\\build\\intermediates\\cmake"
ndkDirectory = "D:\\AndroidSDK\\sdk\\ndk\\21.3.6528147"
}
I checked the documentation and found that I hadn't added the JSON file, so I added the JSON file to the app directory and synchronized the project. This resolved the problem.
A missing debugSoDirectory parameter will also cause the problem. So, make sure you add it as well.
Uploading a Native Symbol File​Once the file was generated, I double-clicked processReleaseSymbolUpload. An HTTP exception was reported, as shown in the following figure.
I often connect my PC to our company's proxy. Once I disconnected from the proxy, the file was uploaded successfully.
If you cannot upload the file using a gradle plugin, you can also use a symbol table tool.
Or, you can manually upload the file in AppGallery Connect.
For more info see the official documentation

Categories

Resources