Arduino Yun and WiFi - need help getting started

I am new to Arduino and just bought a Yun for a project. I'm an electrical engineer, retired, and have had a lot of experience with micros going back to the "old days" of the Z80, etc. I understand micros at the circuit level and assembly language level, but I'm new to WiFi and this much more complex programming environment and need some help getting connected to my Yun.

If I understand correctly the Yun is ready to go for WiFi as long as I initialize the WiFi portion of it properly at both my laptop and the Yun. I can't detect the Yun yet via WiFi from my laptop so presume it needs initializing. I have downloaded programs to the 32U4, that went smoothly. But the WiFi baffles me, I have no idea where to start. SSID? OpenWrt-Yun?

The Getting started instructions say "When you first power on the Yún, it will create a WiFi network called ArduinoYun-XXXXXXXXXXXX. Connect your computer to this network. Once you've obtained an IP address, open a web browser, and enter http://arduino.local or 192.168.240.1 in the address bar. After a few moments, a web page will appear asking for a password. Enter "arduino" and click the Log In button. "

I have no idea how to connect my computer to that network. It does not show up on my laptops network options, only my existing MiFi unit does where I get my internet from (see * below).

My project involves creating a central control station on a notepad or laptop that will communicate with up to 20 or so remote devices on WiFi, all Yun's of course. I will need to be able to send commands from the controller to each remote device and receive data back from each station, all over WiFi. Does each Yun have a unique WiFi identifier already programmed in?

Any help would be appreciated.

Dean

  • Since posting this I have found that my laptop recognizes that the Yun is out there on WiFi and gives me an Arduino Yun - XXXXXXXX to connect to, but it won't connect. And I have no idea how to obtain an IP. Thanks for any help you can give.

If I get it correctly, your computer see the "Arduino Yun-ABC" wifi but cannot connect to it? Can you tell if the signal is good? Which operating system are you using?

Thanks for the reply!

Yes, I am getting the Arduino-yun-xxxxxxxxx when I click on my WiFi networks icon, along with my Verizon MiFi4510L WiFi connection for internet.

The signal is excellent if the bar graph is any judge, full bars. The Yun is sitting right next to my laptop and MiFi device.

I'm using Windows 8.0. Mozilla Firefox for this forum, Internet Explorer otherwise.

My MiFi of course works fine, but when I click on Arduino Yun it tells me it can't connect.

The getting started guide doesn't help, goes right over my head, so I'm at a loss.

Thanks,

Dean

Getting started won't suffice, we need to troubleshoot this
Can you upload YunSerialTerminal, open serial monitor, press YUN RST, let linux print things for a couple of minutes (I'd say 5 at least) then copy and paste the whole output here?

Thanks! I did get SerialMonitor uploaded and got a response after I held the reset button for almost a minute. Looks like gibberish to me. However, when I try to copy it to this Forum it won't copy. I get a small subset of what I've copied. The stuff below is the subset. Very bizarre.

Dean

‰ŽJˆï_C€He!Š¹oa
oȃmhøéŽJˆ·Œ mH5L}=ª>‡_,?ÈHÈ8ÈZŽ{ìá68Mˆ-á?”?8 ^kŒNM€ð!=JB6ˆKˆJ wn6ˆ(Bžvˆ*gˆàó6CŒÐœÙ=±žHéLnó6C\jN¸.D=ÈJJFk^aƒ
\jN‹(6
JF#D~aCŠÐœ<fn lˆiJLL_9@È
J”]}Hm6CšÐèÛ
Jˆ¬]q$}C0ˆKHÛa
Œj

The 5 minutes of output was about a page long.

Dean

Could be way off base here, but have you installed Bonjour if you're using Windows or Linux?

Technically Bonjour would just help you see it, but I though it'd be worth a check.

Okay, this is better. I shut down all my open webpages and pulled the MicorUSB cable to cycle the Yun power and started over with SerialMonitor and here's what I got, and without pushing the Yun WiFi Reset button. After the initial message I sent Enter and got a bit more, and then I sent Help and got a bit more.

I'm still not sure what's going on.

Dean

switching to jffs2

  • init -

Please press Enter to activate this console. [ 38.510000] Compat-drivers backport release: compat-drivers-2013-01-21-1
[ 38.510000] Backport based on wireless-testing.git master-2013-02-22
[ 38.510000] compat.git: wireless-testing.git
[ 38.550000] cfg80211: Calling CRDA to update world regulatory domain
[ 38.550000] cfg80211: World regulatory domain updated:
[ 38.550000] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[ 38.550000] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 38.560000] cfg80211: (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[ 38.560000] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[ 38.560000] cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 38.570000] cfg80211: (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 39.360000] ieee80211 phy0: Atheros AR9330 Rev:1 mem=0xb8100000, irq=2
[ 39.370000] cfg80211: Calling CRDA for country: US
[ 39.370000] cfg80211: Regulatory domain changed to country: US
[ 39.370000] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[ 39.380000] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2700 mBm)
[ 39.380000] cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 1700 mBm)
[ 39.380000] cfg80211: (5250000 KHz - 5330000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 39.390000] cfg80211: (5490000 KHz - 5600000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 39.390000] cfg80211: (5650000 KHz - 5710000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 39.390000] cfg80211: (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 3000 mBm)
[ 39.750000] NTFS driver 2.1.30 [Flags: R/O MODULE].
[ 39.790000] Error: Driver 'gpio-keys-polled' is already registered, aborting...
[ 39.820000] PPP generic driver version 2.4.2
[ 39.970000] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 40.400000] NET: Registered protocol family 24
[ 40.430000] nf_conntrack version 0.5.0 (955 buckets, 3820 max)
[ 41.180000] Linux video capture interface: v2.00
[ 41.440000] fuse init (API version 7.20)
Enter

BusyBox v1.19.4 (2013-08-07 16:16:02 CEST) built-in shell (ash)
Enter 'help' for a list of built-in commands.


/_\ ___ /_\ ___ /_\ /\ \
/:confused: / /\ \ /::expressionless: | /\ \ /::expressionless: | /::\ \
/:confused: / :\ \ /:|:| | :\ \ /:|:| | /:/:\ \
/:confused: / /::_
\ /:/|:| |__ /::_\ /:/|:| |__ /:confused: :\ \
/:/__/ /:/// /:confused: |:| /_
\ /:/// /:confused: |:| /_\ /:/__/ :_
:\ \ //:confused: / /|:|/:confused: / //:confused: / /|:|/:confused: / :\ \ /:confused: /
:\ \ ::confused:/ |:/:confused: / ::confused:/ |:/:confused: / :\ /:confused: /
:\ \ :_\ |::confused: / :_\ |::confused: / :/:confused: /
:__\ // /:confused: / // /:confused: / ::confused: /
// // // //


| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -| || | | || || |
|
_____|| |
||||___||| |____|
|
| W I R E L E S S F R E E D O M

root@Arduino:/#
root@Arduino:/# help
Built-in commands:

