VPNC to FritzBox works!!!! - Desire Android Development

YES with this patched vpnc you can connect from a rooted desire (or any other android device) to your AVM fritzbox with the original firmware. The included vpnc-script will help to fix the routing problems.
You need a rooted Android device with an tun.ko module
First setup your fritzbox like the iphone setup which is described at the avm portal (google-> "avm iphone vpn")
Install signed-FritzBox.apk to your phone.
Setup now your vpnc-gui and be happy.
--------------------------------------------------------------------------
Some detailed infos how to connect the Fritzbox with IPSEC via VPNC:
1.) you must use a IKE_ATTRIB_LIFE_DURATION = 3600 (seconds)
2.) you must use draft-ietf-ipsec-nat-t-ike-03
the original vpnc uses a IKE_ATTRIB_LIFE_DURATION with 2147483 (seconds) and only uses draft-ietf-ipsec-nat-t-ike-00 -> 02.
I change the timing to 3600 (seconds) and change the transformset 02 to 03.
Timing -> find in vpnc 000020C49B and change it to 0000000E10 (2x)
Transformset -> find in vpnc CD60464335DF21F87CFDB2FC68B6A448 and change it to 7D9419A65310CA6F2C179D9215529D56 (1x)
By the way these patch will help any vpnc user on every linux (i tested this with ubuntu and it works perfect)
----------------------------------------------------------------------------
update 20.12.2010
----------------------------------------------------------------------------
New APK to install on a rooted Android device. After installing you can connet via IPSEC VPN to a cisco device and to the FritzBox with the latest Firmware without modifying the FritzBox
For all who wants to use the FritzPhone App to make phonecalls via vpnc this will not work because the app did not use the 3G interface (only wlan). Download the app "3cx" from the market and in the setup menu "integration" you will find "Enable 3G", thats all.

Hi there!
Really nice one but I'm getting a forced closed when I push the connect button.
I'm using a SE X10 with android 2.1.........
Sometimes I hate my phone.......

Merry Christmas.
Is your Device rooted and had the vpnc the exec permissions ?
Please install "Quick System Info" and check the loginfos via the Logcat.
Maybe in your Kernel the tun.ko is missing.

Hello
@mp1405
Thanks for the signed-FritzBox.apk. I finally got it running on my Samsung I9000 Froyo XXJPU and Fritzbox 7390
First I had also the FC because the tun.ko was missing. Now it works but but I have to load the kernel module every reboot in the konsole with insmod /system/lib/modules/tun.ko
I edited the file /init.rc with the line insmod /system/lib/modules/tun.ko but every reboot a "recovery" init.rc is loaded without my insmod line. There was also the tip to copy the tun.ko into /lib/modules/tun.ko but the tun.ko gets deleted after every reboot.
Kind regards

@mp1405
Thanks for your work and time for this patched Version.
For my understanding:
IPSec ID is what ? My e-Mailadress from the FritzboxConfig ?
IPSec Secret is the Passphrase ?
Is this correct ?
Thanks!

