Close

RPi WiFi

Back to project overview

Fast RPi WiFi without USB

Discussions

f.hillhouse.jr wrote 03/19/2017 at 20:56 point

Greetings, I had everything running nicely. Unfortunately I did an apt-get update and apt-get dist-upgrade. This forces the Wi-Fi to be reinstalled. Since I didn't expect this, I am providing a heads-up to others.

  Are you sure? yes | no

f.hillhouse.jr wrote 03/24/2017 at 00:48 point

I am not getting good results with the 2017-03-02 Jessie-lite. Has anyone else given this a try?

  Are you sure? yes | no

Anthony Lieuallen wrote 01/25/2017 at 01:43 point

It seems like this no longer works (situationally).  I just set up a new OctoPi image, and its latest release as of today comes with kernel 4.4.19.  But the raspberrypi-kernel-headers version that gets installed today is 4.4.38. So I had to also

    sudo apt-get install --reinstall raspberrypi-bootloader

and then after a reboot I was on kernel 4.4.38, matching the installed headers, so the dkms compile would succeed.

  Are you sure? yes | no

ajlitt wrote 01/25/2017 at 04:21 point

Thanks for the heads-up.  I haven't updated any of my boards to this kernel, but I'll try tonight.

  Are you sure? yes | no

ajlitt wrote 01/25/2017 at 05:29 point

I ran into similar trouble with 4.4.38 on a plain raspbian install.

What worked for me was to reboot after apt-get upgrade finished, then force DKMS to build manually:

  sudo dkms autoinstall; sudo depmod -a

Then reboot.

  Are you sure? yes | no

f.hillhouse.jr wrote 03/24/2017 at 03:20 point

Where in the steps was this done? Thanks!

  Are you sure? yes | no

ukritkh wrote 12/08/2016 at 11:15 point

Hi I'm comepletely new to this but I have worked around with esp8266. 

My question is about the firmware of esp8266? Do you simply flash it with esp8089 firmware on that GitHub or something? 

  Are you sure? yes | no

louis.croisez wrote 08/24/2016 at 08:12 point

Hello ajlitt, thank you for this awesome hack.

I had no success with an ESP-12-E QIO L2. I didn't had an F-L4 revision at home, but I still had a spare ESP-03 available.

You can have a look at my proto-board here: http://imgur.com/a/kmXUr

I have tested my bandwidth with this method: http://lifehacker.com/how-to-test-your-internet-speed-with-a-terminal-command-1364123567

# wget -O /dev/null http://speedtest.wdc01.softlayer.com/downloads/test10.zip

In my case, the wifi speed is not very great. I got a mean speed of 1824 kbps for downloading this 11MB test file. I wonder if there could be a problem with my wiring, because the red wires are close to the ceramic antenna of the ESP-03.

  Are you sure? yes | no

ajlitt wrote 08/25/2016 at 17:27 point

From my experience the ESP-03 antenna is very sensitive to nearby metal.  The best speed I saw from an ESP-03 was when I had the groundplane cutout for the antenna on the module hanging entirely off of the PCB.  Look through my early project logs to see the two implementations I have with the ESP-03.  The first had the antenna near a groundplane and I saw throughput much like you describe.  my second attempt is what I described above and worked much better (though not as well as my chip-on-board WiFi HAT and ESP12F Pants designs).

Also I recommend using a local endpoint for testing throughput to eliminate throttling from an internet endpoint.  I find iperf to be a reliable and repeatable test.

  Are you sure? yes | no

louis.croisez wrote 08/25/2016 at 21:32 point

(...was when I had the groundplane cutout for the antenna on the module hanging entirely off of the PCB...)

Seems very interresting but I need to see photos to understand clearly.

I looked on hackaday, and did not find the early project you mention. Could you help me finding it please?

  Are you sure? yes | no

ajlitt wrote 08/26/2016 at 05:20 point

Specifically these two logs: https://hackaday.io/project/8678-rpi-wifi/log/29965-good-news-bad-news https://hackaday.io/project/8678-rpi-wifi/log/30112-the-hairball-is-alive

Note how I have the antenna portion of the module off the edge of the board?

  Are you sure? yes | no

louis.croisez wrote 08/26/2016 at 15:55 point

In my realization, the antenna portion is already outside of the proto-board. Look here, in the second picture: http://imgur.com/a/kmXUr

  Are you sure? yes | no

ajlitt wrote 08/26/2016 at 17:04 point

