Conversation
…ymlink for serial redirection
…unning on raspberry pi to use gpio with www-data user
aabadie
reviewed
Sep 21, 2026
|
|
||
| function check_rpi_mcu() { | ||
| HARD=`grep Hardware /proc/cpuinfo | cut -d ":" -f 2` | ||
| if [[ $HARD == *"BCM"* ]]; then |
Contributor
There was a problem hiding this comment.
You could also check the content of /var/local/config/control_node_type. It should contain RPI.
The proposed solution doesn't really guarantee that it's a raspberry pi.
| import serial | ||
| from serial import SerialException | ||
|
|
||
| import RPi.GPIO as GPIO |
Contributor
There was a problem hiding this comment.
Suggested change
| import RPi.GPIO as GPIO | |
| try: | |
| import RPi.GPIO as GPIO | |
| except ImportError: | |
| GPIO = None |
and later in the reset method:
if GPIO is None:
LOGGER.warning("No RPi.GPIO module available, cannot reset")
return 1| @staticmethod | ||
| def _board_require_power_cycle(board): | ||
| """nrf52dk and nrf52840dk requires a power cycle after exp_start. | ||
| """nrf52dk, nrf52840dk and lopy4requires a power cycle after exp_start. |
Contributor
There was a problem hiding this comment.
Suggested change
| """nrf52dk, nrf52840dk and lopy4requires a power cycle after exp_start. | |
| """nrf52dk, nrf52840dk and lopy4 require a power cycle after exp_start. |
| # nrf52dk and nrf52840dk needs a power cycle before their serial | ||
| # becomes fully usable. | ||
| if firmware_path is not None and self._board_require_power_cycle(self.open_node.TYPE): | ||
| # even after idle_firmware flash |
Contributor
There was a problem hiding this comment.
you also have to edit the first list of this comment to mention the lopy4 board.
| docker run -it --rm \ | ||
| -v $(PWD):/shared \ | ||
| -v /dev/iotlab:/dev/iotlab \ | ||
| -v /dev:/dev \ |
Contributor
There was a problem hiding this comment.
that seems unrelated. Cannot you explain why it is needed?
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Share support for: