Chat freely about anything...

User avatar
By bruceuk
#5050 Hello

I wanted to ask if anybody has managed to use esp8266 with Linux ? ..and if so how? I can't find any examples of using "ppp" or any kernel module that enable esp8266 along the lines of wlan0 or ppp0.

Thanks
Bruce
User avatar
By uhrheber
#5053 I'm not sure if I understand what you want.
The ESP8266 is a computer of it's own, not a WiFi adapter.
So you connect to it like you would to another computer.
Either using a serial connection to your computer's serial port (if it has one, otherwise you need a USB to serial converter) or using the inbuilt WiFi adapter of your computer.

If you have a new module, it isn't configured to connect to your home network and doesn't allow incoming connections (except ICMP, aka ping).

So what you have to do is connecting a USB to serial converter (3.3V outputs) to the ESP and your computer's USB, and then connect to the ESP.
Maybe using
Code: Select allscreen /dev/ttyUSB0


or any serial terminal program you like.
Then you can use AT commands to configure the ESP.
There are several tutorials in this forum about how to do this.
User avatar
By bruceuk
#5055 I have connected the module to my Linux board (UART1) .... then from my Linux board I use minicom and I can talk to the device.

But now I want to enable my Linux board to use esp8266 as a network interface, any idea if that is possible?
User avatar
By uhrheber
#5058 Well, not that easy.
The ESP8266 can be configured for a transparent serial connection, but it can't do yport yet.(to create a virtual serial port for e.g. pppd)
In theory it should be possible to to tunnel a ppp connection through udp, but I've never tried it.

Here's how I think this could work:

Host running pppd, tunneled through a udp port
|
Wifi (AP/router)
|
ESP8266, configured to connect to the WiFi, then connect to the udp port on the host and provide a transparent connection through the UART
|
serial connection
|
Linux board running ppp over UART

Interesting setup. Could work, but will be incredibly slow, compared to a direct WiFi connection.
But could be interesting for very small boards running Linux or BSD (I'm thinking of RetroBSD for PIC32 microcontrollers)

I think it may be possible to implement a pppd directly on the ESP8266. That would be nice!