How does it work when it's very close to your wifi AP?  My top speeds were with the router sitting on the same desk as the ESP.

  Are you sure? yes | no

louis.croisez wrote 08/27/2016 at 15:54 point

I put rpi0-0 50cm away from the AP. 

Same wget command as before. The bandwidth is 1912 kbps.

  Are you sure? yes | no

louis.croisez wrote 09/08/2016 at 10:05 point

I just received my ordered ESP-12F QIO L4.
I first got it to work with aerial wiring, and it works very well, definitely more reliable than with my ESP-03 with unsoldered Flash chip.
I got very good transfer speed now:

# wget -O /dev/null http://speedtest.wdc01.softlayer.com/downloads/test10.zip

# (3,33 MB/s) — « /dev/null » sauvegardé [11536384/11536384] 

which is about 26 Mbps. I think that this is the Rpi-0 which is the limitation now.

BTW, I would like to understand why there is such difference of speed between both ESP. This is the same ESP8266EX core, no?

The only difference I see is that resistors on my ESP-03 breadboard are 50 Ohm, and on ESP-12F it is 22 Ohm. I tried on both setup without resistors, but the WiFi connection was failing or not stable in both cases.

Do you see another reason that could explain such data rate difference?

  Are you sure? yes | no

ajlitt wrote 09/08/2016 at 17:40 point

I don't know.  I haven't dug into the design differences between the two besides the greater attention to detail in the ESP-12F.  My guess is that it has something to do with the routing and bypassing of the power to the ESP8266 on the ESP-03, which IIRC didn't obey the recommendations in the Espressif docs for caps and routing.

  Are you sure? yes | no

Duality wrote 06/08/2016 at 21:12 point

I have a raspberrypi B rev 2 and it has no gpio 26 what can I do now ?

  Are you sure? yes | no

ajlitt wrote 06/08/2016 at 21:57 point

@guyf2010 attempted this below.  Not sure if he got it working.  All the pins except SD_D2 and SD_D3 are within the rev 1 Pi 26 pin header, which means it may work in 1-bit SDIO mode.  Follow the above instructions to run the interface in 1-bit mode and let us know if it works for you.

  Are you sure? yes | no

guyf2010 wrote 06/13/2016 at 08:07 point

I did get it working in the end. You are restricted to 1-bit SDIO. Only issue I ran into was solved by taking everything apart and doing it again, I suspect a bad connection to have been the problem.

  Are you sure? yes | no

Anthony Lieuallen wrote 05/17/2016 at 01:24 point