. : [ [[ alias bg break cd chdir command continue echo eval exec
exit export false fg getopts hash help jobs kill let local printf
pwd read readonly return set shift source test times trap true
type ulimit umask unalias unset wait

root@Arduino:/#
root@Arduino:/#

Here's another. It doesn't seem to be consistent.

265.42 BogoMIPS (lpj=1327104)
[ 0.080000] pid_max: default: 32768 minimum: 301
[ 0.080000] Mount-cache hash table entries: 512
[ 0.080000] NET: Registered protocol family 16
[ 0.090000] MIPS: machine is Arduino Yun
[ 0.530000] Setting DogStick2 GPIO
[ 0.550000] bio: create slab at 0
[ 0.550000] SCSI subsystem initialized
[ 0.550000] usbcore: registered new interface driver usbfs
[ 0.560000] usbcore: registered new interface driver hub
[ 0.560000] usbcore: registered new device driver usb
[ 0.560000] Switching to clocksource MIPS
[ 0.570000] NET: Registered protocol family 2
[ 0.570000] TCP established hash table entries: 512 (order: 0, 4096 bytes)
[ 0.570000] TCP bind hash table entries: 512 (order: -1, 2048 bytes)
[ 0.570000] TCP: Hash tables configured (established 512 bind 512)
[ 0.570000] TCP: reno registered
[ 0.570000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 0.570000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 0.580000] NET: Registered protocol family 1
[ 0.600000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.600000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[ 0.610000] msgmni has been set to 118
[ 0.610000] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
[ 0.610000] io scheduler noop registered
[ 0.610000] io scheduler deadline registered (default)
[ 0.610000] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[ 0.620000] ar933x-uart: ttyATH0 at MMIO 0x18020000 (irq = 11) is a AR933X UART
[ 0.630000] console [ttyATH0] enabled, bootconsole disabled
[ 0.630000] console [ttyATH0] enabled, bootconsole disabled
[ 0.630000] ath79-spi ath79-spi: master is unqueued, this is deprecated
[ 0.640000] m25p80 spi0.0: found w25q128, expected m25p80
[ 0.640000] m25p80 spi0.0: w25q128 (16384 Kbytes)
[ 0.640000] 7 cmdlinepart partitions found on MTD device spi0.0
[ 0.650000] Creating 7 MTD partitions on "spi0.0":
[ 0.650000] 0x000000000000-0x000000040000 : "u-boot"
[ 0.650000] 0x000000040000-0x000000050000 : "u-boot-env"
[ 0.660000] 0x000000050000-0x000000ea0000 : "rootfs"
[ 0.660000] mtd: partition "rootfs" set to be root filesystem
[ 0.660000] mtd: partition "rootfs_data" created automatically, ofs=720000, len=780000
[ 0.660000] 0x000000720000-0x000000ea0000 : "rootfs_data"
[ 0.670000] 0x000000ea0000-0x000000fe0000 : "kernel"
[ 0.670000] 0x000000fe0000-0x000000ff0000 : "nvram"
[ 0.680000] 0x000000ff0000-0x000001000000 : "art"
[ 0.680000] 0x000000050000-0x000000fe0000 : "firmware"
[ 0.700000] libphy: ag71xx_mdio: probed
[ 0.700000] eth0: Atheros AG71xx at 0xba000000, irq 5, mode:GMII
[ 1.250000] eth0: Found an AR7240/AR9330 built-in switch
[ 2.280000] eth1: Atheros AG71xx at 0xb9000000, irq 4, mode:MII
[ 2.830000] ag71xx ag71xx.0 eth1: connected to PHY at ag71xx-mdio.1:04 [uid=004dd041, driver=Generic PHY]
[ 2.830000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 2.840000] ehci-platform: EHCI generic platform driver
[ 2.840000] ehci-platform ehci-platform: EHCI Host Controller
[ 2.840000] ehci-platform ehci-platform: new USB bus registered, assigned bus number 1
[ 2.840000] ehci-platform ehci-platform: irq 3, io mem 0x1b000000
[ 2.870000] ehci-platform ehci-platform: USB 2.0 started, EHCI 1.00
[ 2.870000] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[ 2.870000] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 2.870000] usb usb1: Product: EHCI Host Controller
[ 2.880000] usb usb1: Manufacturer: Linux 3.8.3 ehci_hcd
[ 2.880000] usb usb1: SerialNumber: ehci-platform
[ 2.880000] hub 1-0:1.0: USB hub found
[ 2.880000] hub 1-0:1.0: 1 port detected
[ 2.890000] Initializing USB Mass Storage driver...
[ 2.890000] usbcore: registered new interface driver usb-storage
[ 2.890000] USB Mass Storage support registered.
[ 2.890000] input: gpio-keys-polled as /devices/platform/gpio-keys-polled/input/input0
[ 2.900000] sdhci: Secure Digital Host Controller Interface driver
[ 2.900000] sdhci: Copyright(c) Pierre Ossman
[ 2.900000] usbcore: registered new interface driver ushc
[ 2.900000] TCP: cubic registered
[ 2.900000] NET: Registered protocol family 17
[ 2.910000] Bridge firewalling registered
[ 2.910000] 8021q: 802.1Q VLAN Support v1.8
[ 2.920000] VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
[ 2.920000] Freeing unused kernel memory: 232k freed
[ 3.250000] usb 1-1: new high-speed USB device number 2 using ehci-platform
[ 3.420000] usb 1-1: New USB device found, idVendor=058f, idProduct=6254
[ 3.430000] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[ 3.430000] usb 1-1: Product: USB2.0Hub
[ 3.550000] hub 1-1:1.0: USB hub found
[ 3.550000] hub 1-1:1.0: 4 ports detected
[ 4.000000] usb 1-1.4: new high-speed USB device number 3 using ehci-platform
[ 4.130000] usb 1-1.4: New USB device found, idVendor=058f, idProduct=6366
[ 4.130000] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 4.130000] usb 1-1.4: Product: Mass Storage Device
[ 4.140000] usb 1-1.4: Manufacturer: Generic
[ 4.140000] usb 1-1.4: SerialNumber: 058F0O1111B1
[ 4.200000] scsi0 : usb-storage 1-1.4:1.0
[ 5.200000] scsi 0:0:0:0: Direct-Access Multi Flash Reader 1.00 PQ: 0 ANSI: 0
[ 5.300000] Error: Driver 'gpio-keys-polled' is already registered, aborting...

  • preinit -
    Press the [f] key and hit [enter] to enter failsafe mode
  • regular preinit -
    [ 9.830000] jffs2: notice: (528) jffs2_build_xattr_subsystem: complete building xattr subsystem, 1 of xdatum (1 unchecked, 0 orphan) and 14 of xref (0 dead, 2 orphan) found.
    [ 11.100000] sd 0:0:0:0: [sda] Attached SCSI removable disk
    switching to jffs2
  • init -

Please press Enter to activate this console. [ 38.500000] Compat-drivers backport release: compat-drivers-2013-01-21-1
[ 38.500000] Backport based on wireless-testing.git master-2013-02-22
[ 38.510000] compat.git: wireless-testing.git
[ 38.540000] cfg80211: Calling CRDA to update world regulatory domain
[ 38.540000] cfg80211: World regulatory domain updated:
[ 38.550000] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[ 38.550000] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 38.550000] cfg80211: (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[ 38.560000] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[ 38.560000] cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 38.560000] cfg80211: (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 39.360000] ieee80211 phy0: Atheros AR9330 Rev:1 mem=0xb8100000, irq=2
[ 39.360000] cfg80211: Calling CRDA for country: US
[ 39.370000] cfg80211: Regulatory domain changed to country: US
[ 39.370000] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[ 39.370000] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2700 mBm)
[ 39.380000] cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 1700 mBm)
[ 39.380000] cfg80211: (5250000 KHz - 5330000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 39.380000] cfg80211: (5490000 KHz - 5600000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 39.390000] cfg80211: (5650000 KHz - 5710000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 39.390000] cfg80211: (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 3000 mBm)
[ 39.750000] NTFS driver 2.1.30 [Flags: R/O MODULE].
[ 39.790000] Error: Driver 'gpio-keys-polled' is already registered, aborting...
[ 39.820000] PPP generic driver version 2.4.2
[ 39.960000] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 40.390000] NET: Registered protocol family 24
[ 40.420000] nf_conntrack version 0.5.0 (955 buckets, 3820 max)
[ 41.180000] Linux video capture interface: v2.00
[ 41.430000] fuse init (API version 7.20)

