[SOLVED] YUN as AP and internet connection

I would like have connection from my notebook to YUN (set as AP) and to internet. I try use tethering by usb but it did not work. I can have connection to YUN or to internet not for both.

First it’s good to know, when Arduino Yun cannot find the AP you have set it for (like your home wifi), it has a script that puts it back into default SSID and AP mode.

Next, you may have already watched this video, but it’s worth watching again. Pay extra attention to the part with the sketches.
Getting started with Arduino Yún - tutorial (6:53)

Then, read the short instructions immediately below. We (the volunteer support group) already know these steps by heart, so be familiar with the different reboot methods, and especially the 30+ second wifi reset. Also, not mentioned on that page, if you reset the Wifi/Linux part of the Yun, it will take from 2-8 minutes for the reboot. Lastly on this part, YOU MUST WAIT for the Linux portion to fully boot BEFORE YOU PRESS ANY of the RESET buttons.

Resetting the processors (AR9331, WiFi, and 32U4)

Then start over, plug your Yun into the USB port, run this sketch, and hit the ‘‘Wifi Reset button’’ (for 5-10 seconds). (see attached image)

The YunSerialTerminal provides a simplified console access to the Linux part of the Yun. It works via the USB port (the one that powers the Yun - the microUSB). From there you’ll be able to run a few commands to give us a better idea of problems.

Also, be ready with this sketch YunWiFiStatus. This sketch will help us see the status of your home AP. The sketch prints the wifi status to the console every 5 seconds or so. This sketch might seem familiar as it was in that first video link (above).

Let us know how it goes.
Post results from the YunSerialTerminal, if you are still having problems.
Please use markup when posting results. (see attached image)

Jesse

arduino_markup.png

By accident i solve the problem. I install usb driver for my phone and now working both connetions.

hankk:
By accident i solve the problem. I install usb driver for my phone and now working both connetions.

This makes no sense, I think it’s just a coincidence. Please tell us a little more about exactly what you are trying to do, and how you have things connected up. I fear that without understanding what is going on, you will suddenly find yourself unable to communicate again, and not know how to get it working again.

The USB connections have nothing to do with network communications. For example, you mention USB tethering - the Yun simply does not have that ability. If it’s working now, and you think USB has something to do with it, I’m certain you are mistaken and you are not using the data paths you think your using. That leaves you open to accidentally changing the data path you are actually using, leading once again to a loss of communications.

You want to be able to access the Yun and the Internet at the same time. The most common way to do that is as Jesse posted above, where the Yun is connected to the same wireless network as your computer. As an alternative you can use the Ethernet port and plug it into your network. In this way, your computer is accessing your own network to get to the Internet, or to the Yun. In addition, the Yun can also get out to the Internet using your network.

Another way to do it is to connect the Yun’s Ethernet port to the network leading to the Internet, then set up the Yun as an access point. You would connect your computer to the Yun instead of your local network, and the Yun would be set up as a router to forward your computer’s data to the Internet. This is a much more advanced setup, and is not commonly done. (It can also be reversed where the WiFi is the WAN connection to the Internet, and the Ethernet port is the local LAN connection, but that a very advanced and unsual configuration.)

The common thread between these methods (and actually, any Yun network topology) is the USB is simply not involved.

My notebook connected to YUN over WIFI. YUN ( LAN ) set up as access point. YUN (WAN )set up as DHCP server and i have brige WAN and LAN.My phone is connected to notebook over USB and tethering internet. At this configuration i have acces to ethernet (WAN) YUN and internet.

Before i installed usb driver for my phone i can not have connection to YUN and internet. I can only connect to YUN or internet. If i connect to YUN i lost my coonection to internet and conversely.
I hope now it is clear.

So it sounds like right now you have:

Internet --cellular-- Phone --USB-- Notebook --WiFi-- Yun --Ethernet-- Other devices

So when you are connecting to the Yun, you are going through the WiFi connection. When the Yun wants to get to the Internet, it is going through the WiFi to your Notebook, which is then going through the USB to the Phone, which is going to the Internet via cellular. That is definitely not a common connection scheme, kudos to you for getting it to work.

How does the Ethernet port come into play? Do you have other devices plugged into the Ethernet that then goes through the Yun, the Notebook, and then the Phone to get out to the Internet? Using the WAN and LAN names in this context is confusing, because in this case the normal roles are reversed: normally, the Ethernet port is a WAN port that goes to the Internet, and the WiFi is the LAN for the local devices. But in this case, the WiFi port is the WAN port going to the Internet (using the Notebook and Phone as intermediate routers) while the Ethernet port is the LAN (which is why you need to run a DHCP server on it, as the Yun is serving as the LAN's router.)

hankk:
Before i installed usb driver for my phone i can not have connection to YUN and internet. I can only connect to YUN or internet. If i connect to YUN i lost my coonection to internet and conversely.

So, when the laptop was going out to the Internet, presumably using the phone, was it using a WiFi connection to the phone? In that case, it makes sense that you cannot connect to both the phone's WiFi and the Yun's AP mode WiFi at the same time. In this situation, it would be a more common setup to have the Notebook connect to the phone using WiFi, and set the Yun in client mode to connect directly to the phone using WiFi. That way, either device can access the Internet directly though the phone, and they can also connect to each other by going through the phone. The Yun could still act as a router to bridge local Ethernet traffic to the notebook or to the phone and on to the Internet.