Thanks for this!  I did my own version ( https://making.arantius.com/wifi-add-on-for-rapberry-pi-zero-zero-pants ) and it turned out great, with one caveat, mentioned there:  I have to unload the module before I reset the ESP as in step 10 of the instructions.

  Are you sure? yes | no

ajlitt wrote 05/23/2016 at 02:59 point

and thank you for the patch for the recent kernels.

I made the decision to use GPIO0 (ID_SD) as the reset signal on my board a while back in order to minimize pin utilization.  I have noticed that relying on ID_SD to reset the ESP by way of the Pi's initialization code is unreliable.  So I made this design choice with the intention that I'd add the reset twiddle in the driver.  This would not only give a chance to reset GPIO0 before downloading firmware, but it would allow for the driver to clear the ESP's state on a warm reboot.

I still haven't implemented this, and honestly I forgot about it as I got bogged down in the hardware.

  Are you sure? yes | no

ajlitt wrote 06/08/2016 at 21:59 point

@Anthony Lieuallen : correction, it's now implemented.  The driver twiddles GPIO0 (ID_SD) on load and on unload, with a module parameter to change the gpio#.  Works great!

  Are you sure? yes | no

Anthony Lieuallen wrote 06/10/2016 at 01:16 point

Confirmed, it works great.  Awesome work!

  Are you sure? yes | no

baoshi wrote 05/07/2016 at 08:53 point

I've been following this thread and now built up my own board. I'm trying kernel 4.4 branch and did the required #include change. Module compiles and installs ok.

But ESP8266 is not detected, there are no mmc1 in the boot message, toggle CH_PD gives nothing. ESP does issue "boot mode: (7, 6) waiting for host" from its own serial output though.

I measured SD_CLK and SD_CMD line, SD_CLK gives 125kHz clock and SD_CMD toggles occasionally. SD_D0 stays high.

Here is /sys/kernel/debug/mmc1/ios:

root@raspberrypi:~# dmesg | grep mmc1
root@raspberrypi:~# cd /sys/kernel/debug
root@raspberrypi:/sys/kernel/debug/mmc1# cat ios
clock:          0 Hz
vdd:            0 (invalid)
bus mode:       2 (push-pull)
chip select:    0 (don't care)
power mode:     0 (off)
bus width:      0 (1 bits)
timing spec:    0 (legacy)
signal voltage: 0 (3.30 V)
driver type:    0 (driver type B)
root@raspberrypi:/sys/kernel/debug/mmc1# cat clock
0

Any clue please?

  Are you sure? yes | no

ajlitt wrote 05/07/2016 at 13:21 point

What esp8266 module are you using?

That symptom means that the two aren't doing their handshake.  Any chance that SD_CLK or SD_CMD are going to the wrong pins on the module?

  Are you sure? yes | no

baoshi wrote 05/07/2016 at 14:01 point

It has ESP-12-F QIO L4 written on the module. I go replace the module and try again.

  Are you sure? yes | no

Ravikumar.G wrote 04/30/2016 at 09:24 point
is it support both AP and STA modes at a time?

  Are you sure? yes | no

ajlitt wrote 05/01/2016 at 14:59 point

I haven't tried. I have used it successfully with hostapd so there's that.

  Are you sure? yes | no

Ravikumar.G wrote 04/28/2016 at 16:30 point

hi,

i installed kernel on new sdcard (followed above steps)

am facing new problem now.

please check dmesg.

[  115.117299] ERROR::dwc_otg_hcd_urb_enqueue:505: Not connected
[  115.117299]
[  115.195098] mmc1: queuing unknown CIS tuple 0x01 (3 bytes)
[  115.203501] mmc1: queuing unknown CIS tuple 0x1a (5 bytes)
[  115.206877] mmc1: queuing unknown CIS tuple 0x1b (8 bytes)
[  115.211181] mmc1: queuing unknown CIS tuple 0x80 (1 bytes)
[  115.211327] mmc1: queuing unknown CIS tuple 0x81 (1 bytes)
[  115.211453] mmc1: queuing unknown CIS tuple 0x82 (1 bytes)
[  115.211528] mmc1: new high speed SDIO card at address 0001
[  115.280354] usb 1-1: USB disconnect, device number 2
[  115.280400] usb 1-1.1: USB disconnect, device number 3
[  115.280807] smsc95xx 1-1.1:1.0 eth0: unregister 'smsc95xx' usb-20980000.usb-1.1, smsc95xx USB 2.0 Ethernet
[  115.280904] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
[  115.292461] fib_del_ifaddr: bug: prim == NULL
[  115.297041] usb 1-1.4: USB disconnect, device number 4
[  115.306156] usb 1-1.5: USB disconnect, device number 5
[  115.333821] Unable to handle kernel paging request at virtual address 99945138
[  115.341337] pgd = da554000
[  115.344126] [99945138] *pgd=00000000
[  115.347812] Internal error: Oops: 5 [#1] ARM
[  115.352174] Modules linked in: esp8089(O+) mac80211 cfg80211 rfkill snd_bcm2835 snd_pcm snd_seq snd_seq_device snd_timer snd joydev evdev bcm2835_gpiomem bcm2835_wdt uio_pdrv_genirq uio
[  115.369347] CPU: 0 PID: 2380 Comm: modprobe Tainted: G           O    4.4.8+ #880
[  115.376967] Hardware name: BCM2708
[  115.380440] task: da58df60 ti: d9470000 task.ti: d9470000
[  115.385960] PC is at load_module+0x19e8/0x1ef4
[  115.390502] LR is at mutex_lock+0x1c/0x48
[  115.394598] pc : []    lr : []    psr: 20000113
[  115.394598] sp : d9471e88  ip : d9471e70  fp : d9471f34
[  115.406265] r10: c0577174  r9 : 00000000  r8 : bf24e7c8
[  115.411588] r7 : bf24e780  r6 : bf24e78c  r5 : 99945124  r4 : d9471f3c
[  115.418231] r3 : bf24e93c  r2 : 00000000  r1 : 00000000  r0 : 00000000
[  115.424876] Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
[  115.432140] Control: 00c5387d  Table: 1a554008  DAC: 00000055
[  115.437997] Process modprobe (pid: 2380, stack limit = 0xd9470188)
[  115.444294] Stack: (0xd9471e88 to 0xd9472000)
[  115.448745] 1e80:                   bf24e78c 00007fff bf24e780 c007bc08 00000000 bf24e78c
[  115.457074] 1ea0: bf24e93c bf24e78c bf24ea14 bf24e878 bf2214fc 00000000 00000000 00000000
[  115.465400] 1ec0: de8de000 c05702cc d9471eec bf21f090 00000002 00000000 00000000 00000000
[  115.473723] 1ee0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  115.482050] 1f00: 00000000 00000000 b6ec6948 0000566d 00000000 b6c7e66d b6ec6948 d9470000
[  115.490376] 1f20: de8e366d 00000000 d9471fa4 d9471f38 c007ea34 c007ca70 00000000 de89e000
[  115.498703] 1f40: 0004566d de8d9ab8 de8d9993 de8e1728 00039a14 0003c1f4 00000000 00000000
[  115.507028] 1f60: 00000000 00005178 0000001e 0000001f 00000014 00000018 0000000d 00000000
[  115.515352] 1f80: 00000000 00060000 7fc9f560 00000080 c000f9e8 d9470000 00000000 d9471fa8
[  115.523679] 1fa0: c000f820 c007e964 00000000 00060000 b6c39000 0004566d b6ec6948 b6c39000
[  115.532007] 1fc0: 00000000 00060000 7fc9f560 00000080 7fc9f508 0004566d b6ec6948 00000000
[  115.540335] 1fe0: 00000000 be8c596c b6ebdfb4 b6e28534 60000010 b6c39000 e3510000 0a00007b
[  115.548687] [] (load_module) from [] (SyS_init_module+0xdc/0x134)
[  115.556688] [] (SyS_init_module) from [] (ret_fast_syscall+0x0/0x1c)
[  115.564936] Code: e51b3094 e1530005 e2455008 0a000009 (e5953014)
[  115.571301] ---[ end trace 3d97829848ad5363 ]---
[  115.690115] Indeed it is in host mode hprt0 = 00021501
[  115.990018] usb 1-1: new high-speed USB device number 6 using dwc_otg
[  115.990242] Indeed it is in host mode hprt0 = 00001101
[  116.370511] usb 1-1: New USB device found, idVendor=0424, idProduct=9514
[  116.370545] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[  116.372002] hub 1-1:1.0: USB hub found
[  116.372172] hub 1-1:1.0: 5 ports detected
[  116.660038] usb 1-1.1: new high-speed USB device number 7 using dwc_otg
[  116.760699] usb 1-1.1: New USB device found, idVendor=0424, idProduct=ec00
[  116.772930] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[  116.853312] smsc95xx v1.0.4
[  116.969132] smsc95xx 1-1.1:1.0 eth0: register 'smsc95xx' at usb-20980000.usb-1.1, smsc95xx USB 2.0 Ethernet, b8:27:eb:e6:83:61
[  117.049833] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
[  117.120068] usb 1-1.4: new low-speed USB device number 8 using dwc_otg
[  117.267170] usb 1-1.4: New USB device found, idVendor=0458, idProduct=003a
[  117.279465] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  117.291971] usb 1-1.4: Product: USB Optical Mouse
[  117.301792] usb 1-1.4: Manufacturer: Genius
[  117.372506] input: Genius USB Optical Mouse as /devices/platform/soc/20980000.usb/usb1/1-1/1-1.4/1-1.4:1.0/0003:0458:003A.0004/input/input3
[  117.414064] hid-generic 0003:0458:003A.0004: input,hidraw0: USB HID v1.11 Mouse [Genius USB Optical Mouse] on usb-20980000.usb-1.4/input0
[  117.550066] usb 1-1.5: new low-speed USB device number 9 using dwc_otg
[  117.703408] usb 1-1.5: New USB device found, idVendor=1c4f, idProduct=0026
[  117.715635] usb 1-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  117.728130] usb 1-1.5: Product: USB Keyboard
[  117.737616] usb 1-1.5: Manufacturer: SIGMACHIP
[  117.811489] input: SIGMACHIP USB Keyboard as /devices/platform/soc/20980000.usb/usb1/1-1/1-1.5/1-1.5:1.0/0003:1C4F:0026.0005/input/input4
[  117.913647] hid-generic 0003:1C4F:0026.0005: input,hidraw1: USB HID v1.10 Keyboard [SIGMACHIP USB Keyboard] on usb-20980000.usb-1.5/input0
[  117.971602] input: SIGMACHIP USB Keyboard as /devices/platform/soc/20980000.usb/usb1/1-1/1-1.5/1-1.5:1.1/0003:1C4F:0026.0006/input/input5
[  118.071605] hid-generic 0003:1C4F:0026.0006: input,hidraw2: USB HID v1.10 Device [SIGMACHIP USB Keyboard] on usb-20980000.usb-1.5/input1
[  118.476422] smsc95xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0x4DE1

  Are you sure? yes | no