Hello
IPSec ID: Yes, your e-Mailadress from the FritzboxConfig (it is the entry "user_fqdn" which you have to replace with "key_id" in the config.
IPSec Secret: Is the Passphrase (also named Pre-Shared Key or just "key") in the Fritzbox Configs.

Perfect! It works with the correct tun.ko
Thanks @all and mp1405 for this patched Version.

my fritzbox said The import of the VPN-Settings faild.
And I did it twice exactly with the iphone settings.
anyone else with that kind of problem?
I'm using Fritzbox 7270 fon with the latest firmware.
stephen

@stephen21
have the same problem with 7270, every cfg that is "toucht" with any editor. dosnt work.
Im kontakted the avm support and wait to the answer.
greatings
meinbier
PS. Sorry for my bad english

Thanks for the apk and the howto,
I've done everything as described, but I get always following (log) message :
Code:
D/VPN_Connections( 5436): process stderr: no response from target

@sky01x
Hi Sky, where You have found the right tun.ko?
Thanks for a hint.
To.

@lier99
I got the tun.ko from:
http://forum.xda-developers.com/showthread.php?t=793712
Best regards

I9000XXJPY
Kernel 2.6.32.9 hardcore k12h-500hz #2
XXJPY_Doc_v7_Kitchen
Fritzbox 7270
Thanks for the apk and the howto,
but still a little trouble.
The Fritzbox cfg is changed according to ipfone config from AVM.
The VPN Connections says connected.
The Fritzbox says Status green, I have an internet IP, I see my asigned IP, but for the local net I get 0.0.0.0. From there I do not get into my local network. When ever I try to change the Fritzbox cfg to
phase2localid {
ipnet {
ipaddr = 192.168.1.0;
mask = 255.255.255.0;
}
}
phase2remoteid {
ipaddr = 192.168.1.203;
}
phase2ss = "esp-all-all/ah-none/comp-all/no-pfs";
accesslist =
"permit ip 192.168.1.0 255.255.255.0 192.168.1.203 255.255.255.255";
like my Notebook runs fine on the tunel, the connection failed.
Any idea?

VPN dont work via GSM/UMTS connection
Hello,
need help my VPN dont work via GSM/UMTS connection.
My configuration:
FritzBox 7170 with Firmware-Version 29.04.86-18946 (Laborversion)
and VPN configuerd as IPhone.
Dynamic DNS is aktiv and ready.
Handy HTC Desire with LeeDriod v2.03c
VPNC from mp1405 singned-myVPNC.apk
now if I'm connected via WLAN to my FritzBox I have a VPN connection,
but via GSM or UMTS I get no connection - why?
Thanks

Thanks for your great work! My 7270 shows connection established.
However there seems to be a problem with your vpnc-script. I'm getting a
Device "default via <UMTS-IP> dev rmnet0 " does not exist.
Error: either "to" is duplicate, or "hoplimit" is a garbage.
backing up dns settings
vpnc-script ran to completion
on the console. Maybe I can further look into it tonight.
#Running Leedroid2.3a

mp1405 said:
----------------------------------------------------------------------------
update 20.12.2010
----------------------------------------------------------------------------
New APK to install on a rooted Android device. After installing you can connet via IPSEC VPN to a cisco device and to the FritzBox with the latest Firmware without modifying the FritzBox
Click to expand...
Click to collapse
So, do you mean that i need only to install the attached signed-myVPNC.apk and i can connect to my fritz without doing the iphone patching procedure on the fritz side? or i need to do it anyway?
does this apk work with gingerbread too?
update:
i imported the modified vpn config to my fritz, installed the signed VPN Connect.apk and set up the account, and tried to connect, it says connected on both Android and my fritz, but i cannot connect to addresses inside my fritz.
the build of android i use (NexusHD2 - Gingerbread 2.2) seems to have a tun.so file, so i don't need to import it, right?
what else can i do ??

mp1405 said:
...
For all who wants to use the FritzPhone App to make phonecalls via vpnc this will not work because the app did not use the 3G interface (only wlan). Download the app "3cx" from the market and in the setup menu "integration" you will find "Enable 3G", thats all.
Click to expand...
Click to collapse
Hi,
Thank you for this. The last thing that I will not get to work is to connect with Firtz!box fon to the box accross 3g
I have downloaded the 3cx an enabled "Enable 3g" without any other settings in the profile. But in fritz!box fon there the "not connected" is remaining. Any other hints?
Android "DHD Leedroid 2.2.2"
FritzBox "7270 Firmware 54.04.88"
Thx

I am running a HD2 with the latest CM7 ROM and I have a FritzBox 3270 with the latest firmware.
Thanks to this I can finally establish a VPN connection with my phone.

not work for me
Fritzbox config:
vpncfg {
connections {
enabled = yes;
conn_type = conntype_user;
name = "my mail";
always_renew = no;
reject_not_encrypted = no;
dont_filter_netbios = yes;
localip = 0.0.0.0;
local_virtualip = 0.0.0.0;
remoteip = 0.0.0.0;
remote_virtualip = 192.168.178.201;
remoteid {
key_id = "my mail";
}
mode = phase1_mode_aggressive;
phase1ss = "all/all/all";
keytype = connkeytype_pre_shared;
key = "my key";
cert_do_server_auth = no;
use_nat_t = yes;
use_xauth = yes;
use_cfgmode = no;
xauth {
valid = yes;
username = "my login";
passwd = "mypass";
}
phase2localid {
ipnet {
ipaddr = 192.168.178.0;
mask = 255.255.255.0;
}
}
phase2remoteid {
ipaddr = 192.168.178.201;
}
phase2ss = "esp-all-all/ah-none/comp-all/pfs";
accesslist =
"permit ip 192.168.178.0 255.255.255.0 192.168.178.201 255.255.255.255";
}
ike_forward_rules = "udp 0.0.0.0:500 0.0.0.0:500",
"udp 0.0.0.0:4500 0.0.0.0:4500";
}
// EOF
Click to expand...
Click to collapse
And log from android (MIUI):
pre-init phase...
connect phase...
vpnc-script ran to completion
quick mode response rejected: (ISAKMP_N_INVALID_MESSAGE_ID)(9)
this means the concentrator did not like what we had to offer.
Possible reasons are:
* concentrator configured to require a firewall
this locks out even Cisco clients on any platform expect windows
which is an obvious security improvment. There is no workaround (yet).
* concentrator configured to require IP compression
this is not yet supported by vpnc.
Note: the Cisco Concentrator Documentation recommends against using
compression, expect on low-bandwith (read: ISDN) links, because it
uses much CPU-resources on the concentrator
vpnc version 0.5.3-mjm1-140M
S1 init_sockaddr
[2011-07-29 21:05:48]
S2 make_socket
[2011-07-29 21:05:48]
S3 setup_tunnel
[2011-07-29 21:05:48]
using interface tun0
S4 do_phase1_am
[2011-07-29 21:05:48]
S4.1 create_nonce
[2011-07-29 21:05:48]
S4.2 dh setup
[2011-07-29 21:05:48]
S4.3 AM packet_1
[2011-07-29 21:05:48]
S4.4 AM_packet2
[2011-07-29 21:05:49]
(Xauth)
(DPD)
(Nat-T 03)
(unknown)
got ike lifetime attributes: 3600 seconds
IKE SA selected psk+xauth-aes256-sha1
ignoring that peer is DPD capable (RFC3706)
peer is NAT-T capable (draft-03)
peer is using type 130 (ISAKMP_PAYLOAD_NAT_D_OLD) for NAT-Discovery payloads
peer is using type 130 (ISAKMP_PAYLOAD_NAT_D_OLD) for NAT-Discovery payloads
peer is using type 130 (ISAKMP_PAYLOAD_NAT_D_OLD) for NAT-Discovery payloads
peer is using type 130 (ISAKMP_PAYLOAD_NAT_D_OLD) for NAT-Discovery payloads
S4.5 AM_packet3
[2011-07-29 21:05:49]
NAT status: this end behind NAT? YES -- remote end behind NAT? YES
NAT-T mode, adding non-esp marker
S4.6 cleanup
[2011-07-29 21:05:49]
S5 do_phase2_xauth
[2011-07-29 21:05:49]
S5.1 xauth_start
[2011-07-29 21:05:49]
S5.2 notice_check
[2011-07-29 21:05:49]
S5.3 type-is-xauth check
[2011-07-29 21:05:49]
S5.4 xauth type check
[2011-07-29 21:05:49]
S5.5 do xauth authentication
[2011-07-29 21:05:49]
NAT-T mode, adding non-esp marker
S5.2 notice_check
[2011-07-29 21:05:49]
S5.3 type-is-xauth check
[2011-07-29 21:05:49]
S5.6 process xauth response
[2011-07-29 21:05:49]
NAT-T mode, adding non-esp marker
S5.7 xauth done
[2011-07-29 21:05:49]
S6 do_phase2_config
[2011-07-29 21:05:49]
S6.1 phase2_config send modecfg
[2011-07-29 21:05:49]
NAT-T mode, adding non-esp marker
S6.2 phase2_config receive modecfg
[2011-07-29 21:05:50]
got save password setting: 0
got address 192.168.178.201
S7 setup_link (phase 2 + main_loop)
[2011-07-29 21:05:50]
S7.0 run interface setup script
[2011-07-29 21:05:50]
S7.1 QM_packet1
[2011-07-29 21:05:50]
S7.2 QM_packet2 send_receive
[2011-07-29 21:05:50]
NAT-T mode, adding non-esp marker
S7.3 QM_packet2 validate type
[2011-07-29 21:05:50]
S7.4 process and skip lifetime notice
[2011-07-29 21:05:50]
S7.5 QM_packet2 check reject offer
[2011-07-29 21:05:50]
---!!!!!!!!! entering phase2_fatal !!!!!!!!!---
NAT-T mode, adding non-esp marker
NAT-T mode, adding non-esp marker
disconnect phase...
ip: can't find device 'tun0'
ip: an inet prefix is expected rather than ""
ip: RTNETLINK answers: No such process
DNS not restored (no active default gateway)
Click to expand...
Click to collapse
Please help me. What I should do ?

If this helps the developers to keep the stuff up to date, here's the Handshake from a fritzbox 7240 v. Firmware-Version 73.05.05 with default vpn config:
Code:
~$ ike-scan -v -s 0 --aggressive --id=xxxxxxxxxxxxx fritz.box
DEBUG: pkt len=380 bytes, bandwidth=56000 bps, int=58285 us
Starting ike-scan 1.9 with 1 hosts (http://www.nta-monitor.com/tools/ike-scan/)
x.x.x.x Aggressive Mode Handshake returned
HDR=(CKY-R=a79e96b1e2acf788)
SA=(Enc=3DES Hash=SHA1
Auth=PSK Group=2:modp1024
LifeType=Seconds LifeDuration=28800)
KeyExchange(128 bytes)
Nonce(16 bytes)
ID(Type=ID_IPV4_ADDR, Value=xxxxxxxx)
Hash(20 bytes)
Notification=(Type=RESPONDER-LIFETIME, SPI=741b17c61bce146aa79e96b1e2acf788,
Data=800b0001800c0e10)
VID=09002689dfd6b712 (XAUTH)
VID=afcad71368a1f1c96b8696fc77570100
(Dead Peer Detection v1.0)
Ending ike-scan 1.9: 1 hosts scanned in 0.269 seconds (3.72 hosts/sec). 1 returned handshake; 0 returned notify
The fritzbox only answers aggressive mode, this may be the reason for faulting android vpn client, see android system logs...
Code:
Get osmonitor app exported logcat log (no permissions over sshfs):
$ scp htc:/mnt/sdcard/log1 .
grep it for ipsec vpn racoon:
08/03/2011 17:03:50 [INFORMATION] racoon(7090) ipsec-tools 0.7.3 (http://ipsec-tools.sf.net)
08/03/2011 17:01:44 [INFORMATION] ActivityManager(118) Displayed com.android.settings/.vpn.VpnSettings: +312ms
08/03/2011 17:01:57 [DEBUG] com.android.settings.vpn.AuthenticationActor(3067) ~~~~~~ connect() succeeded!
at com.android.server.vpn.VpnService.getIp(VpnService.java:108)
at com.android.server.vpn.VpnService.onConnect(VpnService.java:135)
at com.android.server.vpn.VpnServiceBinder$2.run(VpnServiceBinder.java:117)
08/03/2011 17:01:58 [INFORMATION] ipd(77) IP CMD: /system/bin/ip ru del from all to all table vpn prio 2500
08/03/2011 17:02:06 [INFORMATION] ActivityManager(118) Displayed com.android.settings/.vpn.VpnEditor: +479ms
08/03/2011 17:03:39 [INFORMATION] ActivityManager(118) Displayed com.android.settings/.vpn.VpnSettings: +328ms
08/03/2011 17:03:49 [DEBUG] com.android.settings.vpn.AuthenticationActor(3067) ~~~~~~ connect() succeeded!
at com.android.server.vpn.VpnService.waitUntilConnectedOrTimedout(VpnService.java:210)
at com.android.server.vpn.VpnService.onConnect(VpnService.java:139)
at com.android.server.vpn.VpnServiceBinder$2.run(VpnServiceBinder.java:117)
08/03/2011 17:04:35 [INFORMATION] ipd(77) IP CMD: /system/bin/ip ru del from all to all table vpn prio 2500
08/03/2011 17:01:57 [INFORMATION] SProxy_racoon(6207) Stop VPN daemon: racoon
08/03/2011 17:01:57 [DEBUG] SProxy_racoon(6207) racoon is stopped after 0 msec
08/03/2011 17:01:57 [DEBUG] SProxy_racoon(6207) stopping racoon, success? true
08/03/2011 17:01:58 [INFORMATION] SProxy_racoon(6207) Stop VPN daemon: racoon
08/03/2011 17:01:58 [DEBUG] SProxy_racoon(6207) racoon is stopped after 0 msec
08/03/2011 17:01:58 [DEBUG] SProxy_racoon(6207) stopping racoon, success? true
08/03/2011 17:03:49 [INFORMATION] SProxy_racoon(6207) Stop VPN daemon: racoon
08/03/2011 17:03:49 [DEBUG] SProxy_racoon(6207) racoon is stopped after 0 msec
08/03/2011 17:03:49 [DEBUG] SProxy_racoon(6207) stopping racoon, success? true
08/03/2011 17:03:49 [INFORMATION] SProxy_racoon(6207) Start VPN daemon: racoon
08/03/2011 17:03:49 [DEBUG] SProxy_racoon(6207) racoon is running after 0 msec
08/03/2011 17:03:49 [DEBUG] racoon(7090) Waiting for control socket
08/03/2011 17:03:49 [DEBUG] SProxy_racoon(6207) service not yet listen()ing; try again
08/03/2011 17:03:50 [DEBUG] racoon(7090) Received 3 arguments
08/03/2011 17:03:50 [INFORMATION] racoon(7090) ipsec-tools 0.7.3 (http://ipsec-tools.sf.net)
08/03/2011 17:03:50 [INFORMATION] racoon(7090) 192.168.0.106[500] used as isakmp port (fd=10)
08/03/2011 17:03:50 [INFORMATION] racoon(7090) 192.168.0.106[500] used for NAT-T
08/03/2011 17:03:50 [INFORMATION] racoon(7090) 192.168.0.106[4500] used as isakmp port (fd=11)
08/03/2011 17:03:50 [INFORMATION] racoon(7090) 192.168.0.106[4500] used for NAT-T
08/03/2011 17:03:50 [INFORMATION] SProxy_racoon(6207) got data from control socket: 3
08/03/2011 17:03:52 [INFORMATION] racoon(7090) no in-bound policy found: 192.168.0.3/32[1701] 192.168.0.106/32[0] proto=udp dir=in
08/03/2011 17:03:52 [INFORMATION] racoon(7090) IPsec-SA request for 192.168.0.3 queued due to no phase1 found.
08/03/2011 17:03:52 [INFORMATION] racoon(7090) initiate new phase 1 negotiation: 192.168.0.106[500]<=>192.168.0.3[500]
08/03/2011 17:03:52 [INFORMATION] racoon(7090) begin Identity Protection mode.
08/03/2011 17:04:23 [ERROR] racoon(7090) phase2 negotiation failed due to time up waiting for phase1. ESP 192.168.0.3[0]->192.168.0.106[0]
08/03/2011 17:04:23 [INFORMATION] racoon(7090) delete phase 2 handler.
08/03/2011 17:04:23 [INFORMATION] racoon(7090) Bye
08/03/2011 17:04:35 [INFORMATION] SProxy_racoon(6207) Stop VPN daemon: racoon
08/03/2011 17:04:35 [DEBUG] SProxy_racoon(6207) racoon is stopped after 0 msec
08/03/2011 17:04:35 [DEBUG] SProxy_racoon(6207) stopping racoon, success? true
I'm trying to adapt the fritzbox vpn config to match the faulting android 2.3.3 built-in vpn-client's requirements, further logs from other vpn-clients will follow.
The android vpn asks for xauth credentials, trying to configure fritzbox for xauth...
no success,
android racoon still phase 1 waiting timeout, changing fritzbox from agressive to main mode...
no success, still phase1 time out, taking and analyzing wireshark dump from
http://fritz.box//html/capture.html (if ath0 or guest1 etc)
Ok, here's what the android racoon sends to the fritz.box:
Code:
$ /usr/sbin/tcpdump -vvv -r fritz-ath0.eth src or dst port 500 or src or dst port l2f
reading from file fritz-ath0.eth, link-type EN10MB (Ethernet)
00:29:57.082587 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 380)
htc.fritz.box.isakmp > fritz.box.isakmp: [udp sum ok] isakmp 1.0 msgid 00000000 cookie 3958b87fd7c4e0a9->0000000000000000: phase 1 I ident:
(sa: doi=ipsec situation=identity
(p: #1 protoid=isakmp transform=6
(t: #1 id=ike (type=lifetype value=sec)(type=lifeduration value=7080)(type=enc value=3des)(type=auth value=preshared)(type=hash value=sha1)(type=group desc value=modp1024))
(t: #2 id=ike (type=lifetype value=sec)(type=lifeduration value=7080)(type=enc value=3des)(type=auth value=preshared)(type=hash value=md5)(type=group desc value=modp1024))
(t: #3 id=ike (type=lifetype value=sec)(type=lifeduration value=7080)(type=enc value=1des)(type=auth value=preshared)(type=hash value=sha1)(type=group desc value=modp1024))
(t: #4 id=ike (type=lifetype value=sec)(type=lifeduration value=7080)(type=enc value=1des)(type=auth value=preshared)(type=hash value=md5)(type=group desc value=modp1024))
(t: #5 id=ike (type=lifetype value=sec)(type=lifeduration value=7080)(type=enc value=aes)(type=keylen value=0080)(type=auth value=preshared)(type=hash value=sha1)(type=group desc value=modp1024))
(t: #6 id=ike (type=lifetype value=sec)(type=lifeduration value=7080)(type=enc value=aes)(type=keylen value=0080)(type=auth value=preshared)(type=hash value=md5)(type=group desc value=modp1024))))
(vid: len=16 4a131c81070358455c5728f20e95452f)
(vid: len=16 cd60464335df21f87cfdb2fc68b6a448)
(vid: len=16 90cb80913ebb696e086381b5ec427b1f)
(vid: len=16 4485152d18b6bbcd0be8a8469579ddcc)
(vid: len=20 4048b7d56ebce88525e7de7f00d6c2d380000000)
00:30:07.104380 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 380)
htc.fritz.box.isakmp > fritz.box.isakmp: [udp sum ok] isakmp 1.0 msgid 00000000 cookie 3958b87fd7c4e0a9->0000000000000000: phase 1 I ident:
(sa: doi=ipsec situation=identity
(p: #1 protoid=isakmp transform=6
(t: #1 id=ike (type=lifetype value=sec)(type=lifeduration value=7080)(type=enc value=3des)(type=auth value=preshared)(type=hash value=sha1)(type=group desc value=modp1024))
(t: #2 id=ike (type=lifetype value=sec)(type=lifeduration value=7080)(type=enc value=3des)(type=auth value=preshared)(type=hash value=md5)(type=group desc value=modp1024))
(t: #3 id=ike (type=lifetype value=sec)(type=lifeduration value=7080)(type=enc value=1des)(type=auth value=preshared)(type=hash value=sha1)(type=group desc value=modp1024))
(t: #4 id=ike (type=lifetype value=sec)(type=lifeduration value=7080)(type=enc value=1des)(type=auth value=preshared)(type=hash value=md5)(type=group desc value=modp1024))
(t: #5 id=ike (type=lifetype value=sec)(type=lifeduration value=7080)(type=enc value=aes)(type=keylen value=0080)(type=auth value=preshared)(type=hash value=sha1)(type=group desc value=modp1024))
(t: #6 id=ike (type=lifetype value=sec)(type=lifeduration value=7080)(type=enc value=aes)(type=keylen value=0080)(type=auth value=preshared)(type=hash value=md5)(type=group desc value=modp1024))))
(vid: len=16 4a131c81070358455c5728f20e95452f)
(vid: len=16 cd60464335df21f87cfdb2fc68b6a448)
(vid: len=16 90cb80913ebb696e086381b5ec427b1f)
(vid: len=16 4485152d18b6bbcd0be8a8469579ddcc)
(vid: len=20 4048b7d56ebce88525e7de7f00d6c2d380000000)
00:30:17.123829 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 380)
htc.fritz.box.isakmp > fritz.box.isakmp: [udp sum ok] isakmp 1.0 msgid 00000000 cookie 3958b87fd7c4e0a9->0000000000000000: phase 1 I ident:
(sa: doi=ipsec situation=identity
(p: #1 protoid=isakmp transform=6
(t: #1 id=ike (type=lifetype value=sec)(type=lifeduration value=7080)(type=enc value=3des)(type=auth value=preshared)(type=hash value=sha1)(type=group desc value=modp1024))
(t: #2 id=ike (type=lifetype value=sec)(type=lifeduration value=7080)(type=enc value=3des)(type=auth value=preshared)(type=hash value=md5)(type=group desc value=modp1024))
(t: #3 id=ike (type=lifetype value=sec)(type=lifeduration value=7080)(type=enc value=1des)(type=auth value=preshared)(type=hash value=sha1)(type=group desc value=modp1024))
(t: #4 id=ike (type=lifetype value=sec)(type=lifeduration value=7080)(type=enc value=1des)(type=auth value=preshared)(type=hash value=md5)(type=group desc value=modp1024))
(t: #5 id=ike (type=lifetype value=sec)(type=lifeduration value=7080)(type=enc value=aes)(type=keylen value=0080)(type=auth value=preshared)(type=hash value=sha1)(type=group desc value=modp1024))
(t: #6 id=ike (type=lifetype value=sec)(type=lifeduration value=7080)(type=enc value=aes)(type=keylen value=0080)(type=auth value=preshared)(type=hash value=md5)(type=group desc value=modp1024))))
(vid: len=16 4a131c81070358455c5728f20e95452f)
(vid: len=16 cd60464335df21f87cfdb2fc68b6a448)
(vid: len=16 90cb80913ebb696e086381b5ec427b1f)
(vid: len=16 4485152d18b6bbcd0be8a8469579ddcc)
(vid: len=20 4048b7d56ebce88525e7de7f00d6c2d380000000)
00:30:27.145065 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 380)
htc.fritz.box.isakmp > fritz.box.isakmp: [udp sum ok] isakmp 1.0 msgid 00000000 cookie 3958b87fd7c4e0a9->0000000000000000: phase 1 I ident:
(sa: doi=ipsec situation=identity
(p: #1 protoid=isakmp transform=6
(t: #1 id=ike (type=lifetype value=sec)(type=lifeduration value=7080)(type=enc value=3des)(type=auth value=preshared)(type=hash value=sha1)(type=group desc value=modp1024))
(t: #2 id=ike (type=lifetype value=sec)(type=lifeduration value=7080)(type=enc value=3des)(type=auth value=preshared)(type=hash value=md5)(type=group desc value=modp1024))
(t: #3 id=ike (type=lifetype value=sec)(type=lifeduration value=7080)(type=enc value=1des)(type=auth value=preshared)(type=hash value=sha1)(type=group desc value=modp1024))
(t: #4 id=ike (type=lifetype value=sec)(type=lifeduration value=7080)(type=enc value=1des)(type=auth value=preshared)(type=hash value=md5)(type=group desc value=modp1024))
(t: #5 id=ike (type=lifetype value=sec)(type=lifeduration value=7080)(type=enc value=aes)(type=keylen value=0080)(type=auth value=preshared)(type=hash value=sha1)(type=group desc value=modp1024))
(t: #6 id=ike (type=lifetype value=sec)(type=lifeduration value=7080)(type=enc value=aes)(type=keylen value=0080)(type=auth value=preshared)(type=hash value=md5)(type=group desc value=modp1024))))
(vid: len=16 4a131c81070358455c5728f20e95452f)
(vid: len=16 cd60464335df21f87cfdb2fc68b6a448)
(vid: len=16 90cb80913ebb696e086381b5ec427b1f)
(vid: len=16 4485152d18b6bbcd0be8a8469579ddcc)
(vid: len=20 4048b7d56ebce88525e7de7f00d6c2d380000000)
00:30:29.149902 IP (tos 0x0, ttl 64, id 51970, offset 0, flags [DF], proto UDP (17), length 97)
htc.fritz.box.51610 > fritz.box.l2f: [udp sum ok] l2tp:[TLS](0/0)Ns=0,Nr=0 *MSGTYPE(SCCRQ) *PROTO_VER(1.0) *HOST_NAME(anonymous) *FRAMING_CAP(AS) *ASSND_TUN_ID(798) *RECV_WIN_SIZE(1)
Code:
$ ike-scan -v -s 0 fritz.box
DEBUG: pkt len=336 bytes, bandwidth=56000 bps, int=52000 us
Starting ike-scan 1.9 with 1 hosts (http://www.nta-monitor.com/tools/ike-scan/)
--- Pass 1 of 3 completed
--- Pass 2 of 3 completed
--- Pass 3 of 3 completed
Ending ike-scan 1.9: 1 hosts scanned in 2.445 seconds (0.41 hosts/sec). 0 returned handshake; 0 returned notify
wireshark compatible file is attached.
I've found the allowed ipsec strategies for /bin/avmike in
Code:
# find / -name *ipsec*
/etc/default.Fritz_Box_7240/1und1/ipsec.cfg
/etc/default.Fritz_Box_7240/avm/ipsec.cfg
#
#
# find / -name *ike*
/bin/avmike
/lib/libikeapi.so
/lib/libikeapi.so.2
/lib/libikeapi.so.2.0.0
/lib/libikecrypto.so
/lib/libikecrypto.so.1
/lib/libikecrypto.so.1.0.0
/lib/libikeossl.so
/lib/libikeossl.so.1
/lib/libikeossl.so.1.0.0
/var/run/avmike.pid
/var/tmp/csem/M-ikeapi-reply-dsld-W
/var/tmp/csem/M-ikeapi-reply-dsld-R
/var/tmp/csem/M-ikeapi-request-dsld-W
/var/tmp/csem/M-ikeapi-request-dsld-R
#
# find / -name *vpn*
/etc/default.Fritz_Box_7240/1und1/vpn.cfg
/etc/default.Fritz_Box_7240/avm/vpn.cfg
/usr/share/ctlmgr/libvpnstat.so
/usr/www/1und1/html/de/internet/vpn.frm
/usr/www/1und1/html/de/internet/vpn.html
/usr/www/1und1/html/de/internet/vpn.js
/usr/www/1und1/html/de/menus/menu2_vpn.html
/usr/www/1und1/html/de/vpn
/usr/www/1und1/html/vpn_import_nok_reboot.html
/usr/www/1und1/html/vpn_import_ok_reboot.html
/usr/www/1und1/html/vpn_import_pwd_nok_reboot.html
/usr/www/avm/html/de/internet/vpn.frm
/usr/www/avm/html/de/internet/vpn.html
/usr/www/avm/html/de/internet/vpn.js
/usr/www/avm/html/de/menus/menu2_vpn.html
/usr/www/avm/html/de/vpn
/usr/www/avm/html/vpn_import_nok_reboot.html
/usr/www/avm/html/vpn_import_ok_reboot.html
/usr/www/avm/html/vpn_import_pwd_nok_reboot.html
/var/vpnroutes
/var/flash/vpn.cfg
/var/tmp/vpncfgimport.eff
#
# avmike -h
illegal option 'h'
usage: avmike avm_ike [options]
options:
-? - print this help
-D STRING - switch debug logs on. (NULL)
-d - debug service. (NOTSET)
-f - run in forground. (NOTSET)
-s - stop daemon. (NOTSET)
-v - verbose. (NOTSET)
-p STRING - Pidfile. ("/var/run/avmike.pid")
-w - [Hit return to continue]. (NOTSET)
-p INTEGER - port to use. (0)
ISAKMP/IPSec negoiation server
Trying to enable debug logs... debug options silently disabled in release build.
Matching fritzbox factory ike config for Android 2.3.3 racoon is phase1ss = "racoon-dh2-aes-sha", but --lifetime=3600 or datatype length or formatting, or wrong other config file settings:
Code:
# ike-scan fritz.box -M --retry=1 --trans=7/128,2,1,2 --lifetime=3600
Starting ike-scan 1.9 with 1 hosts (http://www.nta-monitor.com/tools/ike-scan/)
Ending ike-scan 1.9: 1 hosts scanned in 0.532 seconds (1.88 hosts/sec). 0 returned handshake; 0 returned notify
19:37:36.599736 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 116)
tom1.isakmp > fritz.box.isakmp: [udp sum ok] isakmp 1.0 msgid 00000000 cookie 84cdf79f56296b8b->0000000000000000: phase 1 I ident:
(sa: doi=ipsec situation=identity
(p: #1 protoid=isakmp transform=1
(t: #1 id=ike (type=enc value=aes)(type=hash value=sha1)(type=auth value=preshared)(type=group desc value=modp1024)(type=keylen value=0080)(type=lifetype value=sec)(type=lifeduration [B]len=4 value=00007080[/B]))))
No answer from avmike, trying Android... no success.
Surely config file mismatch, see http://www.ip-phone-forum.de/showthread.php?t=161793&p=1672919&viewfull=1#post1672919 and search there under avm for posts containing phase1_mode_idp.
No. Tried to override the /etc/default/ipsec.cfg inline in vpn.cfg and > /var/flash/vpn.cfg but the box does all to prevent any tricks to change the ipsec.cfg, even removing the ipsec part from vpn.cfg when in comments.
Giving up and will remove the proprietary crap avm vpn daemon from the box, install something like freetz with racoon.
For those not able/not want to root their phone here's the solution for fritzbox:
http://www.ip-phone-forum.de/showthread.php?t=197637&pagenumber=
http://freetz.org/ticket/854
(Mostly german, use google translator)

Related

[Q] problem with network apps from busybox on prime 1.6

Hello xda,
I have the problem with all networks apps from busybox like ping, wget etc. BTW, the same apps from android work fine:
Code:
bash-4.1# which ping
/system/xbin/ping
bash-4.1# ls -la /system/xbin/ping
lrwxrwxrwx 1 root 2000 20 Jul 26 07:49 /system/xbin/ping -> /system/xbin/busybox
bash-4.1# ping google.com
ping: bad address 'google.com'
bash-4.1# /system/xbin/busybox ping google.com
ping: bad address 'google.com'
bash-4.1# /system/xbin/busybox wget google.com
wget: bad address 'google.com'
bash-4.1# /system/bin/ping -c1 google.com
PING google.com (209.85.148.99) 56(84) bytes of data.
64 bytes from google.com (209.85.148.99): icmp_seq=1 ttl=53 time=44.2 ms
--- google.com ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 44.271/44.271/44.271/0.000 ms
bash-4.1#
Any solutions?
Thanks
using jping
I have terminal IDE, which includes jping, so I can use:
jping google.com | sed 's/.*: \(.*\)/\1/' | xargs ping
And I get the name resolved for me.

[Q] IPSec on ICS w/ pfSense

Has anyone gotten IPSec (either L2TP/IPSec w/ PSK or IPSec Xauth PSK) to work on ICS (4.0.3) with pfSense 2.0.1? I'm looking for clues. It's not working for me.
The closest I've gotten this to work is by setting level 1 to aggressive/DES/MD5 and level 2 to ESP/AES(auto)/MD5.
Not sure if this is part of the problem though:
racoon: INFO: login failed for user "XXXXXXXX"
racoon: DEBUG: Attribute XAUTH_USER_PASSWORD, len 15
racoon: DEBUG: Attribute XAUTH_USER_NAME, len 8
racoon: DEBUG: Short attribute XAUTH_TYPE = 0
but the passwd is 14 chars long.
Has anyone gotten ICS to link up with pfSense 2.0.1?

[APP][2.2+] DigiControl/DigiSSHD 0.2 - SSH server with per session control

DigiControl - Lightweight Android agile helper for console applications. It is based on C++ Boost, Scala, AspectJ.
DigiSSHD component for DigiControl, based on Dropbear SSH Server and OpenSSH SFTP Server.
This is alpha stage software
Software
DigiSSHD is a DigiControl component that provide:
Security Shell - remote shell service or command execution
Security Copy - transfer files between android and remote client
Security FTP - transfer files between android and remote client
BTW look for SFTP vs. SCP
It is based on open source software:
Dropbear server (Shell and SCP) available under MIT license
OpenSSH server (SFTP) available under BSD license
DigiControl is agile helper for console applications such as a network services, local utilites and so on. DigiControl have a lot of things under the hood that allow to start/stop/restart Digi components, interact with sessions and permissions and much more. It is mediator between installed components, plugins, android device and you.
It is alpha stage software writen in Scala language. Scala on Android is a bit out of mainstream, so take it easy. Bridge piece is on C++ BOOST.
Large part of the DigiControl source code available at GitHub as DigiLib library under Apache 2.0 license.
Core part of the DigiSSHD source code available at GitHub under GPLv3 license, another one available as DigiLib library under Apache 2.0 license.
FYI There are a lot of threads and hundreds of places with watchdog timer and thousands of places with recovery logic. Also user interface and background service are independent processes.
If application freeze... The longest watchdog timeout is about 5 minutes, the shortest watchdog timeout is 1 second, most of them - not more then 20 seconds. Wait. After unfreeze, upload report to us.
If application block something or show something unexpected, as you think ;-) Upload report to us, then rotate you device. After device rotated, there'll be reinitialization.
If something blows up, it explodes with stack traces, uh, Sssssmmmokie! Restart application after crash, upload report to us.
You may upload report via context menu. The report dialog will be appear automatically if there is a stack trace.
If you have an idea how to improve DigiNNN or a wish to change something, please submit your idea via GitHub tracker. Please, submit technical issues too.
There is only DigiSSHD component available at this time. DigiSSHD is sshd server that provide secure shell, scp and sftp
Please install DigiControl and DigiSSHD simultaneously. This is two parts of the single application.
Interface
There are two ACL types (access control list)
interface ACL that defined what network interface(s) will be used (tab service)
connection ACL that defined (by IP) allow/deny rules to access to phone, and interactive mode (tab session)
You may find current IP at information tab
Port option located at service tab
Code
It may be interesting because it almost written in Scala. Actualy apk build with scala 2.8.2.
Scala 2.9.x and 2.10.0 M2 have some critical bugs in compiller and too fat :-( There are few insignificant java files. Maybe someday it will be replaced with scala code, but I don't want waste time.
Controller native helper written in C++ with BOOST (I don't like C, C#, java and assembler ) It is battery friendly single threaded asynchronous INETD server. This is the only non Scala part.
All application created in XXP style (extreme extreme programming ) - no unit tests, no design, no comments, only the simplest code that easy to read
If you find BUG sure you will ;-) Please open issue on github or click on report in context menu. Report will be uploaded to Google Cloud storage.
Versions
0.2
- Improvements: add notification with service state
- Improvements: remember last active tab
- Bug fixes: remove toolbox/busybox dependency (file objects permission control is less granular now)
- Improvements: add ui for public key authentication
- Bug fixes: remove some startup deadlocks
- Improvements: by default add connection from private networks to permit ACL
- Improvements: by default new components enabled
- Improvements: add contol level background (novice, intermediate, professional)
- Improvements: add sshd profile generation
0.1.05
- Bug fixes: fix sporadic error on component restart
- Bug fixes: fix preferred layout orientation
- Improvements: implement smart shutdown sequence mechanism. No task killer needed. All components and their dependencies (include services and providers) terminated in proper order with respect to idle timeouts
- Improvements: more verbose single user/multi user logic
- Bug fixes: set minimum API level to 9
- Bug fixes: progress dialog deadlock at multiple activity change
- Bug fixes: busy state lock
0.1.04
- Bug fixes: 'port already in use' bug
- Improvements: improve dialog routines
- Improvements: improve log rotation, add gzip compression to initialization sequence
0.1.03
- Improvements: add database retry guard that prevent sporadic errors
- Improvements: add coreutil 'ls', improve groups helper, now SCP working at most of devices without any tuning
- Improvements: add active user name to session entry
- Bug fixes: set minimum API level to 10
- Bug fixes: fix creation of unused /sdcard/Android/data/file empty directory
move the magic button to the top by user request
- Bug fixes: drop Android 2.2 Froyo support hacks
- Bug fixes: remove deadlock in safe dialogs
- Bug fixes: fix possible desynchronization in global shutdown sequence
- Improvements: add welcome dialog and assistant with green sputnik
- Improvements: add option of preferred layout orientation
0.1.02 - critical bugfixes
0.1.01 - 16.05.2012
- Improvements: reduce size, move DigiSSHD to SD card
- Improvements: improve stability, add SCP groups helper
- Bug fixes: SFTP permissions
- Improvements: add activity event log
- Improvements: add session event log
- Improvements: add single user/multi user mode
- Improvements: improve interface, user management
- Bug fixes: fixes tons of bugs
0.0.2 - 03.05.2012 mostly working
0.0.0 - 21.04.2012 something working
Your Help Is Always Welcome
* user interface - unstable
* native helper - mostly stable
* dropbear server - stable
King Regards,
Alexey
Please TURN ON subtitles in video.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
reserved
[ reserved ]
Looks like an impressive app, thanks...
Is there any way to use key-based authentication instead of a password, please?
Wonderful work!
I will fix up public key authentication in next release. I need add few functions.
I hope that new release 0.1.06 will be ready within 2 days.
Thank you for your interest in app. It is really important for me.
cdmackay said:
Looks like an impressive app, thanks...
Is there any way to use key-based authentication instead of a password, please?
Click to expand...
Click to collapse
I have tested key-based authentication - it work both in privileged and unprivileged modes. Sorry for delay ;-)
Thanks for the new version; my comments, for what they're worth:
- Control level background: interesting idea, but I didn't notice it actually showing anything; turned off, nothing seemed different.
- Notification icon; I'd like there to be an icon only when the Control program is actually enabled. As it is, it seems there is no way to disable the icon when things are "OFF"?
- Publickey works well for user android (thanks!). But doesn't seem that there is any way to do per-user public keys, when using multi-user? I don't need this functionality mind you, single-user is enough for me, just mentioning it.
- I would like to be able to disable password access entirely, and use only publickey. That doesn't seem possible at the moment?
- The apps are a little complex; that's not a problem, but I think there could be better documentation, esp on how to do common things. It's possible that this is there already, but docs seem a little spread around...
thanks again...
It worked couple days ago. Today after restoring from TB, it kept on restarting itself. I later noticed that it was trying to bind under an older LAN ip from couple days ago. I unchecked the older ip and add the curent lan ip, but it still restarting itself and shows error. I let it emailed the report to you. I'm on Vibrant CM9 nightly 20120704
I noticed couple things from first try. The OFF button in Digisshd does not change to ON when it was started. I couldn't tell if it already started or not. Don't take this the wrong way, but the gui seems to have lots of features but not intuitive yet. There should be some obvious status/indicator. The many tabs are nice and your project seems powerful sshd, but somehow I'm still lost in figuring it out.
Thank you for feedback. For bind issues - You may remove all bind filters, so it will be looks like
I will check report. I am preparing version 0.3 right now. It will fix some system design issues, also it will be adjusted for level API 15 (fragments, action bar, and so on). I am sure that I achieve target within two days.
UI is really weak point. :silly: Maybe I will build some trigger that hide intermediate and professional level... options VS plain and simple UI - question of balance. I want have all available options.
kobesabi said:
It worked couple days ago. Today after restoring from TB, it kept on restarting itself. I later noticed that it was trying to bind under an older LAN ip from couple days ago. I unchecked the older ip and add the curent lan ip, but it still restarting itself and shows error. I let it emailed the report to you. I'm on Vibrant CM9 nightly 20120704
I noticed couple things from first try. The OFF button in Digisshd does not change to ON when it was started. I couldn't tell if it already started or not. Don't take this the wrong way, but the gui seems to have lots of features but not intuitive yet. There should be some obvious status/indicator. The many tabs are nice and your project seems powerful sshd, but somehow I'm still lost in figuring it out.
Click to expand...
Click to collapse
Request: optional blank DigiControl notification icon?
I'm using DigiSSHD along with DigiControl on two android devices: a myTouch 4G Slide running CM-7.1.0 and a Galaxy Tab 2 10.1 running CM-9.0-RC2. In both cases, it's working very well for me. Thank you for a great couple of utilities!
I have a request: as an option, could you offer a blank DigiControl notification icon, to keep the clutter out of the notification area? I know that the presence of such an icon is necessary in order to ensure that DigiControl doesn't get swapped out or shut down, but if you offered a blank icon, at least we wouldn't _see_ it in the notification area.
For example, the Tasker app offers an optional blank icon for the same purpose.
Thank you very much for considering this request.
.​
Hi. Great app! Thanks for your work on this! Is there a tutorial for how to connect using USB? My phone is a Galaxy Nexus (running Cyanogenmod 9 RC2). As you know, the Galaxy Nexus uses MTP instead of USB Mass Storage. MTP does not work well for me. I would prefer to use SFTP over USB. I believe DigiSSHD allows this, but I need some step by step instructions. So far, I have not figured out how to make it work.
One solution I am thinking of is to use EasyTether. At the moment, my phone is plugged into my Linux box via USB and EasyTether is connected. I can ping the phone on 192.168.117.1. What are the next steps?
If not using Easy Tether, what other ways can I connect via SFTP and USB to my Galaxy Nexus? Thank you for your work on this very important app!
1. open DigiSSHD info tab. Look at interfaces block. USB interface must be there.
2. start DigiSSHD
3. open any terminal on phone, enter netstat -al
example from my phone
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 127.0.0.1:7777 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:7203 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:2222 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:32500 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:43866 127.0.0.1:7777 ESTABLISHED
tcp 0 0 10.255.255.247:47225 213.75.57.103:443 ESTABLISHED
tcp 0 0 127.0.0.1:7777 127.0.0.1:43818 ESTABLISHED
tcp 0 0 127.0.0.1:7777 127.0.0.1:33561 ESTABLISHED
tcp 0 0 127.0.0.1:7777 127.0.0.1:43819 ESTABLISHED
tcp 0 0 127.0.0.1:43818 127.0.0.1:7777 ESTABLISHED
tcp 0 0 10.255.255.247:2222 10.255.255.250:47123 ESTABLISHED
tcp 0 0 127.0.0.1:7777 127.0.0.1:43866 ESTABLISHED
tcp 0 0 127.0.0.1:43819 127.0.0.1:7777 ESTABLISHED
tcp6 0 1 ::ffff:10.255.255.247:46121 ::ffff:173.194.32.32:80 CLOSE_WAIT
tcp6 0 0 ::ffff:127.0.0.1:33561 ::ffff:127.0.0.1:7777 ESTABLISHED
tcp6 0 1 ::ffff:10.255.255.247:51556 ::ffff:173.194.32.48:443 CLOSE_WAIT
tcp6 0 1 ::ffff:10.255.255.247:37148 ::ffff:173.194.32.0:443 CLOSE_WAIT
tcp6 0 0 ::ffff:10.255.255.247:35515 ::ffff:173.194.69.188:5228 ESTABLISHED
tcp6 0 1 ::ffff:10.255.255.247:48747 ::ffff:173.194.32.8:443 CLOSE_WAIT
tcp6 0 1 ::ffff:10.255.255.247:43505 ::ffff:173.194.32.18:443 CLOSE_WAIT
Red string indicate that you may connect to tcp port 2222 on any available interface (0.0.0.0)
If something lost send me message via PM, we will troubleshoot your connection
MountainX said:
Hi. Great app! Thanks for your work on this! Is there a tutorial for how to connect using USB? My phone is a Galaxy Nexus (running Cyanogenmod 9 RC2). As you know, the Galaxy Nexus uses MTP instead of USB Mass Storage. MTP does not work well for me. I would prefer to use SFTP over USB. I believe DigiSSHD allows this, but I need some step by step instructions. So far, I have not figured out how to make it work.
One solution I am thinking of is to use EasyTether. At the moment, my phone is plugged into my Linux box via USB and EasyTether is connected. I can ping the phone on 192.168.117.1. What are the next steps?
If not using Easy Tether, what other ways can I connect via SFTP and USB to my Galaxy Nexus? Thank you for your work on this very important app!
Click to expand...
Click to collapse
Ezzzzh said:
1. open DigiSSHD info tab. Look at interfaces block. USB interface must be there.
Click to expand...
Click to collapse
Thanks for your reply. Starting at step 1, no interface block is shown. I only see sections for community, support and legal under the information tab. How should I troubleshoot this?
You open DigiControl, not DigiSSHD. Jump to DigiSSHD
MountainX said:
Thanks for your reply. Starting at step 1, no interface block is shown. I only see sections for community, support and legal under the information tab. How should I troubleshoot this?
Click to expand...
Click to collapse
If you really open DigiSSHD and interface block is absent... Send me report please from option menu. There is a lot of surprises in reality. Maybe Interfaces block is disappeared???
MountainX said:
Thanks for your reply. Starting at step 1, no interface block is shown. I only see sections for community, support and legal under the information tab. How should I troubleshoot this?
Click to expand...
Click to collapse
Ezzzzh said:
1. open DigiSSHD info tab. Look at interfaces block. USB interface must be there.
Click to expand...
Click to collapse
Ezzzzh said:
You open DigiControl, not DigiSSHD. Jump to DigiSSHD
Click to expand...
Click to collapse
Yes, you are right. Now I am looking at the Information Tab of DigiSSHD. I see the Interfaces block.
My phone is plugged into my computer via USB at the moment. There is no USB interface listed. (This is true both with and without EasyTether running.) There are other interfaces listed such as ifb0, ifb1, rmnet0, rmnet1, rmnet2 and sit0. All these have addresses of 0.0.0.0. wlan0 is also listed with an address of 192.168.x.x.
However, when EasyTether is enabled, I can currently ping my phone from my PC via the USB interface:
ping 192.168.117.1
PING 192.168.117.1 (192.168.117.1) 56(84) bytes of data.
64 bytes from 192.168.117.1: icmp_req=1 ttl=128 time=4.32 ms
64 bytes from 192.168.117.1: icmp_req=2 ttl=128 time=4.52 ms
What is the next troubleshooting step? Thanks.
show
ifconfig -a
and
netstat -al
from phone
MountainX said:
Yes, you are right. Now I am looking at the Information Tab of DigiSSHD. I see the Interfaces block.
My phone is plugged into my computer via USB at the moment. There is no USB interface listed. (This is true both with and without EasyTether running.) There are other interfaces listed such as ifb0, ifb1, rmnet0, rmnet1, rmnet2 and sit0. All these have addresses of 0.0.0.0. wlan0 is also listed with an address of 192.168.x.x.
However, when EasyTether is enabled, I can currently ping my phone from my PC via the USB interface:
ping 192.168.117.1
PING 192.168.117.1 (192.168.117.1) 56(84) bytes of data.
64 bytes from 192.168.117.1: icmp_req=1 ttl=128 time=4.32 ms
64 bytes from 192.168.117.1: icmp_req=2 ttl=128 time=4.52 ms
What is the next troubleshooting step? Thanks.
Click to expand...
Click to collapse
Ezzzzh said:
show
ifconfig -a
and
netstat -al
from phone
Click to expand...
Click to collapse
This is with EasyTether CONNECTED!
[email protected]:/ # netstat -al
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 127.0.0.1:58682 127.0.0.1:33333 ESTABLISHED
tcp6 0 0 :::33333 :::* LISTEN
tcp6 0 1 ::ffff:192.168.1.29:55777 ::ffff:74.125.45.120:80 CLOSE_WAIT
tcp6 0 0 ::ffff:192.168.1.29:37690 ::ffff:74.125.137.188:5228 ESTABLISHED
tcp6 0 1 ::ffff:192.168.1.29:47507 ::ffff:173.194.37.80:443 CLOSE_WAIT
tcp6 0 1 ::ffff:192.168.1.29:42791 ::ffff:173.194.37.81:443 CLOSE_WAIT
tcp6 0 0 ::ffff:192.168.1.29:53132 ::ffff:74.125.45.101:443 ESTABLISHED
tcp6 0 0 ::ffff:127.0.0.1:33333 ::ffff:127.0.0.1:58682 ESTABLISHED
tcp6 0 1 ::ffff:192.168.1.29:34921 ::ffff:74.125.139.138:80 CLOSE_WAIT
tcp6 0 1 ::ffff:192.168.1.29:34199 ::ffff:74.125.45.101:443 CLOSE_WAIT
udp6 0 0 :::44717 :::* CLOSE
[email protected]:/ # ifconfig -a
-a: no such device
[email protected]:/ # ifconfig
[email protected]:/ #
Google search: "android ifconfig syntax" --> no useful results found
---------- Post added at 05:21 PM ---------- Previous post was at 05:17 PM ----------
Ezzzzh said:
show
ifconfig -a
and
netstat -al
from phone
Click to expand...
Click to collapse
Here it is without EasyTether connected:
[email protected]:/ # netstat -al
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp6 0 1 ::ffff:192.168.1.29:55777 ::ffff:74.125.45.120:80 CLOSE_WAIT
tcp6 0 0 ::ffff:192.168.1.29:37690 ::ffff:74.125.137.188:5228 ESTABLISHED
tcp6 0 1 ::ffff:192.168.1.29:47507 ::ffff:173.194.37.80:443 CLOSE_WAIT
tcp6 1 1 ::ffff:192.168.1.29:42791 ::ffff:173.194.37.81:443 LAST_ACK
tcp6 0 0 ::ffff:127.0.0.1:33333 ::ffff:127.0.0.1:58682 TIME_WAIT
tcp6 0 1 ::ffff:192.168.1.29:34921 ::ffff:74.125.139.138:80 CLOSE_WAIT
tcp6 0 0 ::ffff:192.168.1.29:49525 ::ffff:74.125.45.138:443 ESTABLISHED
tcp6 0 0 ::ffff:192.168.1.29:46645 ::ffff:74.125.45.139:443 ESTABLISHED
tcp6 0 1 ::ffff:192.168.1.29:34199 ::ffff:74.125.45.101:443 CLOSE_WAIT
[email protected]:/ #
still no results from ifconfig....
First of all I don't see any 0.0.0.0:2222. Are you start DigiSSHD? Is it show state Active?
Second, Are you sure that 192.168.117.1 is not your local PC interface?
Third, sorry ifconfig arg only working, so use netcfg
MountainX said:
This is with EasyTether CONNECTED!
[email protected]:/ # netstat -al
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 127.0.0.1:58682 127.0.0.1:33333 ESTABLISHED
tcp6 0 0 :::33333 :::* LISTEN
tcp6 0 1 ::ffff:192.168.1.29:55777 ::ffff:74.125.45.120:80 CLOSE_WAIT
tcp6 0 0 ::ffff:192.168.1.29:37690 ::ffff:74.125.137.188:5228 ESTABLISHED
tcp6 0 1 ::ffff:192.168.1.29:47507 ::ffff:173.194.37.80:443 CLOSE_WAIT
tcp6 0 1 ::ffff:192.168.1.29:42791 ::ffff:173.194.37.81:443 CLOSE_WAIT
tcp6 0 0 ::ffff:192.168.1.29:53132 ::ffff:74.125.45.101:443 ESTABLISHED
tcp6 0 0 ::ffff:127.0.0.1:33333 ::ffff:127.0.0.1:58682 ESTABLISHED
tcp6 0 1 ::ffff:192.168.1.29:34921 ::ffff:74.125.139.138:80 CLOSE_WAIT
tcp6 0 1 ::ffff:192.168.1.29:34199 ::ffff:74.125.45.101:443 CLOSE_WAIT
udp6 0 0 :::44717 :::* CLOSE
[email protected]:/ # ifconfig -a
-a: no such device
[email protected]:/ # ifconfig
[email protected]:/ #
Google search: "android ifconfig syntax" --> no useful results found
---------- Post added at 05:21 PM ---------- Previous post was at 05:17 PM ----------
Here it is without EasyTether connected:
[email protected]:/ # netstat -al
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp6 0 1 ::ffff:192.168.1.29:55777 ::ffff:74.125.45.120:80 CLOSE_WAIT
tcp6 0 0 ::ffff:192.168.1.29:37690 ::ffff:74.125.137.188:5228 ESTABLISHED
tcp6 0 1 ::ffff:192.168.1.29:47507 ::ffff:173.194.37.80:443 CLOSE_WAIT
tcp6 1 1 ::ffff:192.168.1.29:42791 ::ffff:173.194.37.81:443 LAST_ACK
tcp6 0 0 ::ffff:127.0.0.1:33333 ::ffff:127.0.0.1:58682 TIME_WAIT
tcp6 0 1 ::ffff:192.168.1.29:34921 ::ffff:74.125.139.138:80 CLOSE_WAIT
tcp6 0 0 ::ffff:192.168.1.29:49525 ::ffff:74.125.45.138:443 ESTABLISHED
tcp6 0 0 ::ffff:192.168.1.29:46645 ::ffff:74.125.45.139:443 ESTABLISHED
tcp6 0 1 ::ffff:192.168.1.29:34199 ::ffff:74.125.45.101:443 CLOSE_WAIT
[email protected]:/ #
still no results from ifconfig....
Click to expand...
Click to collapse
Ezzzzh said:
First of all I don't see any 0.0.0.0:2222. Are you start DigiSSHD? Is it show state Active?
Click to expand...
Click to collapse
In your initial instructions, you said that step 2 was to "start DigiSSHD". I assumed you meant to turn it "on" so it becomes active in step 2. I was not yet able to satisfy the criteria you listed in step 1, so I didn't do step 2.
However, based on this reply, I have now made DigiSSHD active. Here are the results with it active (and EasyTether disabled):
[email protected]:/ # netstat -al
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:2222 0.0.0.0:* LISTEN
tcp6 0 1 ::ffff:192.168.1.29:55777 ::ffff:74.125.45.120:80 CLOSE_WAIT
tcp6 0 0 ::ffff:192.168.1.29:37690 ::ffff:74.125.137.188:5228 ESTABLISHED
tcp6 0 1 ::ffff:192.168.1.29:47507 ::ffff:173.194.37.80:443 CLOSE_WAIT
tcp6 0 0 ::ffff:192.168.1.29:56790 ::ffff:173.194.37.84:443 ESTABLISHED
tcp6 0 0 ::ffff:192.168.1.29:38504 ::ffff:74.125.45.138:443 ESTABLISHED
tcp6 0 1 ::ffff:192.168.1.29:34921 ::ffff:74.125.139.138:80 CLOSE_WAIT
tcp6 0 0 ::ffff:192.168.1.29:37816 ::ffff:74.125.45.138:443 ESTABLISHED
tcp6 0 1 ::ffff:192.168.1.29:34199 ::ffff:74.125.45.101:443 CLOSE_WAIT
[email protected]:/ # netcfg
lo UP 127.0.0.1/8 0x00000049 00:00:00:00:00:00
ifb0 DOWN 0.0.0.0/0 0x00000082 8e:11:c8:13:eb:cd
ifb1 DOWN 0.0.0.0/0 0x00000082 46:64:07:e9:bf:b6
sit0 DOWN 0.0.0.0/0 0x00000080 00:00:00:00:00:00
ip6tnl0 DOWN 0.0.0.0/0 0x00000080 00:00:00:00:00:00
rmnet0 DOWN 0.0.0.0/0 0x00001090 00:00:00:00:00:00
rmnet1 DOWN 0.0.0.0/0 0x00001090 00:00:00:00:00:00
rmnet2 DOWN 0.0.0.0/0 0x00001090 00:00:00:00:00:00
wlan0 UP 192.168.1.29/24 0x00001043 a0:0b:ba:cc:88:00
[email protected]:/ #
Ezzzzh said:
First of all I don't see any 0.0.0.0:2222. Are you start DigiSSHD? Is it show state Active?
Click to expand...
Click to collapse
It is there now, once I move to step 2 of your instructions.
Ezzzzh said:
Are you sure that 192.168.117.1 is not your local PC interface?
Click to expand...
Click to collapse
192.168.117.1 is the phone's IP when EasyTether is enabled and connected via USB. (The PC's IP on the easytether0 iface is 192.168.117.2.) I also have a a wlan0 IP address on the phone, but I am trying to connect via USB, of course.
---------- Post added at 05:50 PM ---------- Previous post was at 05:40 PM ----------
This might help too:
[email protected]:~/.ssh$ ssh [email protected] -vvv -p 2222
OpenSSH_5.9p1 Debian-5ubuntu1, OpenSSL 1.0.1 14 Mar 2012
debug1: Reading configuration data /home/user/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to 192.168.117.1 [192.168.117.1] port 2222.
debug1: connect to address 192.168.117.1 port 2222: Connection timed out
ssh: connect to host 192.168.117.1 port 2222: Connection timed out
[email protected]:~/.ssh$ ping 192.168.117.1
PING 192.168.117.1 (192.168.117.1) 56(84) bytes of data.
64 bytes from 192.168.117.1: icmp_req=1 ttl=128 time=3.13 ms
64 bytes from 192.168.117.1: icmp_req=2 ttl=128 time=2.99 ms
--- 192.168.117.1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 2.994/3.063/3.133/0.088 ms
[email protected]:~/.ssh$ ifconfig
easytether0 Link encap:Ethernet HWaddr YY:YY:YY:YY:YY:YY
inet addr:192.168.117.2 Bcast:192.168.117.255 Mask:255.255.255.0
inet6 addr: fe80::54ff:fe74:6872/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:20 errors:0 dropped:0 overruns:0 frame:0
TX packets:72 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:1664 (1.6 KB) TX bytes:11583 (11.5 KB)
eth0 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx
inet addr:192.168.1.55 Bcast:192.168.1.1 Mask:255.255.255.0
inet6 addr: xxxxxxxxxxxxxxxxxxxxxxxxx/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:35971246 errors:0 dropped:0 overruns:0 frame:0
TX packets:61929545 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:10794714666 (10.7 GB) TX bytes:87663599559 (87.6 GB)
Interrupt:17 Memory:fe400000-fe420000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:4522645 errors:0 dropped:0 overruns:0 frame:0
TX packets:4522645 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:6798287997 (6.7 GB) TX bytes:6798287997 (6.7 GB)

AOSP on Pandaboard, BlueZ config

Hi everybody,
I'm developing on a Pandaboard ES. I compiled AOSP 4.0.4 and a kernel from scratch, everything working quite good so far.
As I need to connect some weird bt-devices I have to change the default bt-class.
This is what I get from hciconfig -a:
Code:
/ # hciconfig -a
hci0: Type: BR/EDR Bus: UART
BD Address: 1C:E2:XX:XX:XX:XX ACL MTU: 1021:4 SCO MTU: 180:4
UP RUNNING PSCAN
RX bytes:2148 acl:0 sco:0 events:92 errors:0
TX bytes:1472 acl:0 sco:0 commands:92 errors:0
Features: 0xff 0xfe 0x2d 0xfe 0xdb 0xff 0x7b 0x87
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
Link policy: RSWITCH HOLD SNIFF
Link mode: SLAVE ACCEPT
Name: 'BlueZ'
[COLOR="Red"]Class: 0x1a0000[/COLOR]
Service Classes: Networking, Capturing, Object Transfer
[COLOR="red"]Device Class: Miscellaneous, [/COLOR]
HCI Version: 4.0 (0x6) Revision: 0x0
LMP Version: 4.0 (0x6) Subversion: 0x1f22
Manufacturer: Texas Instruments Inc. (13)
By default there is no main.conf in /etc/bluetooth/. But I can find two different ones in the sources from where I'm compiling.
1: /external/bluetooth/bluez/src/main.conf
2: /system/bluetooth/data/main.conf
I modified one, pushed it to the pandaboard and rebooted, but the file is ignored. Neither the class nor the name change as expected.
Changing the class with hcitool works, but this is, of course, not permanent. (When changing the class I can connect my "weird" device without problems.)
Why is the file ignored? File owner and rights are the same as on my Nexus S. Here the file exists. (Unfortunately I can't check if its really parsed here, because it's my productive phone, so it is unrooted and stock 4.0.4)
Below you find the content of /etc/bluetooth and main.conf which I pushed to the pandaboard.
Code:
/ # ls -al /etc/bluetooth/
-r--r----- bluetooth bluetooth 1699 2012-05-11 10:31 audio.conf
-rw-r----- system system 1536 2012-05-11 10:31 auto_pairing.conf
-r--r--r-- net_bt net_bt 401 2012-05-11 10:31 blacklist.conf
-r--r----- bluetooth bluetooth 262 2012-05-11 10:31 input.conf
-r--r--r-- bluetooth bluetooth 2802 2012-06-25 09:44 main.conf
-r--r----- bluetooth bluetooth 120 2012-05-11 10:31 network.conf
PHP:
[General]
# List of plugins that should not be loaded on bluetoothd startup
#DisablePlugins = network,input
# Default adaper name
# %h - substituted for hostname
# %d - substituted for adapter id
Name = "Panda"
# Default device class. Only the major and minor device class bits are
# considered.
Class = 0x400210
# How long to stay in discoverable mode before going back to non-discoverable
# The value is in seconds. Default is 180, i.e. 3 minutes.
# 0 = disable timer, i.e. stay discoverable forever
DiscoverableTimeout = 120
# How long to stay in pairable mode before going back to non-discoverable
# The value is in seconds. Default is 0.
# 0 = disable timer, i.e. stay pairable forever
PairableTimeout = 0
# Use some other page timeout than the controller default one
# which is 16384 (10 seconds).
PageTimeout = 8192
# Discover scheduler interval used in Adapter.DiscoverDevices
# The value is in seconds. Defaults is 30.
DiscoverSchedulerInterval = 30
# What value should be assumed for the adapter Powered property when
# SetProperty(Powered, ...) hasn't been called yet. Defaults to true
InitiallyPowered = true
# Remember the previously stored Powered state when initializing adapters
RememberPowered = true
# Use vendor, product and version information for DID profile support.
# The values are separated by ":" and VID, PID and version.
DeviceID = android:generic:1.5
# Do reverse service discovery for previously unknown devices that connect to
# us. This option is really only needed for qualification since the BITE tester
# doesn't like us doing reverse SDP for some test cases (though there could in
# theory be other useful purposes for this too). Defaults to true.
ReverseServiceDiscovery = true
# Enable name resolving after inquiry. Set it to 'false' if you don't need
# remote devices name and want shorter discovery cycle. Defaults to 'true'.
NameResolving = true
# Enable runtime persistency of debug link keys. Default is false which
# makes debug link keys valid only for the duration of the connection
# that they were created for.
DebugKeys = false
# Enable Low Energy support if the dongle supports. Default is false.
# Enable/Disable interleave discovery and attribute server over LE.
EnableLE = false
# Enable the GATT Attribute Server. Default is false, because it is only
# useful for testing. Attribute server is not enabled over LE if EnableLE
# is false.
AttributeServer = false
# The link policy for connections. By default it's set to 0x000f which is
# a bitwise OR of role switch(0x0001), hold mode(0x0002), sniff mode(0x0004)
# and park state(0x0008) are all enabled. However, some devices have
# connection stability issue or fail to setup SCO when the link is in park
# state, which requires park state bit cleared.
DefaultLinkPolicy = 0x000f
bump
Nobody an idea?
Bumping this a last time as this topic is still not solved.
Any help would be great.

[FIX][ROOT ONLY] Slow GPS fixation solution

So I had been having problems with my GPS getting a fix when using Maps etc. It was getting fix with High Accuracy mode but with Device Only mode it wasn't working.
So I tried to tinker with the gps.conf file located in /system/etc/
You need root access for this.
Make a backup of /system/etc/gps.conf file
Go to http://www.pool.ntp.org/en/ and get the address of the server nearest to you. E.g. Mine is pk.pool.ntp.org for Pakistan.
Using your favorite text editor, open the file gps.conf
Code:
#Uncommenting these urls would only enable
#the power up auto injection and force injection(test case).
#XTRA_SERVER_1=http://xtra1.gpsonextra.net/xtra.bin
#XTRA_SERVER_2=http://xtra2.gpsonextra.net/xtra.bin
#XTRA_SERVER_3=http://xtra3.gpsonextra.net/xtra.bin
#
XTRA_SERVER_1=http://xtra1.gpsonextra.net/xtra2.bin
XTRA_SERVER_2=http://xtra2.gpsonextra.net/xtra2.bin
XTRA_SERVER_3=http://xtra3.gpsonextra.net/xtra2.bin
# Error Estimate
# _SET = 1
# _CLEAR = 0
ERR_ESTIMATE=0
#Test
NTP_SERVER=time.gpsonextra.net
#Asia
[color=blue] # NTP_SERVER=asia.pool.ntp.org[/color]
#Europe
# NTP_SERVER=europe.pool.ntp.org
#North America
# NTP_SERVER=north-america.pool.ntp.org
# DEBUG LEVELS: 0 - none, 1 - Error, 2 - Warning, 3 - Info
# 4 - Debug, 5 - Verbose
# If DEBUG_LEVEL is commented, Android's logging levels will be used
DEBUG_LEVEL = 2
# Intermediate position report, 1=enable, 0=disable
INTERMEDIATE_POS=0
# supl version 1.0
SUPL_VER=0x10000
# Emergency SUPL, 1=enable, 0=disable
SUPL_ES=1
# GPS Capabilities bit mask
# SCHEDULING = 0x01
# MSB = 0x02
# MSA = 0x04
# ON_DEMAND_TIME = 0x10
# GEOFENCE = 0x20
# default = ON_DEMAND_TIME | MSA | MSB | SCHEDULING | GEOFENCE
CAPABILITIES=0x37
# Accuracy threshold for intermediate positions
# less accurate positions are ignored, 0 for passing all positions
# ACCURACY_THRES=5000
################################
##### AGPS server settings #####
################################
# FOR SUPL SUPPORT, set the following
# SUPL_HOST=supl.host.com or IP
# SUPL_PORT=1234
# FOR C2K PDE SUPPORT, set the following
# C2K_HOST=c2k.pde.com or IP
# C2K_PORT=1234
####################################
# LTE Positioning Profile Settings
####################################
# 0: Enable RRLP on LTE(Default)
# 1: Enable LPP_User_Plane on LTE
# 2: Enable LPP_Control_Plane
# 3: Enable both LPP_User_Plane and LPP_Control_Plane
LPP_PROFILE = 0
################################
# EXTRA SETTINGS
################################
# NMEA provider (1=Modem Processor, 0=Application Processor)
NMEA_PROVIDER=0
# Mark if it is a SGLTE target (1=SGLTE, 0=nonSGLTE)
SGLTE_TARGET=0
##################################################
# Select Positioning Protocol on A-GLONASS system
##################################################
# 0x1: RRC CPlane
# 0x2: RRLP UPlane
# 0x4: LLP Uplane
A_GLONASS_POS_PROTOCOL_SELECT = 0
Remove the # symbol at the start of the blue line and replace asia.pool.ntp.org with the nearest country server address.
reboot and the GPS should fix faster.
Sent from my A0001 using Tapatalk
can you make an app like FasterGPS?
I use it to add Pakistan quickly, but issue is it only adds pk.pool.ntp.org, pool.NTP.org servers and removes all gpsonextra.net servers
---------- Post added at 01:54 PM ---------- Previous post was at 01:32 PM ----------
can you make an app for this like FasterGPS?
issue with fasterGPS app is, it removes all timeonextra.net servers
i want to use it for Pakistan as well

Categories

Resources