-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issues running RAK commands #31
Comments
If it is a new module, it has most probably a newer firmware (v3), and the instructions you follow are a bit outdated... You can get your module firmware version with If it is a V3, the README at the top of this repo should help you to proceed. |
The script can open the device but doesn't get any response. I don't have an RPi4 available for testing right now, but it looks like you have have Bluetooth assigned to Can you completely disable Bluetooth and try again? You should then have a single |
Same problem Thank you anyway Philippe |
One other question , does the phat have a led ? |
No, there is no led on the module... I tested again on an RPi4, and this is what I have:
The More reading about this: Configuring UARTs I have attached my config.txt, but the only relevant line is:
With all that, I have a successful connection to the module:
Hope this helps to solve your issue. |
Hello There, I assume the issue comes from the fact that I'm using a HAT designed for a Raspberry Pi zero on a Raspberry Pi Compute Module 4, which from my knowledge has more UARTs and a different configuration (see attachement). I've disabled the serial login shell, tried switching the UART interfaces, adding the One question remains, that could give me a lead: Basically I've also tried running I'd really appreciate any help even if its not with a compute module but a Raspberry Pi 4 as I've spent hours trying to fix this. |
I also encountered this but found a solution... sharing it here in the event it helps someone else. After disabling the serial console (or so I'd thought) using raspi-config, I ran into the same timeouts with
Sure enough, the serial-getty@ttyAMA0 service was active:
Stopping the service permits use of the serial port on ttyAMA0. Disabling it does not prevent it from restarting on boot, though. This is due to systemd's use of generators. The solution in this case is to mask the service to prevent it from ever being enabled:
After doing this I had no issues using rak811 or rak811v3. Environment: Pi Zero 2 W with Debian 12/Raspberry Pi OS (64-bit) Lite bookworm.
|
You are much appreciated billz! I wrote a script anyone can run and it does everything recommended across all the issues on this problem hope someone finds it helpful. also thanks AmedeeBulle for diligent replies!! Here's the script that finally solved my problem. It performs all the checks and fixes recommended throughout this thread: #!/bin/bash
# Comprehensive LoRa pHAT Fix Script
# This script performs checks and fixes for common LoRa pHAT issues
# Function to log messages
log_message() {
echo "$1"
}
# Check and fix UART configuration
fix_uart_config() {
if ! grep -q "enable_uart=1" /boot/config.txt; then
log_message "Adding enable_uart=1 to /boot/config.txt"
echo "enable_uart=1" | sudo tee -a /boot/config.txt
fi
if ! grep -q "dtoverlay=disable-bt" /boot/config.txt; then
log_message "Adding dtoverlay=disable-bt to /boot/config.txt"
echo "dtoverlay=disable-bt" | sudo tee -a /boot/config.txt
fi
}
# Stop and disable serial-getty service
fix_serial_getty() {
log_message "Stopping and disabling [email protected]"
sudo systemctl stop [email protected]
sudo systemctl disable [email protected]
sudo systemctl mask [email protected]
}
# Check RAK811 version
check_rak_version() {
log_message "Checking RAK811 version:"
rak811 -v -d version || log_message "Failed to get RAK811 version"
rak811v3 -v -d version || log_message "Failed to get RAK811v3 version"
}
# Perform hard reset
perform_hard_reset() {
log_message "Performing hard reset:"
rak811 -v -d hard-reset || log_message "Failed to perform hard reset"
}
# Reset LoRa
reset_lora() {
log_message "Resetting LoRa:"
rak811 -v -d reset lora || log_message "Failed to reset LoRa"
}
# Check for processes using ttyAMA0
check_ttyAMA0_usage() {
log_message "Checking for processes using ttyAMA0:"
sudo fuser -v /dev/ttyAMA0 || log_message "No processes found using ttyAMA0"
}
# Main execution
log_message "Starting Comprehensive LoRa pHAT Fix Script"
fix_uart_config
fix_serial_getty
check_rak_version
perform_hard_reset
reset_lora
check_ttyAMA0_usage
log_message "Checks and fixes applied. Please reboot your Raspberry Pi."
log_message "After reboot, run this script again to verify all issues are resolved."
log_message "If problems persist, please check physical connections and antenna configuration."
log_message "Remember: If using an external antenna, ensure the INT inductor is desoldered for best range."
# Prompt for reboot
read -p "Would you like to reboot now? (y/n) " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
sudo reboot
fi To use this script:
This script will:
After running this script and rebooting, most common LoRa pHAT issues should be resolved. If anyone is still having trouble, they should check their physical connections and antenna configuration. |
Hi Guys,
![image](https://user-images.githubusercontent.com/74416763/214536647-71ae3103-e39f-49e9-aac0-dc282797762e.png)
I recently bought the IoT LoRa Node pHAT, using with Raspberry Pi 4 Model B 8GB RAM.
My OS Version : Raspbian GNU/Linux 10 (buster)
For reference, I did follow this link,
I have run in to an issue with the initial setup, it seems when running rak811 commands I'm getting errors, for example,
Maybe my Phat and Paspberry not connected correctly ?
![image](https://user-images.githubusercontent.com/74416763/214540670-e83a336c-91c4-458d-afc0-9b507e265379.png)
![image](https://user-images.githubusercontent.com/74416763/214540745-f3efb53e-7cb2-40eb-8898-3a6bd9d952cf.png)
The text was updated successfully, but these errors were encountered: