Active Topics

 


Reply
Thread Tools
Posts: 159 | Thanked: 217 times | Joined on Oct 2011
#271
Yes a "watchman" script would be the solution to make the GPRS connection more robust, but this is really beyond my skills. Before I got my first N900 I was pure windows _user_ so any scripting I do with maemo is purely copy paste from someone others scripts. Rarely I'm able to modify/troubleshoot them with the aid of search/google. The modification I posted to Viqsis script weren't mine, I copied them from previous post and posted them so someone could verify I understood the changes correctly, because the syntax of script wasn't obvious to me.

Well I think this means that when I have next spare hour or a day, I'll start learning more about scripting in Maemo/linux enviroment.
 
Estel's Avatar
Posts: 5,028 | Thanked: 8,613 times | Joined on Mar 2011
#272
Don't worry, judging by quality of your posts, and, overall, contributions, I'm pretty sure you'll manage just fine and catch grasp of it quickly. I'm no scripting guru myself - everything I know about it is RE'd from existing "knowledge of the ancients"

The super simple script I've posted in last post is really working well (proven in the field - it's set up on my son's N900 device and hooked up to interface up's, running a reverse-ssh to my router, so I can ssh to his N900 automagicaly, when he is connected to any network - no invigilate, he is 4 year's old ) - you just need to *literally* put a line connecting to GPRS instead of the "<>" field, and put whole script somewhere at the end of BT-PAN establishing script.

In the example, it reconnects GPRS after 5 seconds if it fails (may be too quickly, sooooooooooooooooooooooomething like 20 sounds more sane).

/Estel
__________________
N900's aluminum backcover / body replacement
-
N900's HDMI-Out
-
Camera cover MOD
-
Measure battery's real capacity on-device
-
TrueCrypt 7.1 | ereswap | bnf
-
Hardware's mods research is costly. To support my work, please consider donating. Thank You!
 

The Following 2 Users Say Thank You to Estel For This Useful Post:
Posts: 88 | Thanked: 411 times | Joined on Mar 2010 @ southern Italy
#273
Yay! it works!
My Microsoft Surface Pro 2 can use the N900 3G connection.

Currently I have to do everything manually (I guess everything would work the same for Windows 8.1 computers):

1) check that the N900 is "connected" to the Surface (the N900 shows a blue bluetooth icon; if not, open the Surface Bluetooth Settings and connect to the N900; you may need to switch bluetooth off and on, in the same Bluetooth Devices window)

2) on the Surface: open the "Bluetooth Personal Area Network Devices" window in the Control Panel / Networks / Devices (I actually made it a desktop shortcut) and wait a few seconds for the N900 icon to appear

3) select the ugly N900 icon in that window

4) click on the "Connect to..." tab and then on "Connect to access point" (I don't know if this is the exact name in the English release of Windows 8.1) to start using the N900 as a network device.

5) on the N900: start 9000's script at the beginning of this thread.


The current (latest updates) Windows 8.1 version only records outgoing network packets (another Microsoft™ Genuine™ Bug™): in its Bluetooth Network Connection Status dialog, while surfing the web I see lots of packets sent but "0 packets received" (an "ifconfig bnep0" on the N900 shows the actual number of rx/tx packets).

Some notes:

- if the Surface goes in stand-by mode, to connect again when resuming I need to repeat steps 2 to 5

- if I switch to Flight Mode the N900, or reboot/poweroff it, I need to repeat all steps 1 to 5
 
Posts: 159 | Thanked: 217 times | Joined on Oct 2011
#274
Somewhere in the later part of the thread (2 to 10) pages back from here is a improved script that makes the N900 do its part automatically. Look it up and test it.
 

The Following User Says Thank You to Kossuth For This Useful Post:
Posts: 88 | Thanked: 411 times | Joined on Mar 2010 @ southern Italy
#275
Yes, I placed the appropriate ifconfig/iptables commands in /etc/udev/rules.d/50-bnep.rules for the bnep0 interface, as of Viqsi example.

Now the N900 does not require interaction.
 
Viqsi's Avatar
Posts: 115 | Thanked: 136 times | Joined on Mar 2008 @ Central Ohio
#276
For folks wanting the internet connection to come up on BT connection, I suppose one might be able to get away with inserting an "/sbin/ifconfig gprs0 up" at the end of every bnepX "add" action in udev's bnep.rules file. I haven't tried it for three reasons:
1) I switch between Wifi and GPRS pretty often, and figuring out which is optimal and appropriate is something I normally handle by getting out the N900 anyways,
2) My "solution" for such problems involves having sshd and x11vnc running and
3) I pretty much never disconnect.

