38 lines
1.7 KiB
Markdown
38 lines
1.7 KiB
Markdown
---
|
|
title: Fighting with the BeagleBone
|
|
allDay: false
|
|
startTime: 14:15
|
|
endTime: 16:30
|
|
date: 2024-08-26
|
|
completed: null
|
|
---
|
|
#beaglebone #hardware-in-the-loop-HIL
|
|
#Work
|
|
[[2 pymodbus On the BeagleBone]]
|
|
|
|
I spent some time trying to figure out virtual environments on the beaglebone and get the pymodbus scripts running. I was half successful. The virtual environments are now working as expected. I needed to use the requirements.txt method instead of pushing the whole virtual environment. Somehow that leaked the global packages into it. 🤷
|
|
|
|
For some reason the beaglebone is having trouble actually connecting. I'm running the server on the bone, while running the client on the PC. The client is just saying
|
|
```bash
|
|
danesabo@danesabo-laptop:~/Projects/beaglebone$ python3 simple_client.py
|
|
Setting up...
|
|
Connecting to server...
|
|
Connection to (192.168.6.2, 5020) failed: [Errno 111] Connection refused
|
|
Traceback (most recent call last):
|
|
File "/home/danesabo/Projects/beaglebone/simple_client.py", line 25, in <module>
|
|
assert client.connected
|
|
^^^^^^^^^^^^^^^^
|
|
AssertionError
|
|
|
|
```
|
|
While the server is outputting:
|
|
```bash
|
|
(venv) danesabo@BeagleBone:~/beaglebone$ python3 simple_server.py
|
|
DEBUG:asyncio:Using selector: EpollSelector
|
|
DEBUG:pymodbus.logging:Awaiting connections server_listener
|
|
WARNING:pymodbus.logging:Failed to start server [Errno 99] error while attempting to bind on address ('192.168.6.1', 5020): cannot assign requested address
|
|
INFO:pymodbus.logging:Server listening.
|
|
|
|
```
|
|
|
|
I need to dig into why this is happening. I'm not really sure why. Either way, I suspect the default IP route might have something to do with it. Maybe there is some way I can explicitly define a network interface. |