Any idea what's wrong?

Do I need to upgrade the Yun OpenWRT Image? But I can't do that because this doesn't seem to connect - see below.

"Make sure the Yún and your computer are on the same network, and open a browser. Connect to the Yún's web panel page by entering the IP address or the name you gave to the board in the browser. With the default name you reach the Yún at http://arduino.local. "

This is really frustrating. Am I the only one with this kind of problem?

Dean

This is a very simple view of it all (at least, this is the way I did it) - when your Yun has booted for the first time (and it has booted, because you saw that large 'Linino' logo), it has created its own network. From your MS Windows box you should see it in a list of available networks. Click it and make your box connect to it; next point your browser to the url http://192.168.240.1; can you make it that far?

kind regards,

Jos

Thanks for jumping in Jos! I appreciate the help.

I get the Arduino Yun-XXXXXXXX in my list of available networks along with my MiFi internet network. The MiFi connects when I tell it to. The Arduino Yun does not connect. I can't get any farther than that.

Could this have something to do with my Kaspersky virus protection? I saw something about making sure that port 5353 wasn't blocked. I looked in Kaspersky and all I could find was a list of Active ports, 5353 not listed, so added 5353 and made it active. Not sure if that is the same thing as making sure it's not blocked. It didn't seem to help. How do I make sure 5353 isn't blocked?