ajlitt wrote 04/28/2016 at 17:04 point

Did you toggle CH_PD before loading the driver?  I see this if the Pi is warmbooted and the ESP is not reset before loading the driver.

If you're doing that, does it oops if you load the esp8089 module when the ESP8266 is not plugged into the Pi?  I'm wondering if your kernel and module are out of sync.

  Are you sure? yes | no

Ravikumar.G wrote 04/29/2016 at 04:08 point

i installed driver in kernel and it is loading automatically.

Changed CH_PD to other gpios, but no use.

  Are you sure? yes | no

Ravikumar.G wrote 04/29/2016 at 11:41 point

this error because of OS version(wheezy).

with jessy it is working fine.

  Are you sure? yes | no

ajlitt wrote 04/29/2016 at 12:04 point

It only works with Jessie because the wheezy kernel doesn't have proper sdio support

  Are you sure? yes | no

Ravikumar.G wrote 04/27/2016 at 15:14 point

Enabled 4bit mode SDIO.
i have done four
add-on boards for all my raspberrypi's. all boards are working in 1 bit
mode. But in 4bit SDIO mode only one board is working.  In remaining
boards am getting following error :
"esp_sdio_dummy_probe
esp_sdio_init power ok
resetting event timeout
esp_init_all failed : -110
first error exit.
(after this if i toggle the CH_PD,  system is hanging)
what
is the exact seqence?(wrt CH_PD). i connected CH_PD to PI_GPIO6. mmc1
is detecting on boot itself(i am not  toggling gpio6).
there is no capacitor across power(3.3V) on add-on board. really required? what is preferred value?
and what about series termination resistors? (values? and how to choose value?)

  Are you sure? yes | no

