Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 31 Oct 2014, 00:13
All times are UTC - 4
 Forum index » Advanced Topics » Hardware » Networking » Wireless
HOW-TO force intel 4965AGN in ad-hoc mode (for JOIKUSPOT)
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count  
Author Message
stefan21

Joined: 12 Apr 2013
Posts: 10

PostPosted: Fri 12 Apr 2013, 20:05    Post_subject:  HOW-TO force intel 4965AGN in ad-hoc mode (for JOIKUSPOT)
Sub_title: Slacko 5.5 - The two scripts allow to force the wifi card 4965AGN in ad-hoc mode
 

First script should be placed in Startup folder:

#!/bin/sh
# Prepare puppy slacko 5.5 for wifi ad-hoc access for intel 4965agn card.
# This script has to be in the Startup folder. The script has to be 0755.
# The script works together with the script ad-hoc.sh. I named this script clear-if.sh.
# Firewall should be enabled after receiving the IP. When the card changes
# during a session in another mode as ad-hoc, the PC *must* be rebooted to
# force the card back in ad-hoc mode. Tested with a lenovo, aka ThinkPad, T61.
#
# All settings have to match the specific wlan information. This works with
# JoikuSpot 2012 Edition with Hex key setting. I assume it works also with
# other ad-hoc wifi spots.
#
ifconfig wlan0 down
ifconfig eth0 down
killall dhcpcd
sleep 6
rm -f /etc/network-wizard/wireless/wpa_profiles/*.WPA.conf
rm -f /etc/network-wizard/wireless/profiles/*.WPA.conf
rm -f /var/lib/dhcpcd/*.info
rm -f /var/run/*.pid
rm -f /var/run/dhcpcd/resolv.conf/wlan0
rm -f /var/run/wpa_supplicant/wlan0
rm -f /var/db/dhcpcd*.lease


Here's the second script :

#!/bin/sh
# Prepare puppy slacko 5.5 for wifi ad-hoc access for intel 4965agn card.
# This script can be run from everywhere. The script has to be 0755.
# The script works together with the script clear-if.sh. I named this scipt ad-hoc.sh.
# Firewall should be enabled after receiving the IP. When the card changes during
# a session in another mode as ad-hoc, the PC *must* be rebooted to force
# the card back in ad-hoc mode. Tested with a lenovo, aka ThinkPad, T61.
#
# All settings have to match the specific wlan information. This works with
# JoikuSpot 2012 Edition with Hex key setting. I assume it works also with
# other ad-hoc wifi spots.
#
rmmod iwl4965
rmmod iwl_legacy
rmmod mac80211
rmmod cfg80211
sleep 6
modprobe iwl4965
ifconfig wlan0 up
iwconfig wlan0 mode ad-hoc
iwconfig wlan0 channel auto
iwconfig wlan0 essid YOURESSID
iwconfig wlan0 key YOURKEY open
dhcpcd -I '' -t 30 -h YOURPUPPYHOSTNAME -d wlan0
sleep 10
ifconfig eth0 up

RUNNING THE FIRST SCRIPT DELETES ALL STORED PROFILES. MAKE SURE, THAT YOU HAVE ALL INFORMATION ABOUT YOUR STORED WLAN-PROFILES. ATTACHING PREVIOUSLY KNOWN WLANS AGAIN MEANS, YOU HAVE TO RE-ENTER ALL INFORMATION YOU'VE STORED BEFORE. IF YOU DON'T RUN THE SECOND SCRIPT, YOU HAVE TO BRING UP WLAN0 MANUALLY, MEANS IFCONFIG WLAN0 UP. IF YOU USE DHCP YOU SHOULD ALSO START THE DEAMON MANUALLY.

I couldn't find a way to prevent puppy to run the network-scripts while booting. The problem with this card seems to be, that once in another mode, I found no other way to force this card in ad-hoc mode.
Back to top
View user's profile Send_private_message 
dr1bble

Joined: 05 Sep 2013
Posts: 3

PostPosted: Wed 11 Sep 2013, 10:21    Post_subject: Re: HOW-TO force intel 4965AGN in ad-hoc mode (for JOIKUSPOT)
Sub_title: Slacko 5.5 - The two scripts allow to force the wifi card 4965AGN in ad-hoc mode
 

stefan21 wrote:
First script should be placed in Startup folder:

#!/bin/sh
# Prepare puppy slacko 5.5 for wifi ad-hoc access for intel 4965agn card.
# This script has to be in the Startup folder. The script has to be 0755.
# The script works together with the script ad-hoc.sh. I named this script clear-if.sh.
# Firewall should be enabled after receiving the IP. When the card changes
# during a session in another mode as ad-hoc, the PC *must* be rebooted to
# force the card back in ad-hoc mode. Tested with a lenovo, aka ThinkPad, T61.
#
# All settings have to match the specific wlan information. This works with
# JoikuSpot 2012 Edition with Hex key setting. I assume it works also with
# other ad-hoc wifi spots.
#
ifconfig wlan0 down
ifconfig eth0 down
killall dhcpcd
sleep 6
rm -f /etc/network-wizard/wireless/wpa_profiles/*.WPA.conf
rm -f /etc/network-wizard/wireless/profiles/*.WPA.conf
rm -f /var/lib/dhcpcd/*.info
rm -f /var/run/*.pid
rm -f /var/run/dhcpcd/resolv.conf/wlan0
rm -f /var/run/wpa_supplicant/wlan0
rm -f /var/db/dhcpcd*.lease


Here's the second script :

#!/bin/sh
# Prepare puppy slacko 5.5 for wifi ad-hoc access for intel 4965agn card.
# This script can be run from everywhere. The script has to be 0755.
# The script works together with the script clear-if.sh. I named this scipt ad-hoc.sh.
# Firewall should be enabled after receiving the IP. When the card changes during
# a session in another mode as ad-hoc, the PC *must* be rebooted to force
# the card back in ad-hoc mode. Tested with a lenovo, aka ThinkPad, T61.
#
# All settings have to match the specific wlan information. This works with
# JoikuSpot 2012 Edition with Hex key setting. I assume it works also with
# other ad-hoc wifi spots.
#
rmmod iwl4965
rmmod iwl_legacy
rmmod mac80211
rmmod cfg80211
sleep 6
modprobe iwl4965
ifconfig wlan0 up
iwconfig wlan0 mode ad-hoc
iwconfig wlan0 channel auto
iwconfig wlan0 essid YOURESSID
iwconfig wlan0 key YOURKEY open
dhcpcd -I '' -t 30 -h YOURPUPPYHOSTNAME -d wlan0
sleep 10
ifconfig eth0 up

RUNNING THE FIRST SCRIPT DELETES ALL STORED PROFILES. MAKE SURE, THAT YOU HAVE ALL INFORMATION ABOUT YOUR STORED WLAN-PROFILES. ATTACHING PREVIOUSLY KNOWN WLANS AGAIN MEANS, YOU HAVE TO RE-ENTER ALL INFORMATION YOU'VE STORED BEFORE. IF YOU DON'T RUN THE SECOND SCRIPT, YOU HAVE TO BRING UP WLAN0 MANUALLY, MEANS IFCONFIG WLAN0 UP. IF YOU USE DHCP YOU SHOULD ALSO START THE DEAMON MANUALLY.

I couldn't find a way to prevent puppy to run the network-scripts while booting. The problem with this card seems to be, that once in another mode, I found no other way to force this card in ad-hoc mode.


This was very helpful in helping me fix my problems with connecting to Ad-hoc AP ...appreciated Smile
Back to top
View user's profile Send_private_message 
amigo

Joined: 02 Apr 2007
Posts: 2263

PostPosted: Wed 11 Sep 2013, 14:03    Post_subject:  

"rm -f /var/run/*.pid"
This is a baddie, mate. /var/run is a public directory where many programs maintain pid (or other) files. Probably should be more specific with the filename globbing.
Back to top
View user's profile Send_private_message 
stefan21

Joined: 12 Apr 2013
Posts: 10

PostPosted: Thu 12 Sep 2013, 02:39    Post_subject:  

@amigo

Quote:
"rm -f /var/run/*.pid"
This is a baddie, mate. /var/run is a public directory where many programs maintain pid (or other) files. Probably should be more specific with the filename globbing.


Next time I'll use my hotspot I'll take a closer look. Thank you for pointing this out.
Back to top
View user's profile Send_private_message 
stefan21

Joined: 12 Apr 2013
Posts: 10

PostPosted: Wed 18 Sep 2013, 03:23    Post_subject:  

Currently I'm running my puppy on slacko 5.6. The scripts above are working to force the card in ad-hoc to connect to my joiku-spot.

BUT - I'm not able to get the card back in the managed modus. It is possible to force the card manually to connect in managed wpa networks. But I found no way to have this done during the boot sequence.

I re-installed puppy (frugal) and copied the old save file on my usb-stick. This leads to nowhere. Without the save file the card is in the managed mode and connects without any problems to any wifi-network. With the save-file on the stick, the network does nothing automatically.

I compared a frugal installation without a save-file with the other one. I copied all relevant (may be, I forgot something or do not know, where else information about networking is stored) information/configuration files, to the puppy with the save-file. No success. After booting the laptop, the network has to be invoked manually.

Don't know what to do. Anybody any idea?
stefan
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Advanced Topics » Hardware » Networking » Wireless
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0622s ][ Queries: 12 (0.0038s) ][ GZIP on ]