[Q] Bluetooth PAN enabling (bnep.ko module) - Galaxy S I9000 Q&A, Help & Troubleshooting

What about subj on FROYO-based FW's?
I tried to enable it on JM5 firmware (Eclair), but no success
We need to compile bnep.ko module for kernel version 2.6.32 and a bluetooth pan daemon - pand.
So, in case of Eclair, i tried to use bnep.ko, compiled for kernel 2.6.29 and pand version 4.47 (see attachments for both).
And what i've done (step-by-step):
1) Inserting our bnep.ko:
Code:
insmod /lib/modules/bnep.ko
2) Copying pand to /system/bin/
3) Trying to start listening for a incoming bluetooth PAN connection by typing:
Code:
pand -n --listen --role NAP
4) .. and seems we have a problem
Code:
pand[7013]: Bluetooth PAN daemon version 4.47
pand[7013]: Failed to connect to the local SDP server. Connection refused(111)
pand[7013]: Bind failed. Address already in use(98)
... and i have no idea whats going wrong.
So, it will be great if someone could compile bnep.ko for FROYO-based firmwares, may be it will be more lucky

Could someone please compile and post the bnep.ko module and pand for the Galaxy Tab wifi P1010. It seems they left it out of a device that desparately needs it, considering it has no 3g.
I actually have no way of tethering this tab with my phone. It does not pick up adhoc wifi (wpa supplicant hack from p1000 does not work on this device), and itbdoes not support bluetooth pan, which is ultimately my preferred tethering solution because of better battery performance.
I tried the above files but they dont work on the p1010. I even tried copying pand from other devices, but so far none of them execute on this device.
Would really appreciate it if someone could compile the above for the p1010. The kernel version is 2.6.32.9 [email protected] #1. Thanks.

A bit late but someone may need it http://www.patthoyts.tk/blog/android-bluetooth-tethering.html

@sinancetinkaya: Thanks, d00d, came in *very* handy!

Related

Cannot enable Wifi driver , not a network configuration issue

Since I applied the froyo update from Paul's site wifi was working fine for 36 hours.
After a crash caused by copying files on my sdcard I rebooted the phone several times to recover it (another story).
Then wifi stopped working, by "stopped working" I mean the driver won't even load, giving me a warning in logcat, some timeouts in dhd_module_init and "Error" in the control panel.
It has nothing to do with my router configuration because I cannot even enable the wifi to scan for some ssid so it's not a "false alarm" issue...
I tried to flash Stock rom and radio, flash superboot FRF50, the last cyanogen, wipe a few thousand times between all of this but nothing seems to give life back to my wifi chip... I tried flashing InsectRaven and cyanogen .34 kernels with no results...
I can't stop thinking it is hardware related but why ??!! There was no shock, no fall, no EMP from a nuke in the vicinity, everything was smooth when I got back from work and bam !
Is there some options to pass to the driver when I insmod to "reset" the chip in a healthy state ?
Can I somehow compile a debug build giving more informations on my hardware when it is crashing like **** ?
I don't know where to look anymore ... and I'd like some proof thats it is indeed fried...
Here are logs from various sources when I enable wifi in the settings (or insmod /system/lib/modules/bcm4239.ko)
From dmesg : http://pastebin.com/uaRM4EyK
From logcat :
Code:
E/WifiService( 83): Failed to load Wi-Fi driver.
From insmod /system/lib/modules/bcm4239.ko :
Code:
# insmod bcm4329.ko
insmod: init_module 'bcm4329.ko' failed (Invalid argument)
I2C errors in dmesg : http://pastebin.com/ehB7RtN7
Another question , has someone successfully compiled "strace" and "modinfo" to run on android ?
I guess it will be helpful to debug my issue.
Hi,
I'm having a similar issue, thought on another device. Did you find a fix for this?
Thx
Raph

attached is a functioning tun.ko for droid x