ajlitt wrote 04/27/2016 at 15:29 point

Espressif recommends a 10uF capacitor across the power rails, close to the chip.  ESP-03 doesn't have this for some reason (cheapness?), but adding 10uF or more near the module across 3.3V seems to work fine.

I use 33 ohm resistors in my production design.  I chose this by trial and error using a scope to determine which value resulted in the cleanest signals at each end of the bus.  I've used values between 33 and 200 ohms.

I would try the capacitor first.

  Are you sure? yes | no

Ravikumar.G wrote 04/28/2016 at 06:15 point

tried cap across the power rails, still facing same issue. i have to try resistors.

  Are you sure? yes | no

Ravikumar.G wrote 04/27/2016 at 15:13 point

Enabled 4bit mode SDIO.

i have done four add-on boards for all my raspberrypi's. all boards are working in 1 bit mode. But in 4bit SDIO mode only one board is working.  In remaining boards am getting following error :

"esp_sdio_dummy_probe

esp_sdio_init power ok

resetting event timeout

esp_init_all failed : -110

first error exit.

(after this if i toggle the CH_PD,  system is hanging)

what is the exact seqence?(wrt CH_PD). i connected CH_PD to PI_GPIO6. mmc1 is detecting on boot itself(i am toggling gpio anymore).

there is no capacitor across power(3.3V) on add-on board. really required? what is preferred value?

and what about series termination resistors? (values? and how to choose value?)

  Are you sure? yes | no

Ravikumar.G wrote 04/26/2016 at 12:33 point

ESP-03 & RPI B+ board connections

--------------------------------------

SD             SPI      RPI_gpio

--------------------------------------

sd_clk        sck     22

sd_cmd     cs        23

sd_d0       so        24

sd_d1         si         25

sd_d2       hold     26

sd_d3       wp        27

--------------------------------------

CH_PD connected to GPIO_6.

esp gpio 0, 2 and 15 are not connected.

  Are you sure? yes | no

Ravikumar.G wrote 04/26/2016 at 11:50 point

pi@raspberrypi:~/esp8089 $ sudo dmesg -c
[  708.380468]
***** EAGLE DRIVER VER:bdf5087c3deb*****

