Page 1 of 1

slip library

Posted: Wed Dec 18, 2019 12:21 pm
by somesh
Hello everyone.

I am using esp idf v3.3. I want to use slip librairy for serial communication with two MCU's. is slip lib available in esp-idf ?
I have checked but not found. If not in esp idf then how to implement the same.
Kindly share any documention or reference.

Re: SLIP LIBRAIRY

Posted: Wed Dec 18, 2019 12:57 pm
by PeterR

Re: SLIP LIBRAIRY

Posted: Wed Dec 18, 2019 1:15 pm
by somesh
I have tried including in project, getting error. How include this in project? Any example for the same?

Re: SLIP LIBRAIRY

Posted: Wed Dec 18, 2019 3:32 pm
by PeterR
Shall I look into my crystal ball to see; 1) how you tried or 2) which error you received? ;)

Why not just copy the file and associated headers. You will need to understand the ESP make system of course.

Re: SLIP LIBRAIRY

Posted: Thu Dec 19, 2019 2:33 am
by ESP_Sprite
Note that that file only handles SLIP framing, not integration into any TCP/IP environment. If you want to shuttle IP packets back and forth on a network level, you may be better off using PPP, as LWIP supports that.

Mod note: seems your caps lock was accidentally on while typing the title of this post; I took the liberty to fix that.

Re: SLIP LIBRAIRY

Posted: Thu Dec 19, 2019 5:19 am
by somesh
PeterR wrote:
Wed Dec 18, 2019 3:32 pm
Shall I look into my crystal ball to see; 1) how you tried or 2) which error you received? ;)

Why not just copy the file and associated headers. You will need to understand the ESP make system of course.
1) #include "slip.h" or #include "flasher_stub/slip.h"
2) No such file or directory

I think this file is use to flash esp. I tried copying directly file into project.
is there any example for it?

Re: SLIP LIBRAIRY

Posted: Thu Dec 19, 2019 5:25 am
by somesh
ESP_Sprite wrote:
Thu Dec 19, 2019 2:33 am
Note that that file only handles SLIP framing, not integration into any TCP/IP environment. If you want to shuttle IP packets back and forth on a network level, you may be better off using PPP, as LWIP supports that.

Mod note: seems your caps lock was accidentally on while typing the title of this post; I took the liberty to fix that.
Hello ESP_Sprite,

Thanks for your quick response.
I want to use this file for OTA over serial. please share any reference for same.
and sorry for the mistake I'll change title. :)

Re: slip library

Posted: Thu Dec 19, 2019 11:17 am
by PeterR
Sounds like you are struggling with the build system.
I have used this file for reprogramming over serial (using the ESP32 ROM on the receiving side).
SLIP is a small part of your task. You will need to look at esptool.py to understand exactly what you need to do. The main task will be understanding the commands and so constructing the command buffers which are then sent using SLIP. You will also need to add your own backend UART level to write/read these commands to stream.

I would copy the files directly into your project. You will need to modify them anyway and this is the simplest solution whilst you get up to speed with the build system.