Because Motorola hasn't provided the .config file for the Droid X yet, I used 'make mapphone_defconfig' and then enabled config_tun in the resulting .config file. That .config file was used to generate tun.ko - it's currently functioning and working on my droid X phone. Since it's not the .config file used by Motorola there may be some oddities, unexpected problems or your house may explode if you use it. I don't take any responsibility for anything that happens if you use this - use it at your own risk.
It hasn't bricked my phone and it's been working without a problem, but your mileage may vary.
Attached is the .config file that was used as well as the tun.ko file
Enjoy
Noob Warning:
What does this do for us ?
pman219 said:
What does this do for us ?
Click to expand...
Click to collapse
This lets you run OpenVPN or http://code.google.com/p/get-a-robot-vpnc/ (allows you to connect to cisco, nortel or freeswan IPSEC servers
Would I need the config file or is that just for compiling other kernel modules for the DX?
The config file would really only be used to compile other modules. All you need is the tun.ko file
I placed this in /dev/net/tun/tun.ko
then I ran chmod 777 /dev/net/tun/tun.ko
then I ran insmod /dev/net/tun/tun.ko
I then tried the Gui app (get-a-robot-vpnc) and it fails immediately when trying to connect - am I missing something?
I'm new to android.
kris7778 said:
I placed this in /dev/net/tun/tun.ko
then I ran chmod 777 /dev/net/tun/tun.ko
then I ran insmod /dev/net/tun/tun.ko
I then tried the Gui app (get-a-robot-vpnc) and it fails immediately when trying to connect - am I missing something?
I'm new to android.
Click to expand...
Click to collapse
Hi,
You should place tun.ko in /sdcard/ or /system/lib/modules (if you have it mounted /system read,write)... I use the app "openvpn settings" - in that program when you go into the settings and choose "advanced" you can click the checkbox next to "load tun kernel module", then in "TUN module settings" set "load module using" to "insmod" and type in the proper path to tun.ko in the "path to tun module" area.
You may need to, as root (su) run:
mkdir /dev/net
busybox mknod /dev/net/tun char 10 100
ln -s /dev/net/tun /dev/tun
Best of luck
Do I need to set the path to the openvpn binary also? (Not sure where this gets installed)
And... what is required in the config file.
This is all I use on linux:
IPSec gateway X.X.X.X
IPSec ID mygroupid
IPSec secret mysecret
thanks!
kris7778 said:
Do I need to set the path to the openvpn binary also? (Not sure where this gets installed)
And... what is required in the config file.
This is all I use on linux:
IPSec gateway X.X.X.X
IPSec ID mygroupid
IPSec secret mysecret
thanks!
Click to expand...
Click to collapse
Hi Chris,
I think that would be something that the get-a-robot-vpnc folks will have to help you out with.
I got your tun.ko working with the commandline vpnc. It appears that get-a-robot-vpnc is just not quite calling vpnc how i need it to.
Thanks for your help.
Sent from my DROIDX using XDA App
You can pull .config from /proc/config.gz
mrozzeh said:
You can pull .config from /proc/config.gz
Click to expand...
Click to collapse
While that file apparently exists on other phones, it does not on the droid x - atleast not the last time that i checked
anyone know how you would recompile this for the .32 kernel
Invalid module format
I get an invalid module format error while trying to load this module. I am running Froyo if that makes any difference. THX
Can someone post instructions.....
HI,
Can someone post some instruction how to get the vpn connections working in Droid X? Please...
I can help with a donation.... $$
SOGJC said:
HI,
Can someone post some instruction how to get the vpn connections working in Droid X? Please...
I can help with a donation.... $$
Click to expand...
Click to collapse
I would love to get some instructions as well. I have a corp 5520 with group authentication that would be very nice to be able to connect to. Anyone successfully connect with the DroidX?
Anyone?
Still cannot get this to work on my DroidX - currently on 2.3.340 stock.
mab2,
As you were able to get this file, is there any way you are able to dump a file so I can use to get EVDO internet settings stick on QPST?
VPN Connections
Are you rooted?
I will post instructions if needed, I connect to a Cisco ASA and use VPN Connections - works like a charm.
Reply
rhyzar said:
Anyone?
Still cannot get this to work on my DroidX - currently on 2.3.340 stock.
Click to expand...
Click to collapse
Are you rooted?
I will post instructions if needed, I connect to a Cisco ASA and use VPN Connections - works like a charm.

MILESTONE CM7 RC4 USB Tethering with Linux