[  719.380012] esp_sdio_init ------ RETRY ------
[  730.380143] esp_sdio_init ------ RETRY ------
[  741.380252] esp_sdio_init ------ RETRY ------
[  752.380418] esp_sdio_init ------ RETRY ------
[  752.380600] eagle sdio can not power up!

I am toggling CH_PD also.

help me?

  Are you sure? yes | no

ajlitt wrote 04/26/2016 at 14:20 point

Do you see the "mmc1: new high speed SDIO card..." message in dmesg at all in step 9?  If so, then sd_clk and sd_cmd are working, but the sd_dN lines may not be.

Make sure that you're not overclocking the SD card in your config.txt.  Ideally you should be using a stock config.txt from Raspbian with only the changes in the instructions.

Do you have a cap across the supply going to the ESP-03?  The ESP-12F has a 10uF cap onboard, but the ESP-03 only has 0.1uF bypass.

Finally, I recommend scoping each of the signals.  You should see a constant clock on sd_clk, periodic data on sd_cmd, and traffic on each of the sd_dN lines when the driver loads.

  Are you sure? yes | no

Ravikumar.G wrote 04/26/2016 at 14:56 point

now changed sdio to 1bit mode it is working fine (in config.txt)

I have to check my board.

  Are you sure? yes | no

guyf2010 wrote 04/26/2016 at 10:37 point

I'm having issues getting the SDIO interface working on one of the earlier Pi models. I'm trying to use one of the 26 pin Pi 1Bs, but I am unable to get the mmc1 device to init. I've been trying to use 1-bit SDIO, as this Pi doesn't have D2 broken out. Attempting to run 'sudo modprobe esp8089' results in an error followed by the system hanging. (The error says "Unable to handle paging request at virtual address 904edc38"). Are there any modifications required to get the RPi 1 connected to an ESP8266?

On an important but unrelated note, the pin table suggests HAT pins 2 and 4 as ground pins, but aren't they 5V?

Thanks

  Are you sure? yes | no

guyf2010 wrote 04/27/2016 at 08:42 point

Looks like the mmc1 device is being created. But running cat /sys/kernel/debug/mmc1/ios says the clock speed is 0Hz.

Any ideas on a fix?

  Are you sure? yes | no

ajlitt wrote 04/27/2016 at 14:52 point

It's very likely the blobs for the 1st gen Pis didn't get the same treatment as the rest for enabling SDIO.

  Are you sure? yes | no

guyf2010 wrote 03/06/2016 at 05:03 point

Looking at some of the info online, it may be possible to wire up an ESP-03 module without removing/soldering onto the flash chip. The table under the ESP-03 at http://www.esp8266.com/wiki/doku.php?id=esp8266-module-family has CLK, MOSI, MISO and CS0 listed as alternate functions for GPIO pins that are exposed. I don't currently have any ESP-03 modules, nor the know-how on accessing the alternate functions. But it may well be the easiest way to get a module with ceramic antenna hooked up to a Pi.

Another thing I noticed is the mention of using GPIO0, GPIO2 and MTDO as a 3-bit SDIO connection in the GitHub documentation at https://github.com/espressif/ESP8266_AT/wiki/Pin-definition. It's unclear to me whether it would be usable as an interface, or simply used for configuring the SDIO interface used here already.

  Are you sure? yes | no

David Lowe wrote 03/06/2016 at 06:55 point

Yes, I expect after all that just like the ESP-12E/F modules, the flash on the ESP-03 & ESP-04 can be left soldered in place. ESP-03 is where @ajlitt started all of this...

3-bit SDIO - that must be a typo! No idea what interface they might be hinting at.

  Are you sure? yes | no

guyf2010 wrote 03/07/2016 at 10:24 point

Is it possible it's a 3-cable SDIO interface? Maybe SD_CLK, SD_CMD and SD_D0. Which makes me wonder, is SD_D1 required in these instructions for 1-bit mode?

  Are you sure? yes | no

ajlitt wrote 03/07/2016 at 16:59 point

Unfortunately only the pins I'm using are able to boot as SDIO.

Those GPIOs aren't part of the SDIO bus.  They are sampled by the ESP on reset to determine how to boot.  There's a table on the 4th tab ("strapping") of Espressif's pinlist spreadsheet (http://bbs.espressif.com/download/file.php?id=442) that shows the enumeration.  This is why we use GPIO0 to select between booting from flash (001) and from UART (011) for most ESP8266 projects.

