Tiny Core Linux
Tiny Core Extensions => TCE Q&A Forum => Topic started by: nil_von_9wo on December 03, 2012, 11:37:45 AM
-
I'm a relatively new user of Tiny Core and I seem to be having some problems staying connected to the internet (e.g. in Starbucks) while using Tiny Core, which I don't have when using other operating systems (e.g. Puppy Linux).
I'm guessing what's happening is that my connection is getting dumped by the router (for reasons beyond both my knowledge and control). With other operating systems, the network manager knows to reestablish my connection automatically, but TinyCore's "wifi" solution isn't so sophisticated and I'm looking to replace or supplement it (or maybe I just need to know how to use it better?)
I tried installing WifiRadar, but that doesn't seem to perform well on this computer (it doesn't reestablish the connection, the GUI freezes, and it seems to prevent the CLI wifi program from accessing the network device.)
I was hoping to try "Frisbee" which has no similar issues on Puppy, but as far as I can tell, that solution is exclusively for Puppy.
Any suggestions what I can/should try would be appreciated!
-Brian.
-
WICD?
-
The Wifi manager has little to do with maintaining a good connection, that is an issue of the driver. Sorry if you think Wifi app is not sophisticated, I'm sure is only in appearance. Connection quality is maintained by the driver, so you might want to compile a new updated version.
-
WICD?
Tried installing it from the app-browser, but it doesn't seem to work.
The only impact I've observed from installing it is an item "WicdNetworkManager" on the applications menu (and an equivalent icon on wbar), but clicking either seems to do nothing at all.
I tried to modify bootlocal.sh and .filetool.lst and rebooting as suggested by the app's info, but this didn't help.
-
The Wifi manager has little to do with maintaining a good connection, that is an issue of the driver. Sorry if you think Wifi app is not sophisticated, I'm sure is only in appearance. Connection quality is maintained by the driver, so you might want to compile a new updated version.
Maybe it is more sophisticated than I realize, but it seems to me that things like specifying preferred networks and saving password information, for example is missing.
Maybe it is a driver's job to maintain the connection and maybe the driver is failing ... if that's the case, if you could suggest how I should obtain and compile the correct driver's for my IBM ThinkPad R51, it would be appreciated...
However, I think that's only part of the equation. Once the connection is dropped (taking blame out of the equation), I would think it is the network manager's job to establish a new connection. Since "wifi" doesn't seem to ever remember what information I gave it before and the application instance only seems to exist only enough to create the connection, I don't expect it is capable of doing anything to create automatically (re)create connections without user intervention, even after it has been exposed to data exposing which networks the user is willing to accept as a carrier. With other network managers, I observe that details are retained and notifications will pop-up about broken connections and attempts (successful or not) to restore those connections.
Is that something wifi can do, but not by default? If so, how can I take advantage of this?
-
the wifi info file show
Title: wifi.tcz
Description: Tiny Wifi Scanning Tool
Version: 1.1
Author: Robert Shingledecker
Original-site: www.tinycorelinux.com
Copying-policy: GPL
Size: 4K
Extension_by: roberts
Tags: wifi wireless cli configuration tool
Comments: A console based tiny wifi scan access point tool.
Select from menu or type sudo wifi.sh
Creates wifi.db in HOME directory.
Can auto connect to first db entry with use of -a flag, e.g.,
/usr/local/bin/wifi.sh -a 2>&1 > /tmp/wifi.log
Add above to bootlocal or bootsync for quick auto connect.
When mobile, use menu for select list of APs.
Change-log:
2011/06/15 v0.1 Original Awk Program
2011/07/02 v0.2 Major rewrite to Ash/Awk
2011/07/09 v0.3 Chng db delimiter to tab, shell protect passwd, bug fix.
2011/07/14 v0.4 Separate loops for associate and IP request.
2011/07/23 v0.5 Support of ssids with embedded spaces.
2011/07/26 v0.6 Fixed initial wifi detection.
2011/10/09 v0.7 Added alias to ensure busybox is used.
2011/11/10 Changed desktop item to use cliorx and Network category.
2012/07/30 v0.8 Added sleep command for disconnect to complete.
2012/09/17 v0.9 Added static IP support.
2012/10/18 v1.0 Fixed db bug introduced by v0.9 patch.
2012/10/20 v1.1 Added flags "ap?" and Usage help
Current: 2012/11/15 v1.1 Code cleanup.
So, perhaps you put the file in the backup at each pc shutdown for keeping all networks informations?
Thats a guess.
-
Auto connect doesn't mean reconnect, the connection shouldn't be dropped in the first place. As above save the database file of preferred network and password to your backup and start the wifi with the above command listed will result in an auto connection on each boot to your preferred access point.
-
Creates wifi.db in HOME directory.
Can auto connect to first db entry with use of -a flag, e.g.,
I read that, but I'm not completely sure what to do with it.
Putting aside that I may want first available instead of necessarily the very first:
1. The wifi.db file created contains only "ReaderyNet mantell2 WPA", which I take to be the first entry. But this isn't the network I am using nor are the correspondences entirely obvious. How should I edit this file to reflect that (when in Starbucks) I wish to connect to the "BTOpen" network, no username, no password, no encryption, (usually) channel 11?
2. How can/should I put the file into the backup?
-
Auto connect doesn't mean reconnect, the connection shouldn't be dropped in the first place. As above save the database file of preferred network and password to your backup and start the wifi with the above command listed will result in an auto connection on each boot to your preferred access point.
Of course the connection shouldn't be dropped, but it does get dropped. And in other OSs, the network manager is apparently fixing it when it happens.
As I am getting dropped, the issue is more that I need to manually reconnect every few minutes then that I'm not getting automatically connected at boot.
-
Write a script that checks for internet response and reconnects with the TCL std wifi tool
something like
if [ `ping -c3 google.com | grep received | awk ' { print $4 } '` -eq "0" ]
then
/usr/local/bin/wifi.sh -a &> /dev/null
fi
#non cron check interval
sleep 5
run it as a bg job for less than one minutes interval checks or use a while [ -z loop ] else just use cron
-
2. How can/should I put the file into the backup?
read http://wiki.tinycorelinux.net/wiki:persistence_for_dummies
-
<cut>
Putting aside that I may want first available instead of necessarily the very first:
1. The wifi.db file created contains only "ReaderyNet mantell2 WPA", which I take to be the first entry. But this isn't the network I am using nor are the correspondences entirely obvious. How should I edit this file to reflect that (when in Starbucks) I wish to connect to the "BTOpen" network, no username, no password, no encryption, (usually) channel 11?
<cut>
Maybe i misunderstand but that sounds like a security issue just hooking up to first available wifi network.
Is it to much to ask for that if you change network the user have to acknowledge it, by actively doing so.
Could you not just run the wifi tool when you want to connect to a new network it will then update the wifi.db to reflect that.
Unless you know what you are doing dont edit the wifi.db your self leave it up for wifi tool.
anyway i dont know if we are talking past each other but maybe simplified functionality description is needed for a better surgestion.
-
"first available" could be achieved by setting essid to "any"
-
Write a script that checks for internet response and reconnects with the TCL std wifi tool
something like
if [ `ping -c3 google.com | grep received | awk ' { print $4 } '` -eq "0" ]
then
/usr/local/bin/wifi.sh -a &> /dev/null
fi
#non cron check interval
sleep 5
run it as a bg job for less than one minutes interval checks or use a while [ -z loop ] else just use cron
I like this approach, but if the word "like" above is important, I may not (yet) know enough about shell scripting to transform this into something serviceable.
But I'll try it next time I'm at Starbucks. :-)
-
2. How can/should I put the file into the backup?
read http://wiki.tinycorelinux.net/wiki:persistence_for_dummies
I'm admittedly to lazy to read this thoroughly right now, but I think I read this before when I wanted my extensions to stop disappearing and have already been persisting the values. I just wasn't thinking of this as "backup".
That said, while this does seem to effectively store the passwords for secured networks, it doesn't seem especially applicable against my problem with remaining connected at the Starbucks since Starbucks network isn't secure but rather open and open networks (even those which are for whatever reasons used) aren't added to the database.
-
Maybe i misunderstand but that sounds like a security issue just hooking up to first available wifi network.
Is it to much to ask for that if you change network the user have to acknowledge it, by actively doing so.
Could you not just run the wifi tool when you want to connect to a new network it will then update the wifi.db to reflect that.
Unless you know what you are doing dont edit the wifi.db your self leave it up for wifi tool.
anyway i dont know if we are talking past each other but maybe simplified functionality description is needed for a better surgestion.
[/quote]
I think we are somewhat getting sidetracked and talking past each other.
By first available network, I meant first network which I've at some point indicated a willingness to use, although admittedly I would want to be informed whether I'm being connected to a secure or open network and there should be a preference for secured networks if/when they are available.
But my current problem has nothing at all with wishing to change networks. When I sit in the Starbucks there are maybe 15 networks which get listed. All but two (sometimes three) are properly secured. One which isn't secured also can't be connected to as there is no DHCP server and/or they require a specific MAC address to connect. The other two are both run by Starbucks and have identical SSID names "BTOpenNetwork" (or something like that -- which perhaps may be a problem as I though SSID names had to be unique... but it doesn't seem to completely cripple their network) and both operate on channel 11. When I am in Starbucks, this is the only one I can connect to and I'm willing to accept the risk that this is an open network.
However, when I am using Tinycore to connect to BTOpenNetwork, the connection while valid and even useful is very unstable. I am silently disconnected every few minutes and must manually reconnect. With other operating systems (e.g. Puppy Linux), the network manager (Frisbee) quickly realizes and reconnects me without my ever needing to take any action (and I know it is the network manager because I see occasional pop-ups telling me it is doing this).
This is the only problem I am presently looking to solve.
(For whatever it is worth, I have verified that using wifi somewhere else, where I can get on a less trafficed private server, Tiny Core does not have any problem maintaining the connection, so I think that rules out driver problems.)
-
"first available" could be achieved by setting essid to "any"
I think I'm missing come context to help make use of this wisdom. (e.g. Where/how do I set essid?)
As indicated above, I'm not sure if that is exactly what I want though and we are getting off on a tangent from my real problem (also stated above).
-
You not being sure what exactly you want and cramming many different aspects into one thread, I gave a very specific answer to one of all those...
A measure you can take to minimize dropping of connection is setting the rate of your radio to "1M", some radios/drivers accept "1M fixed" which is preferable.
If an explicit reconnection is required or not once a link has been disconnected may depend on specific radio/firmware/driver in use.
-
umm well I use wired internet and failed to get TC onto an android device that uses wireless thats my intro
however, I think the OP wants a more flexible network manager for wireless?
something that can show scan network results and he/she then selects which one
I gather, without knowing that Roberts tcz may have assumed a static location?
tinypoodle
I have the time to build something that is the base of the Ubuntu network package, its 2 packages the manager and its applet
I have found the source here
http://cgit.freedesktop.org/NetworkManager/NetworkManager/snapshot/NetworkManager-0.9.6.4.zip
and a mirror of the applet here
http://mirror.internode.on.net/pub/ubuntu/ubuntu/pool/main/n/network-manager-applet/network-manager-applet_0.9.6.2.orig.tar.xz
Altho I could go ahead and try to compile without your say so, I prefer your wisdom pls?
Do you think TinyCorers would want a "bloated" package but which enables more features?
--I intend no insult to those who have built packages already ok.
I don't want to compile it if theres an easier solution.
thanks for reading
-
I think the repo has a few optional wireless managers
-
All this noise about wifi.tcz. wifi.tcz is a tiny script that provides a simple wifi tool. It is not static. I "eat my own dog food", i.e, I use at Starbucks, Panera Bread, Pete's, and several open wifi spots, as well as at home. To complain about missing features is like complaining about my use of busybox, or ash, or awk. You are free to choose any extension that suits your fancy. I plan no further bloat to wifi.tcz. I think you should stop complaining and choose another tool.
-
One which isn't secured also can't be connected to as there is no DHCP server
A dhcpd server is not a requirement to connect.
The other two are both run by Starbucks and have identical SSID names "BTOpenNetwork" (or something like that -- which perhaps may be a problem as I though SSID names had to be unique... but it doesn't seem to completely cripple their network) and both operate on channel 11.
Such could indeed create a tricky situation.
Try specifying one specific ap to connect to by mac.
To be able to do so in managed mode may or may not require further steps of configuration, depending on driver.
However, when I am using Tinycore to connect to BTOpenNetwork, the connection while valid and even useful is very unstable. I am silently disconnected every few minutes and must manually reconnect. With other operating systems (e.g. Puppy Linux), the network manager (Frisbee) quickly realizes and reconnects me without my ever needing to take any action (and I know it is the network manager because I see occasional pop-ups telling me it is doing this).
That's an unfounded assumption; I could see connects and disconnects in real time in syslog (tail -f) without ever using any kind of "network manager".
-
tinypoddle
I have the time to build something that is the base of the Ubuntu network package, its 2 packages the manager and its applet
I have found the source here
http://cgit.freedesktop.org/NetworkManager/NetworkManager/snapshot/NetworkManager-0.9.6.4.zip
and a mirror of the applet here
http://mirror.internode.on.net/pub/ubuntu/ubuntu/pool/main/n/network-manager-applet/network-manager-applet_0.9.6.2.orig.tar.xz
Altho I could go ahead and try to compile without your say so, I prefer your wisdom pls?
Do you think TinyCorers would want a "bloated" package but which enables more features?
Once you ask, personally I have had only the worst experiences with wireless under ubuntu, so I would never touch that.
-
There are full blown network managers already in TC repo for Gnome, KDE, etc.
-
tinypoodle and others
I am withdrawing my offer to build a ubuntu style network manager
sorry if it caused anyone grief :-[
-
tinypoddle and others
I am withdrawing my offer to build a ubuntu style network manager
sorry if it caused anyone grief :-[
Do not misunderstand my comment. I just referred to existing network managers in the repo to try before creating another one. Of course you are welcome to build and share another one :)
-
You not being sure what exactly you want and cramming many different aspects into one thread, I gave a very specific answer to one of all those...
A measure you can take to minimize dropping of connection is setting the rate of your radio to "1M", some radios/drivers accept "1M fixed" which is preferable.
If an explicit reconnection is required or not once a link has been disconnected may depend on specific radio/firmware/driver in use.
Could you please be more explicit about how I might try this?
Thanks.
-Brian.
-
http://cgit.freedesktop.org/NetworkManager/NetworkManager/snapshot/NetworkManager-0.9.6.4.zip
I think "NetworkManager" is already available through the app-browser, but I couldn't figure out how to get it to work even after installing the client as well.
Specifically, I could find where to add wireless networks in the client interface, but it didn't seem to have any way of knowing which wireless networks were available in my location and to set up a profile, I'd need to first know the MAC address to use (no idea why it couldn't just detect a default).
-
All this noise about wifi.tcz. wifi.tcz is a tiny script that provides a simple wifi tool. It is not static. I "eat my own dog food", i.e, I use at Starbucks, Panera Bread, Pete's, and several open wifi spots, as well as at home. To complain about missing features is like complaining about my use of busybox, or ash, or awk. You are free to choose any extension that suits your fancy. I plan no further bloat to wifi.tcz. I think you should stop complaining and choose another tool.
Sorry if I offended you, but I never suggested or intended to suggest that wifi is useless, I merely intended to assert that it doesn't do everything I want it to do or it isn't clear to me how to do everything I want it to do, and if you go back to the original message or even look to the subject you will see that I was looking to do exactly that: choose another tool.
In fact, I even had/have one in mind that I like (frisbee) but as far as I can tell, it is only available for Puppy.
-
A dhcpd server is not a requirement to connect.
True, but I neither know how to manually set the IP address when using wifi, nor do I know how to sniff out a valid range for that particular wireless network.
For all I know, the network could even be using MAC filtering.
The other two are both run by Starbucks and have identical SSID names "BTOpenNetwork" (or something like that -- which perhaps may be a problem as I though SSID names had to be unique... but it doesn't seem to completely cripple their network) and both operate on channel 11.
Such could indeed create a tricky situation.
Try specifying one specific ap to connect to by mac.
To be able to do so in managed mode may or may not require further steps of configuration, depending on driver.
This sounds worth trying, but you are currently talking over my head... if you could give me explicit steps how to try this, it will be appreciated.
-
Write a script that checks for internet response and reconnects with the TCL std wifi tool
something like
if [ `ping -c3 google.com | grep received | awk ' { print $4 } '` -eq "0" ]
then
/usr/local/bin/wifi.sh -a &> /dev/null
fi
#non cron check interval
sleep 5
run it as a bg job for less than one minutes interval checks or use a while [ -z loop ] else just use cron
I'm looking at this suggestion and I'm wondering how I can make two modifications:
1. Because Google may not have 100.00% uptime (nowhere does), I'd like to check two or three sites (e.g. microsoft.com and yahoo.com) as well before determining to reset the connection.
2. The connection I am concerned with is not a secure connection and therefore isn't added to wifi.db. Is there a way I can modify the command line for wifi so it will connect to an open network?
-
Write a script that checks for internet response and reconnects with the TCL std wifi tool
something like
failed=1
for site in google.com microsoft.com yahoo.com
do
if [ `ping -c3 $site | grep received | awk ' { print $4 } '` -eq "0" ]
then
failed=`expr "$failed" + 1`
fi
done
if [ $failed -ge 4 ]
/usr/local/bin/wifi.sh -a &> /dev/null
fi
#non cron check interval
sleep 5
run it as a bg job for less than one minutes interval checks or use a while [ -z loop ] else just use cron
I'm looking at this suggestion and I'm wondering how I can make two modifications:
1. Because Google may not have 100.00% uptime (nowhere does), I'd like to check two or three sites (e.g. microsoft.com and yahoo.com) as well before determining to reset the connection.
2. The connection I am concerned with is not a secure connection and therefore isn't added to wifi.db. Is there a way I can modify the command line for wifi so it will connect to an open network?
I edited the script, i have not executed it, in regards to 2. good thing it does not, how would you know its a trusted network someone else could make he's own open network and put up af dns server to phish your information or just listning in on your data transfer.
-
2. good thing it does not, how would you know its a trusted network someone else could make he's own open network and put up af dns server to phish your information or just listning in on your data transfer.
While I thank you for the script, we seem to be losing the point of this very thread, so let me recap/restate the situation and see if that helps generate an actual viable solution:
1. For reasons that are irrelevant, the only place I can connect to the internet is a local Starbucks whose routers may be junk, or may be misconfigured, or both. They have two routers (both are open/public wifi hotspots with the identical SSID "BTOpen" and appearing on channel 11). These account for 2 of up to 15 allegedly available wireless connections (the rest of which I don't have authorization to use) and when wifi.sh runs there is way of predicting what number I will need to type to use one and there is no way to for wifi.sh to remember that this is a wireless connection that I am willing to (and under the circumstances, must) use.
2. For some reason when connecting to this wireless network, my computer is constantly, repeatedly being dropped, which Tinycore's wifi pays no attention to. Applications using the network start to fail and only once I personally observe this can I restart the connection, which must be performed completely and annoyingly manually.
3. Using other operating systems (e.g. Windows and Puppy Linux) and their default wireless adapter drivers and default network managers, seem to realize this failure promptly and fix the connection in the background, often before applications realize they can't connect to the internet and fail. However, because my laptop is an antiquated piece of junk with limited resources, I would prefer to use Tiny Core because aside from networking, I see significant improvements towards how my computer performs while web browsing (which is the main purpose I have for this machine).
4. I realize and accept the risks of using Starbuck's open network for the limited activity I intend to use this machine at this location. I don't wish to constantly tell my computer that this is okay and am willing to accept the risk of having it automatically connect to Starbucks wifi without reiterating the dialog. Should I my circumstance change, I'll make sure that I don't connect to some unlikely trap that someone is spoofing Starbuck's wifi just in case someone who uses it comes along. Meanwhile, if the second BTOpen at Starbucks is actually a spoof, I have no way of knowing the difference and would anyway not treat either as a secure connection.
(Post made from within Puppy Linux because I'm getting fed up with the lack of useful support I'm getting on this issue and don't wish to spend half my day manually reconnecting to the network.)
-
Two AP's with the same ID on the same channel at the same location? Great.
-
Two AP's with the same ID on the same channel at the same location? Great.
I suspect that may be part of the problem, but I'm not in a position where I can fix it and, as asserted, my other operating systems handle whatever the problem(s) is/are better (I suspect Mac OS handles it better to since most users here have Macs and I don't see them struggling to remain connected.
-
hmm i did not read that big post but skimming it seems you just sums up, "ill take the risk would have been enough", im just saying it might not be seen as a flaw in TCL wifi tool
TCL is more for building your own system and i wonder a bit why you chose TCL anyhow make the script take and argument like hotspot name and echo it into the wifi.db before connecting. You could also port the wifi tools you like to TCL or write your own i think thats more the spirit of TCL than complain everything is not automatic and supported.
again i dont have wifi tool or db and im writing the script from head so you have to adjust it yourself
wifi_bug.sh HOTSPOT_NAME OTHER_ARGS
## Runs in loop every 3 seconds
## Takes arguments to alter the wifi.db before autoconnect
while [ -z ]
do
if [ $1 && $2 ]
then
echo $1 $2 > ~tc/wifi.db
fi
failed=1
for site in google.com microsoft.com yahoo.com
do
if [ `ping -c3 $site | grep received | awk ' { print $4 } '` -eq "0" ]
then
failed=`expr "$failed" + 1`
fi
done
if [ $failed -ge 4 ]
/usr/local/bin/wifi.sh -a &> /dev/null
fi
sleep 3
done
-
Hi ananix
A few minor points. As a matter of completeness, you should include:
#!/bin/sh
in your example.
Since HOTSPOT_NAME OTHER_ARGS don't change once you've invoked the script, this:
if [ $1 && $2 ]
then
echo $1 $2 > ~tc/wifi.db
fi
should probably be outside of the loop.
Using code tags would also be nice. ;D
-
Having myself a wireless radio which frequently required a manual reconnect and only recently having delved into wpa_supplicant, I found that when using wpa_supplicant disconnection issues are automatically taken care of, i.e. upon disconnect wpa_supplicant will automatically attempt to reconnect, and besides from that also will always attempt to connect to networks according to priorities as specified in config file :)
Edit:
N.B. the reconnections could be observed when running wpa_supplicant in foreground.
-
Doing a bit more testing, I found that when using another app to set radio to a different channel than the one to which wpa_cupplicant has currently connected, then wpa_supplicant would actively try to compete and get the connection back, or also try to connect to a different network as specified in config file.
OP stating not to encounter same issues with e.g. puppy et al might likely be due to wpa_supplicant running by default.