Trying to connect to wlan

Forum thread started by Dilbert on Wed, 2010-06-02 13:36

Hi!
I am using Haiku Alpha 2 as my only OS on my Acer Aspire One.
Networking works right out-of-the-box.

My own wlan is encrypted, but I have a neighbor with a completely unencrypted network.
Unfortunately, he turns off his router when he is not at home, so I can only use Haiku online when the network is up.

I want to connect my Acer to my Nokia.
I have a Nokia telephone with a program called JoikuSpot.
It uses the 3G connection of the phone, and relays it to the wlan, effectively turning the phone into a portable router.

My Linux computer connects to this wireless zone whithout problem.
Haiku does not.

I have tried this command:
http://www.haiku-os.org/guides/dailytasks/wireless

setwep /dev/net/atheroswifi/0 JoikuSpot_nokia (JoikuSpot_nokia is the name of the wifi zone)

I run the ommand in Terminal, and it gives no message.
But it doesn't onnect either.
I can see all connected computers on the Nokia's display. Haiku does not connect.

The network app only says "no link".

How an it work only with my neighbor's network, and not with my Nokia?
I did not even have to configure the neighbors network. Haiku found it right after boot.

I wish to travel with this netbook and Nokia. But they must be able to connect first.

Comments

Re: Trying to connect to wlan

Did you check JoikuSpot configuration? I'll bet such wifi tethering app don't set unprotected configuration as factory default, but instead is configured to host a WLAN protected by wep or wpa/wpa2.

If it's wep, find the key and pass it to setwep command in Haiku:

setwep /dev/net/atheroswifi/0 JoikuSpot_nokia 0x[wepkeyinhexadecimalhere] 

Re: Trying to connect to wlan

JoikuSpot was configured to NOT use encryption.
My Linux-computers have no problem with this.

JoikuSpot's settings:

Encryption:
--None
--WEP Open
--WEP Shared

--None is selected.

By the way:
Are there plans to make a graphical network manager?
One that lets you see available networks, and double-click on the one you want?

Or let you connect to the Nokia using a USB cable?
Linux can do all that.

Re: Trying to connect to wlan

After reading a bit about JoikuSpot, the issue is not wep-related. JoikuSpot set up an ad-hoc (computer-to-computer) wireless LAN, while AFAIK Haiku wireless stack only support infrastructure mode (Access Point based).

Please fill a enhancement ticket for ad-hoc mode, as in the mobile-driven world of today, Haiku will have more needs to support it than before.

Re: Trying to connect to wlan

Haiku have some USB ethernet support, but I'll bet that a device like Nokia phone wont publish as a standard ethernet USB device but as a multi-class device, USB serial, USB ethernet, USB mass storage. But it worth a try.

You can use the listusb command (see listusb --help for usage syntax) to dump the whole USB device descriptors. If your nokia device is not recognized as an USB ethernet adapter - which I fear will be the case - then fill in *another* ticket with the listusb dump output and, if possible, some links to Linux supporting driver.

Re: Trying to connect to wlan

> Are there plans to make a graphical network manager?

Yes. Based more or less on the modular one under src/tests/kits/net/preflet, but which lack Wifi settings support currently.

> One that lets you see available networks, and double-click on the one you want?

Sure. Being able to only see wifi adapter but not available wlans will be quite pointless otherwise ;-)

I've bought recently a PCI Wifi adapter (a ralink chip supported under Haiku) in hope I'll find some free time to work on this area indeed. And not hope is lost yet ;-) Meanwhile, Ithamar had express intent to work on it too. I've no doubt such feature will comes soon, whoever do it.

I am sorry to inform you that

I am sorry to inform you that I am going away for two days and I left my Acer behind.
I would definitely have brought it along on this trip if networking worked, 'cause Haiku is a great netbook OS.
I will not be able to do "listusb" until I return.

But can you please describe to me how/why AdHoc is different from a proper router?
I imagined that something like that could be the problem, 'cause I tried to create a network from my Linux computer just to check if my Acer could connect to that. It could not.

So why is a network created by another computer more difficult than a proper, leading brand router?

Ticket

I made the enhancement ticket. You can read it here.
http://dev.haiku-os.org/ticket/6120