For this usage, we want the ESP to boot from an SDIO host.  When MTDO(GPIO15) is high, the ESP boots from SDIO, while GPIO0 and GPIO2 choose the bus speed and protocol rev.  I leave all three of these unconnected because the ESP8266 has internal pull-ups which configures it to boot in SDIO high speed v2 mode.

  Are you sure? yes | no

guyf2010 wrote 03/08/2016 at 05:38 point

I see. I had wondered if the reference was more to controlling the SDIO bus rather than being an SDIO bus. Looking further into the CLK/MOSI/MISO/CS0 pins available on the ESP-03 as alt functions, it turns out that the controller for that SPI bus is entirely separate from the one used to access the flash, so the SDIO signals would not be readable on that bus. (TL;DR: ajlitt, you were right)

On a side note, I don't know the SDIO bus very well, but if four Dn pins are required for 4-bit mode, wouldn't it be possible to use one Dn pin for 1-bit mode? Or are two pins required for bi-directional connections?

  Are you sure? yes | no

Josh Rathke wrote 03/01/2016 at 18:09 point

Thanks for your great instructions. I am having trouble with number 10. When I toggle the gpio, the led light on the ESP12F flashes and the system seems to become unresponsive. I am on the pi2. Thanks for your help.

  Are you sure? yes | no

ajlitt wrote 03/01/2016 at 22:51 point

Does it eventually come back?  This is what I usually see when the driver is having trouble loading firmware to the module.  Are you attempting to overclock the SDIO bus?  Have you checked the wiring on the SDIO_Dn signals?

  Are you sure? yes | no

David Lowe wrote 03/02/2016 at 09:32 point

You should only do step 10 if the module does not show up ie driver not loaded. If the driver has loaded already & you do this, the system will hang. Precede it with "sudo modprobe -r esp8089" to avoid that happening.

  Are you sure? yes | no

Josh Rathke wrote 03/03/2016 at 23:35 point

Great! I have stopped the system hang but now I am getting this error:

***** EAGLE DRIVER VER:bdf5087c3deb*****

[   65.861546] esp_sdio_dummy_probe enter

[   66.064687] esp_sdio_init power up OK

[   76.324728] resetting event timeout

[   76.324753] esp_init_all failed: -110

[   76.324760] first error exit

Any ideas?

*******EDIT******

I was able to fix it by re-wiring with 33 ohm resistors. Thanks for the advice and the great project! I am getting about 25mb/s.

  Are you sure? yes | no

David Lowe wrote 03/04/2016 at 10:41 point

I'd re-check the connections between Pi & module, both wiring-wise & for good contact.

  Are you sure? yes | no

gir wrote 03/01/2016 at 15:20 point

It is ALIVE! I had it wired wrong the first and second time! (my screenshot of the old instructions still had D3 and VCC swapped - oops) - thanks for helping me through! (it would be cool if you could re-add the esp03-table to the instructions)

ifconfig detects a wlan0 and iwlist has found my access point!

To recap for everyone having problems compiling the driver on 4.4.x:

- in 'sdio_stub.c' change the line "#include <mach/gpio.h>" to "#include <linux/gpio.h>"

- make sure the esp is wired correctly

  Are you sure? yes | no

ajlitt wrote 03/01/2016 at 15:38 point

Congrats!  Good point, I forgot that some people might still want to work with the ESP-03.

  Are you sure? yes | no

David Lowe wrote 03/01/2016 at 16:54 point

Well done for battling through! Table 8, page 14 of the ESP8266EX Datasheet Version 4.4 is a solid reference for the pin mapping.

  Are you sure? yes | no

gir wrote 02/27/2016 at 09:03 point

It seems to fit here better: i can't compile esp8089 - it can't find <mach/gpio.h>
what am i doing wrong? i followed your instructions and am hanging on number (8)

In file included from /home/pi/esp8089/sdio_sif_esp.c:58:0:
/home/pi/esp8089/sdio_stub.c:7:23: fatal error: mach/gpio.h: No such file or directory
 #include <mach/gpio.h>

thanks

  Are you sure? yes | no

ajlitt wrote 02/29/2016 at 19:10 point

It's been a while since I went through the instructions on a fresh install.  I'll do that tonight.  I don't want to hold your password manager up, it looks slick!

  Are you sure? yes | no

gir wrote 02/29/2016 at 19:28 point

Thanks! i forgot to mention that i run Kernel 4.4.2 (installed via rpi-update), because the USB gadget driver isn't available on 4.1