Warning: the above ifconfig/udev advice is entirely theoretical; I haven't even attempted to see what happens when running that command, let alone test that configuration. If it works, then, hey, great!

As an alternative, maybe there's some arcane dbus command one can have run that tells the n900 "hey, make with the internets now" or something. I wouldn't know offhand, but it might be something to look for.


and on a side note, it is so totally awesome that this setup is still helping folks.

Last edited by Viqsi; 2013-12-13 at 15:04. Reason: me no count good
 

The Following 2 Users Say Thank You to Viqsi For This Useful Post:
Estel's Avatar
Posts: 5,028 | Thanked: 8,613 times | Joined on Mar 2011
#277
Yea, it is pretty convenient, actually - still using it when N900 is providing my network access. Only odd thing is that every time I disable BT on N900 *or* PC, I need to re-pair again, providing bluetooth PIN, etc (despite fact, that on both sides, other device is already included on "trusted" llist). It doesn'ty happen with DUN, hands-free, file transfer or any other profile - it's *only* about this PAN connection settings. I haven't figured out what may be causing such situation, yet.

I wonder, do you have any idea about my question few posts ago (about setting another N900 to connect to my existing PAN provided by "main" N900 and automaticaly leech network access - i.e. making N900 a client, just like PC)?

Cheers,
/Estel
__________________
N900's aluminum backcover / body replacement
-
N900's HDMI-Out
-
Camera cover MOD
-
Measure battery's real capacity on-device
-
TrueCrypt 7.1 | ereswap | bnf
-
Hardware's mods research is costly. To support my work, please consider donating. Thank You!
 

The Following User Says Thank You to Estel For This Useful Post:
Posts: 34 | Thanked: 66 times | Joined on Jul 2010
#278
Originally Posted by Estel View Post
I wonder, do you have any idea about my question few posts ago (about setting another N900 to connect to my existing PAN provided by "main" N900 and automaticaly leech network access - i.e. making N900 a client, just like PC)?
I just got it to work on the unconnected n900 with

Code:
pand -c xx:xx:xx:...
dhclient bnep0
where xx:xx:... = hw address of primary n900.
...that's using debian (not maemo) however. I'm not sure how to set it up so I don't need to type this. Add another udev rule in the secondary n900 perhaps?

Last edited by radiochickenwax; 2013-12-15 at 08:04.
 

The Following 2 Users Say Thank You to radiochickenwax For This Useful Post:
Estel's Avatar
Posts: 5,028 | Thanked: 8,613 times | Joined on Mar 2011
#279
For starter, Maemo doesn't have pand nor dhclient This could be fixed by compiling it from debian, but it would be very messy way - we already have all required tools to achieve connection under Maemo, just lack a "howto".

Not to mention that internet connection settings need to be utilized, to allow connection for all Maemo programs, not only terminal session from which we issued connect command. This can be probably, overcome by using "dummy network" package from this thread:
http://talk.maemo.org/showthread.php?t=37710

As you may see, theoretically, that thread hold answer to my question, as people report success - problem is, instructions are so messy, than I can't make a 2+2 out of it. Thats why I hope that someone knowledgeable enough about BT thingies (9000, Viqsi, looking at you) could check informations from there, probably test them, and write, once for all, understandable instructions.

Cheers,
/Estel
__________________
N900's aluminum backcover / body replacement
-
N900's HDMI-Out
-
Camera cover MOD
-
Measure battery's real capacity on-device
-
TrueCrypt 7.1 | ereswap | bnf
-
Hardware's mods research is costly. To support my work, please consider donating. Thank You!
 

The Following User Says Thank You to Estel For This Useful Post:
Posts: 2 | Thanked: 0 times | Joined on Feb 2014
#280
Originally Posted by jackburton View Post
What does your /etc/bluetooth/main.conf look like?

You may need to modify the line:
Code:
DisablePlugins = network,input,hal
and remove the network part. This is my line on my phone:
Code:
DisablePlugins = hal
A reboot is recommended. You could probably try restarting bluetoothd instead as that may work.
Hallo together. I am a "noob" on linux and x-terminal, but how to modify the line? The other steps before I got managed.

Thanks for an understandable answer,

sÖren
 
Reply

Tags
bluetooth-pan, tethering


 
Forum Jump


All times are GMT. The time now is 00:24.