8000 Lwip support for SLIP | Pycom devices | FiPy/ LoPy · Issue #458 · pycom/pycom-micropython-sigfox · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Sep 16, 2024. It is now read-only.

Lwip support for SLIP | Pycom devices | FiPy/ LoPy #458

Open
bitvijays opened this issue Jun 19, 2020 · 0 comments
Open

Lwip support for SLIP | Pycom devices | FiPy/ LoPy #458

bitvijays opened this issue Jun 19, 2020 · 0 comments

Comments

@bitvijays
Copy link

Dear Pycom Team,

Hope you are doing well. Thank you for the awesome work you have been doing. Currently, I am using FiPy and LoPy.

Pycom MicroPython 1.20.2.rc7 [v1.11-6d01270] on 2020-05-04; LoPy with ESP32

I wanted to ask if it is possible to send tcp/ip packets to Pycom device via UART using SLIP? Something like

Host Machine (Raspberry Pi)

slattach -L -p slip -s 115200 /dev/ttyUSB0 &
ifconfig sl0 192.168.5.1 pointopoint 192.168.5.2 mtu 1500

Pycom device (LoPy/ FiPy) (Currently, the below code is for pyboard taken from lwIP module for micropython)

import lwip
import pyb
lwip.reset()
tim = pyb.Timer(7)
tim.init(freq=20)
tim.callback(lambda t:lwip.callback())

u = pyb.UART(2, 115200, read_buf_len=3100)
sl = lwip.slip(2, "192.168.5.2", "192.168.5.1"
sock = lwip.socket(lwip.AF_INET, lwip.SOCK_STREAM)
sock.connect(("192.168.5.1", 22))
print(sock.recv(1024))
sock.close()

The requirement is to enable data transfer from Single Board Computers (Raspberry Pi/ Jetson nano) to PyCom devices (FiPy/ LoPy) and send the data via different networks (SigFox/ Lora/ Wi-Fi/ NB-IoT).

We would be grateful if you could guide us in this direction.

Yours Sincerely,
Vijay

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant
0