I've managed to enable USB Tethering between my Milestone with CM7 RC4 and a Linux box. Maybe it is possible also for Mac OS X with same method.
I'm still testing it, with good results, but it is not easy at all for end users. It can become really easy if it gets integrated into a ROM.
CHANGES:
1) set ro.modem_available=1 in build.prop
2) upload tether-nat to /system/xbin
3) Recompile Usb.apk from CM7 RC4 source with patch attached.
I have the already compiled apk, but I don't know if I can attach it here, for legal reasons.
4) Append attached code to /system/etc/rootfs/init.rc
DISCLAIMER: If you don't fully understand what I've written, do not try this. I should have posted this to Development forum, but I don't have enough posts and I'm not a spammer. Use everything AT YOUR OWN RISK.
HOW IT WORKS:
By sending usb_mode_modem to usbd trough its control socket, the Milestone is seen as a standard ACM modem from the PC. The corresponding serial port on Android is /dev/ttyGS0 .
Simply starting pppd on both ends, and correctly setting up ip forwarding, nat and routing tables does the trick.
ON THE LINUX BOX:
Open a terminal and write
sudo pppd nodetach persist defaultroute 172.16.0.2:172.16.0.1 /dev/ttyACM0
(and please set correct DNS servers before trying.)
Notes: every server app on the phone is also accessible from PC, like dropbear. At IP address 172.16.0.1
Motorola Phone Portal is not working, because it doesn't "detect" the usb connection nor wifi connection, so it doesn't even start listening to the TCP port.
Someone knows how to bypass this check?
When using this mode, ADB is not available. Looks like the PC can't detect the phone as a modem, if ADB is enabled. You don't have to manually toggle it.
Dropbear can be used as a replacement.
It asks for root permission in order to use setprop as a signaling mechanism to Android's init to start and stop pppd daemon, in order to not have it always running and wasting resources.
Maybe it is possible to use on device-added and on device-removed triggers with fake device nodes, in order to not require root privileges, but it is more complicated.
If a Moderator could move this thread to Development, this could be a great thing, if I can still post to it.
Massimo M.
tether
hey can u do a easy steps for doing this???
DISCLAIMER: If you don't fully understand what I've written in the first post, do not try this. I should have posted this to Development forum, but I don't have enough posts and I'm not a spammer. Use everything AT YOUR OWN RISK.
Be prepared to reinstall ROM if you have big issues. It means DO BACKUPS!
Only for CyanogenMod 7.0 RC4 (it should work on newer versions, but I haven't tested it.)
Copy Usb-new.apk on root of your sdcard.
Copy setup.txt on root of your sdcard.
Get a shell (ADB, or Terminal emulator).
Become root ( su )
cd /sdcard
sh setup.txt
reboot the phone.
Connect the USB cable, and choose Phone as a modem.
On the pc (Linux, any distro should work)
sudo modprobe cdc-acm
echo nameserver 8.8.8.8 |sudo tee /etc/resolv.conf
sudo pppd nodetach persist defaultroute 172.16.0.2:172.16.0.1 /dev/ttyACM0
and then open the browser!
I haven't tested setup.txt on my phone, only in a android-like directory hierarchy on my pc. I won't be online until Monday.
Try to understand everything!! And be careful.
The most difficult part was compiling Usb.apk, which I've attached now.
maxximino said:
I've managed to enable USB Tethering between my Milestone with CM7 RC4 and a Linux box. Maybe it is possible also for Mac OS X with same method.
I'm still testing it, with good results, but it is not easy at all for end users. It can become really easy if it gets integrated into a ROM.
CHANGES:
1) set ro.modem_available=1 in build.prop
2) upload tether-nat to /system/xbin
3) Recompile Usb.apk from CM7 RC4 source with patch attached.
I have the already compiled apk, but I don't know if I can attach it here, for legal reasons.
4) Append attached code to /system/etc/rootfs/init.rc
DISCLAIMER: If you don't fully understand what I've written, do not try this. I should have posted this to Development forum, but I don't have enough posts and I'm not a spammer. Use everything AT YOUR OWN RISK.
HOW IT WORKS:
By sending usb_mode_modem to usbd trough its control socket, the Milestone is seen as a standard ACM modem from the PC. The corresponding serial port on Android is /dev/ttyGS0 .
Simply starting pppd on both ends, and correctly setting up ip forwarding, nat and routing tables does the trick.
ON THE LINUX BOX:
Open a terminal and write
sudo pppd nodetach persist defaultroute 172.16.0.2:172.16.0.1 /dev/ttyACM0
(and please set correct DNS servers before trying.)
Notes: every server app on the phone is also accessible from PC, like dropbear. At IP address 172.16.0.1
Motorola Phone Portal is not working, because it doesn't "detect" the usb connection nor wifi connection, so it doesn't even start listening to the TCP port.
Someone knows how to bypass this check?
When using this mode, ADB is not available. Looks like the PC can't detect the phone as a modem, if ADB is enabled. You don't have to manually toggle it.
Dropbear can be used as a replacement.
It asks for root permission in order to use setprop as a signaling mechanism to Android's init to start and stop pppd daemon, in order to not have it always running and wasting resources.
Maybe it is possible to use on device-added and on device-removed triggers with fake device nodes, in order to not require root privileges, but it is more complicated.
If a Moderator could move this thread to Development, this could be a great thing, if I can still post to it.
Massimo M.
Click to expand...
Click to collapse
Hi
I am trying to send the AT Command directly from the terminal of the phone:
stop ril-daemon
cat /dev/ttyGS0 &
echo -e 'ATI\r' > /dev/ttyGS0
But the terminal is like not responding. Why?? Did someone try??
Thank you very much for the help.

Change baudrate of ttyMSM0 without stty or busybox?

Hi !
Since I'm a new member I cannot post in Dev but anyway this is my problem :
I'm plugging an Arduino in the Serial port of the phone (/dev/ttyMSM0) that was enabled by modifying the kernel (.config) to disable to FIQ debugger and so on as well documented on the web...
I fix the permission either in init.mahimahi.rc or when building AOSP to 777 to be able to use the Serial with my apk without having to Su them.
I have a problem concerning the speed of the serial port itself. In all the config files I found in the MSM/Kernel or in AOSP source, speed is set to 115200 by default but it is actually 9600 when the phone is operating.
I can change the speed by using busybox and stty -F but I would rather not use that.
I'm looking for a way to set the speed at low-level, when building kernel and/or AOSP. I tried to figure out which file was involved in the creation/definition of /dev/ttyMSM0 but there is just to many of them and it doesnt seem to work.
Any ideas?

VPN Connection (OpenVPN, TUN.KO, IPSec XauthPSK... usw..)

Hey,
ive some issuse with the vpn connection (cooper gt-s5830).
about the issues with openvpn:
iv'e tried different versions of cm.
The problem is that if i press on a configuerd profile, it says "connect...." for a few sekonds and than abort with a message like "no network connection".
the openvpnserver log looks like no one've tried to connect
I used kali linux to sniff the data while the cooper trys to connect to the vpn server, but there was no output.
so the phone ( the openvpn implementation ) can't send data by wlan.
aktually ive no app to sniff the 3g data, but the issue is the same.
so i think its must be a mistake between the systemapp openvpn and the cm7​issues with IPSec Xauth PSK:
if i run the cooper with =>cm9 it will come with android =>4.x.
with android 4.0 the "IPSec Xauth PSK" connection is implementated.
if i try to connect it works. but if im not in the same wlan and trying to use the 3g connection the cooper does a force quit an boot again if i try to acces anything over network......​
ive tryed different roms different kernels... i dont know why the issue is every time the same..
vpn is a software solution so it shouldn be addictet to any harware resources... why this works for other phones and not for mine?
is any cooper out there with working vpn?
pelase help me
ps:
i wondert bout this htt p: // w ww . modaco.com/topic/353469-fixed-problem-using-openvpn-on-galaxy-ace-gt-s5830/
i tried many cm7 versions, no one worked...
Open vpn on cm10+
Now im trying to use "OpenVpn for Android" on the cooper with cm10.? Android 4.3
The log says:
Code:
OpenVPN ROUTE: failed to parse/resolve route for host/network: ::/0
Das Öffnen des tun Interfaces ist katastrophal gescheitert.
Fehler: Cannot create interface
ERROR: Cannot open TUN
Process eited with exit value 1
hey, ill be very glad if you reply to my issue...
just test vpn if it works please report to me...
it would be verry nice if i can get a cm backup with working vpn.
i still dont saw a cooper with working openvpn.
in one forum someone wrote he got openvpn working with just installing cm7.
akutally i use the last nightly version downloaded at cyanogenmods website...
but this vopenvpn implementation wont work for me....
in the next week i*l try to debug the coopers system and try to find the destination of the error..
maybe we kan fix it by editing the code before building cm7.
same issue with IPSec Xauth PSK
Hi,
I have the same problem using IPSec Xauth PSK with CM10.1: Connection works, but as soon as data is sent the phone reboots. I have already tried several versions of CM to no avail. Could it be a problem with a hardware driver that is still the original version from Samsung?
A few other people out there report this issue for other phones, as well, but I have seen nobody with a solution.
Thanks,
Theisu

Categories

Resources