How to make a wifi hotspot on Fedora 20 that can serve universal devices with wifi access?

Well first of all sorry for the delay of my article. I was quite busy these years so couldn’t write an article in a long time. Let’s get back to my point. While staying in Pune I installed Hathway Broadband Internet for the internet access but the SIM card of my mobile is BSNL West Bengal SO net access via my mobile was very slow. So if I needed a good internet connection on my mobile then I had the choice of distributing my Broadband over the wifi. So basically I am giving the ethernet web access to all  the devices via my Wireless Interface.

So I tried the traditional  way of creating a wifi hotspot on fedora 20 by clicking on the “Network Settings (GUI)” and then clicking on the “Create a Wireless Hotspot” button but the hotspot as created was not visible on my mobile. And so I began Googling stuff to find a solution of this and found the hostapd and I tried configuring it in every way possible but was unsuccessful in running it so what was I to do now.

Then I dug more deep and finally came up with a solution. FOllow these commands and you may as well get lucky.

This command will help to know your interfaces

#nmcli d status

Screenshot from 2015-01-23 22:02:22

This command will help you know the channel in which your computer’s wireless interface is transmitting.

#iw list | grep channel

Screenshot from 2015-01-23 22:10:35

This command will enable ip forwarding on your machine

#sysctl net.ipv4.ip_forward=1

Screenshot from 2015-01-23 22:14:47

Now let’s add two more interfaces in our laptop savvy?

#iw dev wlo1 interface add wlan0_sta type station
#iw dev wlo1 interface add wlan0_ap type __ap

Now why we did this you ask? Then matey this is because we needed an interface in our system which can act as an ap which is not enabled by default. So this was a problem. Now as you can see in my first screenshot my wireless interface is wlo1 so when I created a new interface I named it wlan0 so that I could distinguish it.

Now go to the Network Settings and create the wifi hotspot by clicking on “Create a Wireless Hotspot” button on your native interface i.e. in my case it was wlo1.

And Voila!! We have a winner.

Suppose if there are any package issues then use this command

#yum -y install libnl*

Now go to this location. I mean use this command.

#cd /etc/NetworkManager/system-connections/

#ls

#cat Hotspot

your Hotspot file should look like this

[connection]
id=Hotspot
uuid=591615fe-bc1d-48ba-8236-f6cde3403788
type=wifi
autoconnect=false

[wifi]
ssid=Tornado
mode=ap
mac-address=CC:AF:78:52:59:56
security=802-11-wireless-security

[wifi-security]
key-mgmt=none
wep-key0=systemgeneratedpassword
wep-key-type=1

[ipv4]
method=shared

[ipv6]
method=auto

The systemgeneratedpassword in the above file will be different for different systems.

So that’s it Adios!!

Enjoy your WIFI…….

How to make Micromax 352 g USB dongle or modem work in Linux?

Yes I have this usb modem and I am using it now to post the next article of my blog, and that too about it.

When I bought this modem it was still the latest model of an usb modem that Micromax had launched in the commercial market. It worked fine for an year but with the advent of new Linux distros and Microsoft’s lauch of Windows 8. It started to show some problems. We can consider for windows that soon a driver will be updated for the modem but what about Linux? When I tried to use it on Linux Mint 14 (Nadia) it failed to recognise the device and the same happened with Olivia (Linux Mint 15) so I decided to find a way to use this modem on Linux Distributions like mentioned above. I read some forums and read about people getting the same problem with this device as mine but they were using Ubuntu or Debian. So let’s see how to make it work. Just follow these steps :-

1) You need to install the following package and the code to do so is also given

Package Name: usb_modeswitch

Code: sudo apt-get install usb_modeswitch

2) After installing it you need to connect your usb dongle and type in terminal ” watch lsusb”.

Then you will get your terminal looking like this :

Image3) Now my device is at Bus 003 Device 005 with vendor id ID 1c9e, device id 9605 and maker’s name OMEGA TECHNOLOGY. Just identify your device. If you cant then look at the terminal and disconnect the modem and reconnect the modem. You will see a content of the list flickering that’s your device.

4) Now when we have identified our device we need to make changes in the usb_modeswitch configuration file. To do this type in terminal

sudo gedit /lib/udev/rules.d/40-usb_modeswitch.rules”.

5) Now under the label:

LABEL=”modeswitch_rules_begin”

edit the file and type the following lines:

#MICROMAX 352 G USB MODEM

ATTRS{idVendor}==”1c9e”, ATTRS{idProduct}==”9605″, RUN+=”usb_modeswitch ‘%b/%k'”

then save the file and exit.

6) Now we need to create a new file, so type in the terminal:

sudo gedit /etc/usb_modeswitch.d/1c9e\:9605”.

Then type in the following lines:

#MICROMAX 352 G USB MODEM

DefaultVendor= 0x1c9e

DefaultProduct=0x9605

TargetVendor= 0x1c9e

TargetProduct= 0x9605

CheckSuccess=20

MessageContent=”55534243123456780000000000000606f50402527000000000000000000000″

then save and exit the file.

7) Now we have to edit the modules to run the usbserial module. So type in terminal :

sudo gedit /etc/modules

now at the end of the file add the following lines

#MICROMAX 352 G USB MODEM

usbserial vendor=0x1c9e product=0x9605

option
then save and exit the file.

8) Now type in the terminal:

sudo modprobe usbserial”

sudo modprobe option”

9) Now you can use the modem. But reboot will be recommended for better use and performance.

Note: It may take about three minutes on first detection of the device and after that it will work normally.

How to dual boot fedora 18 and windows 8 successfully?

When I bought my laptop a year back I asked the vendor to install a Linux Operating system along with the factory install Operating System of Windows 7. So I paid for it and got the Redhat Linux Enterprise Edition. But after sometime I got a problem with the installation and had to wipe off my entire hard disk. Then I tried to install the Linux distribution of Fedora, but could not install it. Every time I tried to install it, after the post-installations the boot loader installation failed. I thought that there is some bug or perhaps my laptop is not supporting it so I tried other distributions but was surprised to see that my laptop supported all the Debian distributions like Linux Mint, Ubuntu etc. So I thought why is it so? Then I stumbled upon a mission to install Fedora on my laptop which I assure you was pretty long and cost me even a 750GB internal hard disk. But while pursuing the mission Windows 8 was released and I upgraded to it.

Let me explain the whole process in great detail starting from fresh Windows 8 installation on the raw (empty or without any data) hard disk exampling on 1TB. Now here are the steps which I followed in order to achieve this.

1) During Windows 8 Installation select custom partitioning and create a primary partition of 20GB. You will see that a new partition with type system reserved has been created of size 350MB along with the 20GB we requested to create.

2) Now delete the 20GB partition that we created earlier. By doing so we will see that the space of 20GB has been added to the unallocated space.

3) Now select the partition named system reserved and click on driver option. Now extend it to about 1GB (I myself extended it to 2GB to be on the safe side).

4) Then create your C drive where you want to install your Windows by creating new partition out of the unallocated space. And leave some space unallocated where you want to install Fedora.

Note 1: We should always keep in mind that Fedora will require a primary partition to install and we can create only four primary partitions. So if we are partitioning just be careful about that otherwise there is going to be a serious problem.

5) Now install the Windows 8 completely and activate it, store data or create drives (as you wish because they would remain unaffected even after the Fedora installation so “why should we leave heavy things for the last?”).

6) Now insert your Fedora Installation disk and reboot your computer.

7) Boot from the Fedora installation media and check the installation media and jump to the installation screen.

Note 2: I am explaining the Fedora Installation as per the new Anaconda Installer devised by Fedora from its 18th Version onwards.

8) Select the language and keyboard character set configuration according to you choice and click next.

9) Now on the next page there is a box requiring the name of the local domain, in its fill up the name of your computer (I always fill Tornado in it as it’s my computer’s name).

10) Now let us skip the network registration part as it can be configured later on and click next.