Re: I am sorry to inform you that

Dilbert wrote:

But can you please describe to me how/why AdHoc is different from a proper router?
I imagined that something like that could be the problem, 'cause I tried to create a network from my Linux computer just to check if my Acer could connect to that. It could not.

So why is a network created by another computer more difficult than a proper, leading brand router?

In Infrastructure mode, the access points ("routers") are a permanent piece of the infrastructure. All communication goes via an AP . e.g. for laptop X to send data to laptop Y, X sends data to the AP, with the address of Y as the destination, and the AP then forwards the data to Y. X never sends data directly to Y, and Y never sends data directly to X.

In Ad-hoc mode, data must be sent to another radio node, and all the nodes are transitory. Laptop X may send data directly to laptop Y, without an intermediary.

In this sense Ad-hoc looks like a "peer-to-peer" system while Infrastructure is more like "client-server". In any case, in a modern wireless stack there is considerable extra code to support each distinct mode of the hardware, and Infrastructure is usually the first mode people try to get working because it's most commonly used. As with most of the rest of the OS, the wireless support in Haiku is very immature, it's missing a lot of stuff both very obvious (like WPA, ad-hoc mode, user interface integration) and more subtle.

Re: I am sorry to inform you that

This may be off-topic but is there a way to make a Nokia or a Linux computer act as a router instead of this Ad-Hoc-stuff?

I am not allowed to remove encryption from my family's network, but I could relay the signal to my Haiku computer, via a Linux computer, if this can be done without Ad-Hoc.

Re: I am sorry to inform you that

Dilbert wrote:

This may be off-topic but is there a way to make a Nokia or a Linux computer act as a router instead of this Ad-Hoc-stuff?

Yes, depending on which exact wireless network hardware you have. But it is off-topic for this forum.

Quote:

I am not allowed to remove encryption from my family's network, but I could relay the signal to my Haiku computer, via a Linux computer, if this can be done without Ad-Hoc.

It seems as though this has the function of making the encryption somewhat irrelevant - any passer by can connect via the unencrypted network provided for your Haiku system, to the previously protected family network. So if you could not get permission to disable encryption, presumably this wireless layer 3 bridge concept would also be disallowed.

Infrastructure mode

I found a temporary solution for using Haiku when my neighbor turns his router off.

I have a laptop with 2 network cards. One is connected ty my own router (encrypted), and the other creates another wireless zone, which is WEP-protected.
That laptop runs Linux, and it is easy to make Gnome's network manager use infrastructure mode instead of Ad-hoc. I found that setting under Edit Connections in Gnome.

I will also test listusb with my Nokia attached.

Re: Trying to connect to wlan

This is listusb on my Acer Aspire One running Haiku, with my phone attached.

~> listusb
0000:0000 /dev/bus/usb/0/hub "HAIKU Inc." "UHCI RootHub" ver. 0110
0000:0000 /dev/bus/usb/1/hub "HAIKU Inc." "UHCI RootHub" ver. 0110
0000:0000 /dev/bus/usb/2/hub "HAIKU Inc." "UHCI RootHub" ver. 0110
0000:0000 /dev/bus/usb/3/hub "HAIKU Inc." "UHCI RootHub" ver. 0110
0421:0154 /dev/bus/usb/4/0 "Nokia" "Nokia 5800 XpressMusic" ver. 0100
064e:d101 /dev/bus/usb/4/4 "SuYin" "Acer Crystal Eye webcam" ver. 0001
0000:0000 /dev/bus/usb/4/hub "HAIKU Inc." "EHCI RootHub" ver. 0200
~>

Is this good or bad?
I wish to use mobile broadband.

Re: Trying to connect to wlan

It will not work for mobile broadband.

Your Nokia 5800 shows as connected by usb. This should allow you to copy files back and from Nokia phone and Haiku laptop but that is about all you can do.

mobile broadband appears to require certain software to work which usually is for Windows (and sometimes Mac OS).

A good place to start reading:
http://mobileoffice.about.com/od/phonesformobileworkers/a/how-to-tether.htm

You should also search for: mobile broadband tether and mobile broadband how to

Haiku's wireless only works with a router with WEP or no encryption. Install another OS on your laptop and use that when you need or have to. I run Linux, Windows 7 & Haiku which works very well for me.

