Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Kura » Raspbian Pi 2 + Kura for Dual wifi mode
Raspbian Pi 2 + Kura for Dual wifi mode [message #1721819] Sun, 31 January 2016 13:59 Go to next message
Abel Gr is currently offline Abel GrFriend
Messages: 13
Registered: January 2016
Junior Member
Hi everyone,

I'm using Rasberry Pi 2 as Kura Gateway with a single wifi adapter(TP-Link TL-WN722).

I want to turn my wifi adapter work on two modes : Ad-hoc(AP mode) and Client(followinf parallel style).

It means my wifi adapter can work as an access point and It also can access to another wifi net in the same time.

I tested on Kura Web UI in device session. I can turn station mode and client. It can run well.
But can not run in parallel way.

I jut can configure it run in parallel two modes by raspbian OS ( Create a virtual interface).

Please show me how to do it on Kura. In case that I have to write new bundle, please give me some direction or example to work with wifi interface.

Thanks & best regards,

Phuong Hoang



Re: Raspbian Pi 2 + Kura for Dual wifi mode [message #1721967 is a reply to message #1721819] Mon, 01 February 2016 23:00 Go to previous messageGo to next message
Ilya Binshtok is currently offline Ilya BinshtokFriend
Messages: 14
Registered: September 2015
Junior Member
Hi Phuong,

How is it possible to use a radio in both Station and Access Point mode? It should be one or the other. Using virtual interface may help to solve networking issue (e.g. 172.16.1.0/24 network for AP and 172.16.2.0/24 network to connect to another AP). But it is my understanding that radio can be in one of three possible modes at a given time; either Access Point, Ad-hoc, or Station (managed) mode. If you want to use it in the AP mode you run the hostapd, right? But as soon as you launch the wpa_supplicant, the radio is switched to the managed mode even if the hostapd is still running. At this point if you kill the wpa_supplicant, the hostapd switches the radio back to the AP mode.

Note that Kura is currently supporting AP and Station modes of operation. If I understood you correctly, you have tried Station mode and it worked. Have you tried the Access Point mode?

Best regards,

Ilya
Re: Raspbian Pi 2 + Kura for Dual wifi mode [message #1721971 is a reply to message #1721967] Tue, 02 February 2016 02:53 Go to previous messageGo to next message
Abel Gr is currently offline Abel GrFriend
Messages: 13
Registered: January 2016
Junior Member
Hi Ilya,

Thank for your reply.
I configured both of mode AP & Station mode.
It worked very well in each mode.
But I need two modes run at the given time( parallel)
That's the problem. It can't work two modes in the same time.
By configure network with one virtual interface, I can make it work than i think.
But i wan do it by Kura or Bundle.
Thanks & best regards,
Phuong.
Ilya Binshtok wrote on Mon, 01 February 2016 23:00
Hi Phuong,

How is it possible to use a radio in both Station and Access Point mode? It should be one or the other. Using virtual interface may help to solve networking issue (e.g. 172.16.1.0/24 network for AP and 172.16.2.0/24 network to connect to another AP). But it is my understanding that radio can be in one of three possible modes at a given time; either Access Point, Ad-hoc, or Station (managed) mode. If you want to use it in the AP mode you run the hostapd, right? But as soon as you launch the wpa_supplicant, the radio is switched to the managed mode even if the hostapd is still running. At this point if you kill the wpa_supplicant, the hostapd switches the radio back to the AP mode.

Note that Kura is currently supporting AP and Station modes of operation. If I understood you correctly, you have tried Station mode and it worked. Have you tried the Access Point mode?

Best regards,

Ilya

Re: Raspbian Pi 2 + Kura for Dual wifi mode [message #1722135 is a reply to message #1721971] Wed, 03 February 2016 00:51 Go to previous messageGo to next message
Ilya Binshtok is currently offline Ilya BinshtokFriend
Messages: 14
Registered: September 2015
Junior Member
Hi Phuong,

Kura's org.eclipse.kura.net.admin doesn't support AP and Station mode at the same time. If you know how to do it at the system level and want to write you own Kura plug-in, you can do it. The only problem that this will conflict with the net.admin. Even if you disable wlan0 interface in configuration... In this case net.admin will bring wlan0 down. So if you want to write your own plug-in to cointrol wifi, I would recommend using te "No Net" installation of Kura,the one w/o network management.

Best regards,

Ilya
Re: Raspbian Pi 2 + Kura for Dual wifi mode [message #1722200 is a reply to message #1722135] Wed, 03 February 2016 11:01 Go to previous messageGo to next message
Abel Gr is currently offline Abel GrFriend
Messages: 13
Registered: January 2016
Junior Member
Hi Ilya,
Thank for your reply.
In fact, I just want to find an easy solution for this problem.
So i just want to find a solution from Kura API.
As my solution from network level, I think if i can write a bundle to make a new "virtual interface" for wlan0 interface, e.g, vwlan0
And make it visible in Kura WebUI(Network->interface name).
Then i can configure to make wlan0 become Access Point mode & vwlan0 become Station mode.
But I don't find out how to create "virtual network interface" by Kura API & Java.
I'm a newbie in JAVA OSGI.
So please give me some directions that you know.
Thanks & best regards,
Phuong

Ilya Binshtok wrote on Wed, 03 February 2016 00:51
Hi Phuong,

Kura's org.eclipse.kura.net.admin doesn't support AP and Station mode at the same time. If you know how to do it at the system level and want to write you own Kura plug-in, you can do it. The only problem that this will conflict with the net.admin. Even if you disable wlan0 interface in configuration... In this case net.admin will bring wlan0 down. So if you want to write your own plug-in to cointrol wifi, I would recommend using te "No Net" installation of Kura,the one w/o network management.

Best regards,

Ilya

Re: Raspbian Pi 2 + Kura for Dual wifi mode [message #1723248 is a reply to message #1722200] Fri, 12 February 2016 17:24 Go to previous messageGo to next message
Abel Gr is currently offline Abel GrFriend
Messages: 13
Registered: January 2016
Junior Member
Hi everybody,
if anybody know how to create an virtual interface by Kura API or Java API, please help me.

Thank in advance
Phuong
Re: Raspbian Pi 2 + Kura for Dual wifi mode [message #1723444 is a reply to message #1723248] Mon, 15 February 2016 17:44 Go to previous message
David Woodard is currently offline David WoodardFriend
Messages: 420
Registered: July 2014
Senior Member
Hi Phuong,

Kura does not support virtual interfaces at this time.

Thanks,
--Dave
Previous Topic:NullPointerException
Next Topic:Number of bundles : OSGI console vs Kura Web UI
Goto Forum:
  


Current Time: Thu Apr 25 04:45:39 GMT 2024

Powered by FUDForum. Page generated in 0.02709 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top