11) Now configure your clock and your time zone and click on the “Done” button on the top-left corner of the screen.

12) Now if you are installing from a installing DVD image (which is always advisable) then you have an option to choose the required install the packages from the installation DVD image according to your requirements and wishes, otherwise if you are installing from a live image you don’t have an option and we will jump off to the next screen.

13) Now comes the important part. Click on the select disk option and then select your hard disk (which can be easily distinguished by the size as shown there). Then choose where you want to install the boot loader (which upon selecting the hard disk will automatically be added to system reserved partition of the hard disk which I had created earlier in step 2). Now click on the “Done” button on the top-left corner of the screen. This will take you to the partition wizard; now change the partition type to standard partition instead of default lvm type. Now if you are getting a reclaim space button that means you don’t have the free space required to install Fedora so click on it which will open a virtual partition table (which is done automatically by the installer) edit the partition table and then click Reclaim Space. Now if you get the screen as in step 11 then again click the disk option and click the “Done” button then you will get the partition creation tool as devised by the installer.

14) Now if it prompts to create the partitions automatically then click on it and you can see that the partitions have been created successfully. Now if you are happy with the partitioning scheme then all good proceed to installation otherwise let me give you a few tips on Linux installation partitioning:

a) The boot partition should be of minimum 500MB as it contains the boot loader and in Fedora the default partitioning scheme of /boot will automatically  allocate its size to 524MB.

b) The swap partition should be of the size of the RAM installed in the computer. For example I my laptop has a RAM of 4GB so is the size of the swap in my laptop.

c) The root partition is where the installation files, packages and binaries are installed (It’s like the C drive of the Windows). So consider it in that view I keep a considerate amount of space in root of about 40GB and over but in case you don’t possess so much space then 20GB is enough for it.

d) The home partition is where the user stores his data such as downloads, music, pictures etc. So just give whatever amount of space selected is left out.

15) So partition your hard disk accordingly and the click on the “Done” button on the top-left corner.

16) Then after the partitioning is done the computer will prompt for the beginning of installation. So click on it and begin what was awaited so far.

17) Set the root password. You can also create the user accounts (This feature has only been included in the Fedora 19 beta version. Hope it retains the place in Fedora Series ).

18) Now take a break as your installation finishes and your installer prompts you to reboot. Reboot the system and without fail select Windows from the GRUB or Grand Unified Boot Loader. Let us name this instance as FirstBoot.

Note 3: The next part which I am going to explain now is very necessary and critical so kindly read this part carefully and don’t do the mistake to skip this.

19) Now we have to remove the hybrid booting or fast booting as devised by Windows 8. This feature was devised by Windows 8 in order to give the user an experience of fast boot. All this works by the creation of a simple hyber.dll file at the time of shut down or restart, So that when rebooting the windows can load the driver information and wake them up quickly than the normal booting.

20) So in order to remove hybrid rebooting login to your Windows 8 machine, then type cmd in the start and we will be able to see command prompt icon, right click on the icon and choose run as administrator. Now click on yes and we get an elevated command prompt.

21) So now type in the command prompt “powercfg  –h  off” . Now your hybrid booting is turned off (In order to turn it back on just type the same command using the same steps and replace the “off” in the with “on”) and you have successfully installed the Windows 8 along with Fedora in the dual boot of GRUB.

Thanks for reading it. I hope you enjoyed this successful transaction as done by me. If there are any doubts or problems then please don’t hesitate.

Blog Introduction

Hi to all. I am right now an undergraduate Computer Science Engineer. I created this blog so as others can solve some of their problem using the contents of this blog. Any query and comment shall be graciously entertained and attended with.  I entertain a large variety of interesting fields such as programming in C, C++, Java, Python and C# (latest addition).  I am extremely interested in FOSS and wish to pursue my future while contributing in the same from professional point of view. Now here are some scribbles that got accumulated in my memory while working.

These are the things which I learned while working with and upon my beloved laptop named Tornado (HP Pavilion dv6 6156-tx Entertainment Notebook).