Re: Trying to connect to wlan

mobile broadband appears to require certain software to work which usually is for Windows (and sometimes Mac OS).

I use my Nokia with Linux for mobile broadband all the time, using a USB cable. No software needed.
Debian and all other distros I have tried work fine. No special software for Windows or MacOS needed.

I guess it's an open standard if even Debian supports it out-of-the-box.

And of course, I use Linux. I am not holding my breath, waiting for Haiku.
I have two netbooks, so keeping Haiku is no trouble. But it only works at home.

Re: Trying to connect to wlan

I have not tried mobile internet with laptop so cannot say how it is exactly done but I am a little curious now.

Is internet done over cell connection? Or over WiFi connection?

Who is your cell phone provider?
Are you in North America? Europe? or what continent (or country)?

Re: Trying to connect to wlan

I live in Norway, Europe.
My provider is irrelevant, it works with every provider I have tried.

The connection is through the cell phone network, which means that usage will show up on my phone bill.
Price depends on what subscription.

In Debian with Gnome desktop environment:

Connect phone to laptop, using a USB cable. These cables are often provided in the box when you buy a phone.

The phone will ask:
-Choose USB-mode:
* PC-suite
* Mass storage
* Picture transfer
* Media transfer.

I choose PC-Suite.
(This step is for Nokia. I have not tried other phone brands.)

Now I left click on the network manager on the upper right of the screen.
One option listed between the available network names, is:
-New Broadband GSM Connection...
Click on it.
A wizard pops up. Answer the questions:
Country (choose from list), Provider (choose from list) Data plan(I just choose default.).
Click OK.

I can now choose my provider from the same list where I would normally chose a Wlan.
I can use internet at the sea, in the forest, at the bus... Anywhere.

Works with all distros I have tried, except PCLinuxOS.
It has a known bug, which may have been corrected now.

Procedure in KDE should be similar, but I haven't tried.

If even the freedom aware people of Debian can include this in a distro whithout any third party software, then it MUST be an open standard that Haiku kan use.
It's only a matter of getting someone to do it.

Re: Trying to connect to wlan

Thanks Dilbert, very informative.

Yes, if it works with Debian then it can work with Haiku too if you can find someone to program it.

I looked at instructions for Telus (Canada) and seems that the cell phone uses dial up to connect to the internet. ie: Haiku lacks dial up support - only has wireless and wired support for fast ethernet.

http://www.telusmobility.com/en/AB/htc_s720_support/htcs720_setup.shtml?...

From what I see, it looks like the cell phone is treated like USB modem and dial up software is used to connect to the internet.

You can make an enhancement ticket requesting broadband mobile internet (dial up support) over here after registering and maybe one day it will happen:
http://dev.haiku-os.org

Regards,

PS
Verizon (USA) says to use their software to get mobile broadband (maybe Linux would work for them too? since special software is not needed). So, every cell phone provider does things differently.
http://support.vzw.com/how_to_use/bba_connect_tethering_QRG.html

Re: Trying to connect to wlan

The Nokia PC-Suite mode turns the phone into an USB modem (CDC ACM device class).

Haiku does NOT have dialup networking support yet. It used to have one, but since the whole network stack design have changed a lot, and the dialup support hasn't be updated since.

Plus, and it's mostly due to the feature lack above, while Haiku does already have USB CDC support, it's not included by default in pre-built images!

If you want to try it, build the usb_serial driver located under src/add-ons/kernel/drivers/ports/usb_serial and add it to your system.
Then connect your Nokia via USB, and it should show up as a new /dev/ports/usb/0 device entry).

You may even play with it, like calling some phone number, from Terminal:

$ tail -f /dev/ports/usb/0 &    
$ cat 'AT' > /dev/ports/usb/0
OK
$ cat 'ATI' > /dev/ports/usb/0 

$ _

The first line is to read answer(s) from the phone/modem, the cat commands to send command.

See for AT commands supported by Nokia phones:
http://wiki.forum.nokia.com/index.php/AT_Commands

Okay, it doesn't turn on USB tethering under Haiku, agreed.
Try to wake some developer(s) will by reviving DialUp Trac ticket, as suggested.