Close

Driver update

A project log for RPi WiFi

Fast RPi WiFi without USB

ajlittajlitt 05/23/2016 at 15:523 Comments

Last night I checked in a change to the esp8089 driver that automates toggling the reset (CH_PD) on the ESP by GPIO. With this change ESP hacks based on the instructions here will automatically come up during boot without any scripting or external reset circuits. This also issues a reset on module unload which is needed so that the ESP is detected after a soft reboot (reboot on the command line, etc) and keeps the module from OOPSing when reloaded without a previous reset.

The project instructions have been updated to reflect this change. If you previously added sysfs GPIO or module unload commands in your init scripts for the ESP (rc.local and otherwise) you'll need to take them out. The driver defaults to GPIO0 (ID_SD like the WiFI Pants uses), but you can pass the esp_reset_gpio module parameter with the GPIO number your board uses. This should be platform agnostic as long as the target has a kernel GPIO driver.

The driver still isn't ideal since it must always be rebuilt every time the Pi kernel changes. On other Debian based systems this could be handled with dkms, but the Pi Foundation's non package based kernel scheme makes it difficult. Of course I have a build process to help with this, but that's dependent on a network connection and gets unpleasant on the Zero. One solution would be to build the driver against each Pi kernel release and index it by the kernel's commit hash (like rpi-source). If anyone has ideas for a cheap (or free) binary release hosting service I'd be open to setting up an automated build server.

As for the WiFi Pants... I still have the first batch sitting on my desk. I wanted to get this driver change in to simplify initial setup, and still have some documentation to do. Keep an eye on the github wiki and on this project for details.

Discussions

David Lowe wrote 12/24/2016 at 12:49 point

Hi again Andrew! For the module to come up again on soft reboot, I'm having to drive GPIO low in a systemd shutdown script to clear that firmware from RAM. The above seems to imply that's not required ?

  Are you sure? yes | no

David Lowe wrote 05/23/2016 at 19:53 point

Hi Andrew - according to this post https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=147991#p973512 dkms should work since the 13th May release of Raspbian. Some kernel headers appeared to be missing when I tried to build the module, will try some more & report back.

  Are you sure? yes | no

ajlitt wrote 05/23/2016 at 23:41 point

Thanks!  I know what I'll be working on tonight

  Are you sure? yes | no