on another note: what resistor value do you recommend for the esp-03 with the flash desoldered? (currently i have forgotten to install them)

  Are you sure? yes | no

ajlitt wrote 02/29/2016 at 19:51 point

Ah,  your problem is due to kernel differences.  4.4.1 has no include/mach/gpio.h for bcm2708.  Try changing the path to <linux/gpio.h>.

  Are you sure? yes | no

gir wrote 02/29/2016 at 20:18 point

It compiled now. But I can't get it to work. when I do `insmod esp8089.ko` it says:

insmod: ERROR: could not insert module esp8089.ko: Unknown symbol in module

dmesg output: https://gist.github.com/girst/9655e9ba3767ac1f2f82

  Are you sure? yes | no

ajlitt wrote 02/29/2016 at 19:56 point

Oh, and using no resistors is OK as long as it's working.  If you see instability start with 33 ohms and go up from there.  You may need that if you want to try for 62.5MHz SDIO.

  Are you sure? yes | no

ajlitt wrote 02/29/2016 at 20:20 point

ah, do "sudo modprobe mac80211" first

  Are you sure? yes | no

gir wrote 02/29/2016 at 20:32 point

sorry for taking up your time, but it still doesn't work. 

now, `modprobe esp8089` takes a lot longer, but still fails with this message: 

modprobe: ERROR: could not insert 'esp8089': No such device

dmesg:

***** EAGLE DRIVER VER:bdf5087c3deb*****

[  105.312618] esp_sdio_init ------ RETRY ------
[  116.313184] esp_sdio_init ------ RETRY ------
[  127.312652] esp_sdio_init ------ RETRY ------
[  138.312617] esp_sdio_init ------ RETRY ------
[  138.312742] eagle sdio can not power up!

  Are you sure? yes | no

gir wrote 02/29/2016 at 20:34 point

do you have by chance the pinout for the esp-03 still at hand? i figure, i might have swapped a signal or two

  Are you sure? yes | no

ajlitt wrote 02/29/2016 at 20:35 point

That's progress.  Did you wire CH_PD on the ESP-03 to a GPIO?  Try toggling it low and then high, then try loading the module

  Are you sure? yes | no

gir wrote 02/29/2016 at 20:42 point

i have. it is on the pi's pin 7 (GPIO4?) and i did:

root@hardpass:/home/pi# echo 4 > /sys/class/gpio/export
root@hardpass:/home/pi# echo low > /sys/class/gpio/gpio4/direction
root@hardpass:/home/pi# echo in > /sys/class/gpio/gpio4/direction

and then modprobe again. but same result

EDIT:
SO....i found a screenshot of the old instructions for the esp03 - and i managed to flip the pinout (pin1 to pin5, etc). I'll rewire it and then it will hopefully work. thanks for helping me get it compiled!

  Are you sure? yes | no

gir wrote 02/29/2016 at 21:19 point

so, i rewired it, but it still doesn't work. its getting rather late now here so i'll try again tomorrow. thanks anyways ;)

  Are you sure? yes | no

David Lowe wrote 02/24/2016 at 22:02 point

1-bit mode still makes some sense - two components off the BoM and two fewer precious GPIOs claimed by the SDIO interface (with more chance to avoid conflicts with other add-on boards). To that end I've made a pull-request re adding another overlay specifically for 1-bit mode, configuring only pins 22-25.

  Are you sure? yes | no

ajlitt wrote 02/24/2016 at 22:22 point

I agree, but for most of the people following the directions verbatim it doesn't make sense to not wire those last two.

It's a shame the Pi bootloader overlay system doesn't allow for more complexity with parameters.  It would be much easier if we could have a single boolean that could enable the correct number of GPIOs and set the bus width at the same time.

  Are you sure? yes | no

vallabh rao wrote 01/22/2016 at 11:39 point

I am a newbie.. i very much need this in my project... but i am not able to understand the procedure.. is there any way that you can simplify the instructions or make a sort of video on how to do this step by step? thanks in advance

  Are you sure? yes | no

ajlitt wrote 01/22/2016 at 16:11 point

The instructions concern my early hack / proof-of-concept. At the moment I'd rather put my efforts into something that's easy to assemble or manufacture. The version in the instructions works, but requires some moderate soldering skill and a little improvisation.

  Are you sure? yes | no

vallabh rao wrote 01/24/2016 at 05:35 point

thanks any ways... waiting eagerly for a diy version.. so that i can get internet to my pi under $3 :)

  Are you sure? yes | no