1

I need to create an AP-hotspot from a wireless connection. I use an external wifi adapter connected to my USB port on my laptop as a source for network connection. What I need to do is to extend that signal to my peripherals (=android phone. not rooted) using my inbuilt wireless network card on my laptop for broadcasting. I've installed hostapd and used the AP-hotspot script. Although it did create the hotspot and my phone was able to connect to it, it wouldn't let me use my external wireless card as a source for internet connection at the same time as using my inbuilt card for broadcasting or repeating the signal, which is what I need to do. Any suggestions, help or links related to this issue would be appreciated.

5
  • have you ever used the usb device to connect to the internet? do both devices show up in the network manager indicator dropdown menu?
    – mchid
    Aug 13, 2014 at 0:56
  • yes,I use my usb device for internet connection and both devices show up in the drop down menu. In terminal they are assigned interface wlan1 for usb-antenna (Ralink) and wlan0 for inbuilt wireless card (Qualcomm Atheros AR928X), both cards supports AP.
    – user314752
    Aug 13, 2014 at 1:08
  • So the usb device is working but it just won't authenticate when you try to connect to the wireless network?
    – mchid
    Aug 13, 2014 at 1:12
  • internet connection drops when I activate the hotspot with AP-hotspot. It won't let me choose a wireless source wlan1 at the same time as broadcasting the wifi-signal through wlan0. To simplify: the hotspot is created and I can connect to it with my phone but it won't let me access the internet as the connection drops as soon as I activate the hotspot (on my computer also, No internet) I figure it has something to do with the configuration of host-apd but I don't know what or how.
    – user314752
    Aug 13, 2014 at 1:22
  • mchid, both devices works fine and connects to the internet but what I need to create is some kind of bridge or repeater by using one of my devices (the usb adapter) as a receiver and the other one for broadcasting, and for some reason hostapd won't let me to.
    – user314752
    Aug 13, 2014 at 1:48

2 Answers 2

0

I just tried this out to verify that it works. No hostapd and no script. (I tried wp5.sh but it wouldn't work.) Sharing wifi from a wireless router to my laptop internal card (wlan0) to an acer chromebook from the laptop usb (wlan1). For some reason I couldn't get my internal card (wlan0) to broadcast.

  • Click on the network-manager indicator and select "create new wifi network" from the dropdown menu.
  • I first selected the wlan1 card and named the network "pineapples".
  • I have it set to ad-hoc and under ipv4 it's set to "share connection with other computers", no security.

Also, I clicked to connect from the chromebook while "pineapples" was still resolving as soon as the network appeared; then, the two computers connected to each other.

  • If the laptop drops or doesn't connect to "pineapples", it should still be listed as an available network from the network-manager dropdown list. Click on "pineapples" and while it is resolving, connect to "pineapples" from the other device.

At first, nothing would resolve but I clicked on my wlan0 network to reset the connection to the router and now both computers have internet.

2
  • one more note, my internet connection is on wireless-n and the ad-hoc network to the chromebook only transmits bg if it makes any difference.
    – mchid
    Aug 13, 2014 at 5:04
  • This method works if you want to connect another PC or other devices that supports ad hoc networks, but android doesn't support ad hoc, they don't even show up in androids network manager. Therefore, what I need to create is an Access Point or AP. That is possible, problem is that it won't let me choose a wireless source for internet (wlan1 in my case) at the same time as broadcasting the signal through another wireless adapter (wlan0). If I had my laptop connected to internet through ethernet there would be no problem, but my laptop is connected to internet through an external wifi-adapter.
    – user314752
    Aug 13, 2014 at 23:13
0

Solved! All I needed to do was to configure the hostapd.conf file with minimal settings, no script or additional applications required. What I did was that I first created an Ad-hoc network with Network Manager, as described in previous answer, and made sure I was connected to it on wlan0 and that I still had access to internet through wlan1. I then created the etc/hostapd/hostapd.conf file with typical configuration and set hostapd to start up at boot (see step 1 from How to setup an Access Point mode Wi-Fi Hotspot? ). I then started hostapd through terminal and the AP-hotspot was created instantly, detected on all my devices and able to connect with access to internet. That's all! No need to install conflicting software, forwarding IP:s etc, since Network Manager already taken care of the settings when setting up the ad-hoc network and hostapd automatically reuses those settings when creating the AP-hotspot.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.