Thanks,

Dean

I don't know anything about Kaspersky but I do know that I only trust that stuff as far as I can throw a rock at it; can you (temporalily) switch that thing off and see what happens? (you won't be swamped with viruses and spam all of a sudden because you also have a firewall in your router :wink:

kind regards,

Jos

My MiFi does have a network security key, could that be the problem? It's WPA2-PSK. The Network type is 802.11g, what is a Yun? I thought it was g also.

Dean

Thanks Jos. I turned of Kaspersky but it didn't help. I'll also try restarting with it off.

Dean

Doing a laptop Restart didn't help either.

I'm sure it's something basic on my laptop, but I haven't a clue what. Some configuration issue?

Dean

Farmboy:
Doing a laptop Restart didn't help either.

I'm sure it's something basic on my laptop, but I haven't a clue what. Some configuration issue?

Strange ... so your laptop can 'see' the Arduino network but can't connect to it; the encryption used on other networks have nothing to do with it (WPA, WEP etc.) and the Arduino network is completely 'open'; the IPv4 address is 192.168.240.1 (after a reset); the silly thing is that it works for me without problems (using url http://192.168.240.1 in my browser after connecting to that network). My guess would also be that it's something in your laptop that forbids a connection (one way or another). Can you ping it from your laptop? (open a command line interface and issue a 'ping 192.168.240.1')

kind regards,

Jos

Thanks Jos. I'm not sure how to open a Command Line Interface on my laptop, I take it that it's like DOS. I did use the Arduino Serial Monitor and sent "ping 192.168.240.1" and got this back, but I presume that is via the USB interface, not the WiFi side of the Yun.

How do I open a CLI on my laptop? Sorry, I'm a babe in the woods at this higher level software stuff.

Dean

BusyBox v1.19.4 (2013-08-07 16:16:02 CEST) built-in shell (ash)
Enter 'help' for a list of built-in commands.


/_\ ___ /_\ ___ /_\ /\ \
/:confused: / /\ \ /::expressionless: | /\ \ /::expressionless: | /::\ \
/:confused: / :\ \ /:|:| | :\ \ /:|:| | /:/:\ \
/:confused: / /::_
\ /:/|:| |__ /::_\ /:/|:| |__ /:confused: :\ \
/:/__/ /:/// /:confused: |:| /_
\ /:/// /:confused: |:| /_\ /:/__/ :_
:\ \ //:confused: / /|:|/:confused: / //:confused: / /|:|/:confused: / :\ \ /:confused: /
:\ \ ::confused:/ |:/:confused: / ::confused:/ |:/:confused: / :\ /:confused: /
:\ \ :_\ |::confused: / :_\ |::confused: / :/:confused: /
:__\ // /:confused: / // /:confused: / ::confused: /
// // // //


| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -| || | | || || |
|
_____|| |
||||___||| |____|
|
| W I R E L E S S F R E E D O M

root@Arduino:/#
root@Arduino:/#

Got it, I found the Windows Powershell and pinged it using that.

It did not respond, 4 tries with 32 bytes of data, 4 Request Timed Out responses. Sigh.

Dean

Okay, the plot thickens. I have another laptop from my work that I tried. It responded at first by recognizing the Yun with "Limited Access" but after I disconnected and reconnected I got "connected" but also says it's an unidentified network.

Under both the "Limited Access" and "Connected" I tried the Ping 192.168.240.1 and got "PING: Transmit Failed. General Failure" four times. Seems like some progress, I need to make this work with my own laptop.

Dean