I have the following problem.
I'm trying to configure my router (Iskratel F50 or Mikrotik hAP lite) to control WiFi traffic with 802.1x and some kind of RADIUS server. But, when I configure everything on the router, and try to connect on that WiFi with my Android phone, it just refreshes the list of available wifi connections and shows the test connection as "saved". Nothing else happens.
If I'm right, the router should send UDP package, with access request data to RADIUS server or whatever it is on specified IP, right?
Can someone help me?
I need my device to get access request and then decide to allow or deny access to that client, depending on other details.
At the RADIUS IP is an Arduino device, that shows all data that came on RADIUS port to the LCD.
Thank you.
Generally, for a 802.1x-authentication over RADIUS, one would indeed expect to see several packets. The default ports for RADIUS are 1812/UDP (authentication) and 1813/UDP (accounting).
The first packet your router sends to the RADIUS IP should already have a User-Name-attribute. The connecting device should query the user for this. So, when you connected to that SSID, did your phone prompt you for a username (and password)?
Related
I want to setup a register / discover type of service connection between 2 devices on the same wireless LAN. Idea is to find, connect and send wireless router password to a new device for easy installation. This needs communication between 2 devices on the same wireless network before connecting to router with SSID, password.
I'm aware of zeroconf, bonjour and mDNS libraries. All implementations I see start with connecting to wifi in station mode to get a local IP with hardcoded SSID and password, which is not known at this stage.
In other words, how can connect to wireless and get a link local IP without SSID and password?
-- Edit for better explanation --
The flow i'm looking for is like this:
1- Mobile phone (iphone or android) is connected to secure home wireless network as usual
2- A new device with wireless interface is powered on first time.
3- Device gets (or sets) a local IP and local dns name (multicast ip and name) for itself
4- Device broadcasts its available services to the network
5- Phone discovers the service, along with devices' local name and even local ip already assigned.
6- Phone initiates a direct connection with the device to send wireless configuration information (ssid and password for the access point)
7 - Device saves this information, resets into normal operation mode
8 - Device connects to internet
9 - Device services are still available in the local network
-- edit --
Code will run on esp32 or esp8266, so compatible c or arduino libraries are ok.
I'm aware of smartconfig implementation of ESPTouch application, but it is a horrible design! Discovery program tries to create sockets to every possible IP address to find the peer IP.
Read this sentence in your question again and think about it:
In other words, how can connect to wireless and get a link local IP
without SSID and password?
The protocols you mentioned are only possible AFTER you're part of the network. As you know, wifi networks are protected to prevent unauthorized access.
Try wifi protected setup (WPS) in Google.
I want have an app on my android phone (which I will write) which will respond to some HTTP request. The request is going to come from a programmable board/microchip (like Arduino) over the home wifi router. The programmable board would be able to send the request to a hardcoded URL.
(I don't understand networking. So, please pardon me if my next statements are technically ambiguous/incorrect.) I would NOT be running the HTTP server on my phone over a public/constant IP. My phone currently shows me a private IP of 192.168.1.4. I am guessing it might not remain the same every time as I and others in the house disconnect/reconnect various devices. Is there a way to ensure I reach my phone every time through some internal IP? I don't need it to be accessible from outside my wifi router.
Thanks.
-- Parag
According to Obtain client MAC address in ASP.NET Application, it is not possible. I am not entirely convinced because whenever I connect to Tim Hortons WiFi, my MAC address is known.
Occasionally, the network is slow and I see this URL like this before being redirected to the Connect page:
http://timhortonswifi.com/cp/tdl3/index.asp
?cmd=login
&switchip=172.30.129.73
&mac=60:6c:66:17:1a:83
&ip=10.40.66.229
&essid=Tim%20Hortons%20WiFi
&apname=TDL-ON-NEP-02177-WAP1
&apgroup=02177
&url=http%3A%2F%2Fweather%2Egc%2Eca%2Fcity%2Fpages%2Fon-72_metric_e%2Ehtml
So according to this URL, the site knows the IP address of the router, my MAC address, the IP address assigned to my device by the router, the network SSID, some other pieces of information, and the URL I was trying to access prior to connecting.
There's two options: Tim Hortons WiFi Basic and Tim Hortons WiFi Plus, where the "Plus" option allows me to connect to any Tim Hortons WiFi access point in Canada automatically with this device. Registration requires an email address, so I'm assuming this is possible by checking the MAC address and storing it in a database that routers ping upon connection. More info here.
According to the extension of this page, I can safely assume it is ASP. How are they obtaining this information?
When your client traffic reaches the first router, that router will route the traffic to the adecuated port, changing the response MAC address with its own MAC address so the answer will be routed to it. And this will happen for each of the routers the packets travel by. So, at the end, the web server will only see the MAC address of the last router where the answer will be sent to be routed back to the previous roter, and this process repeated until the answer reaches the client.
No, there is not way to obtain the MAC address of client from server side.
But, what you are seeing is a client sending its information to a server. So, the answer can be converted into "how can i obtain my local mac address and send it to the server?".
Browsers do not allow to read this information. Some properly signed/configured ActiveX or Java applets can do it, but they can be blocked, or you can have some device that will not execute java nor activex, so it is not a reliable way of doing it.
In the case in your post, the easiest way of doing it is configuring the wifi access point dhcp or dns server to serve a proxy configuration file that will allow to configure a redirection to the desired web server, redirection that has been created inside the access point, which have all the shown information in your post.
I basically have used the ethernet connection successfully with Microcontrollers to control real world aspects,The dilemma is of IP address I mean how can 192.168.0.155 be accessed from around the world without any specific MAC ID attached to it, I wanted to implement the same networking usage with a GSM module eliinating wires but that doesn't have MAC addressing so TCP connection from it towards a IP client won't reach?
I am not sure how you did your 'real world control' with Ethernet before, but the MAC address does not 'live' past the next recipient (which means after the next switch) so do not use it for anything.
Your 192.168.x.x address is private, so it will never appear beyond your internet gateway (i.e. your GSM modem if you used GPRS), and it cannot be used directly for anything on the internet. It is not easy to briefly explain here how the internet routing works, but you should either use port forwarding towards your private IP address given to you by hour DHCP server (in which you have to initiate request from the client so that other side would not the IP address and the port), or you have to either have fixed public IP address or you could use some dynamic DNS service (like http://www.noip.com/), or you can update data from the client on some server over which you have control (like if you updated data manually from your PC).
All summed up, it is not very clear what you are trying to achieve, but I would say you need to check out some things about internet routing before you proceed.
I am trying to send data using the AsyncUDPSocket class. And I can send data using the iPhone simulator over the wire to another machine that is running a simple C-coded listening server. I can also receive data over the wire using a client connected to the simulator(server). However, when I tried the same over Wifi, using the simulator, I could only send data but not receive any data.
I read on another post, that unicast data makes this possible. How can I acheive this using AsyncUDPSocket?
Thanks,
Angelo.
Ok, I figured this out. A newbie kind of thing, really.
When I set my Mac network preferences to Ethernet, I get an IP for me to communicate. However, when I turn Airport(Wi-Fi for more newbies) ON, and ethernet cable disconnected, I checked my network preferences, and sure enough my IP address was a different one.
Spoke to a friend (an ace in networking) and the thing clicked immediately: On WiFi networks a DHCP server allocates an IP address. This IP address has to be reserved, at the very least, at the DHCP server. Since my IP was not reserved, I had to change the IP address, in my udp_client.c file, recompile and run the client to connect.
BTW, I can now communicate between my iPhone and my PC using my local WiFi (office) network.
For any who might face the same problem, do not be assured that the IP address of your mchine is the same, when you switch from LAN to Wifi, and use the device mostly for WiFi reated testing. :)