-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modified tcp_gateway for packet length management
- Loading branch information
Showing
1 changed file
with
9 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,16 @@ | ||
# Running The Demos | ||
|
||
There are two demos available. Currently, data can only be sent in one | ||
direction at a time since I have not figured out how to perform concurrency in | ||
MicroPython. The threading | ||
library is said to be experimental. However, I did locate [this code](https://github.com/fadushin/esp8266/blob/790958fa332592c80a0f81f25cdaa9513d596f64/micropython/uhttpd/uhttpd/__init__.py#L354) which may solve | ||
the concurrency issue. I have yet to have a chance to see if the code works. | ||
A demo is available to run data end-to-end in both directions. | ||
|
||
## Sending Messages To The Local Simulated Server From The Pico | ||
Here are the steps used: | ||
|
||
1. Start the backplane. | ||
2. Start the [messages_from_pico.py](https://github.com/MrYsLab/python_banyan/blob/tcp_gateway/python_banyan/utils/tcp_gateway/pico_micropython_scripts/messages_from_pico.py) MicroPython script. | ||
3. Start [sim_messages_from_pico.py](https://github.com/MrYsLab/python_banyan/blob/tcp_gateway/python_banyan/utils/tcp_gateway/simulated_local_station/sim_messages_from_pico.py) | ||
4. Start the [tcp_gateway.py](https://github.com/MrYsLab/python_banyan/blob/tcp_gateway/python_banyan/utils/tcp_gateway/tcp_gateway.py) | ||
|
||
You should see the messages if you look at the console window for sim_messages_from_pico.py. | ||
The TCP Gateway will continually attempt to connect to the Pico. | ||
|
||
## Steps | ||
Here are the steps used: | ||
|
||
## Sending Messages From the Local Simulated Server To The Pico | ||
1. Start the backplane. | ||
2. Start the [messages_to_pico.py](https://github.com/MrYsLab/python_banyan/blob/tcp_gateway/python_banyan/utils/tcp_gateway/pico_micropython_scripts/messages_to_pico.py) MicroPython script. | ||
3. Start the [tcp_gateway.py](https://github.com/MrYsLab/python_banyan/blob/tcp_gateway/python_banyan/utils/tcp_gateway/tcp_gateway.py) | ||
4. Start the [sim_messages_to_pico.py](https://github.com/MrYsLab/python_banyan/blob/tcp_gateway/python_banyan/utils/tcp_gateway/simulated_local_station/sim_messages_to_pico.py) script. | ||
2. Start the [tcp_gateway.py](https://github.com/MrYsLab/python_banyan/blob/tcp_gateway/python_banyan/utils/tcp_gateway/tcp_gateway.py) | ||
3. Load and start the [select.py](https://github.com/MrYsLab/python_banyan/blob/master/python_banyan/utils/tcp_gateway/pico_micropython_scripts/select.py) MicroPython script on the Raspberry Pi Pico W | ||
4. Start [sim_echo_client.py](https://github.com/MrYsLab/python_banyan/blob/master/python_banyan/utils/tcp_gateway/simulated_local_station/sim_echo_client.py) | ||
|
||
Check the Thonny shell for incoming messages. | ||
The messages appear in the sim_echo_client console and on the MicroPython | ||
Thonny shell. |