Troubleshooting
This section lists a few topics that may help you troubleshoot issues with Hermes-Five.
If you can't find a solution to your problem on this page, consider opening an issue for help.
Protocol error
This error type appears in cases of issues related to board communication.
Error: Task failed: "Protocol error: The filename, directory name, or volume label syntax is incorrect."
When running the basic sample code from Getting Started section, the program ends right away with the error:
Task failed: "Protocol error: The filename, directory name, or volume label syntax is incorrect."
- Check that your board is actually connected to your computer.
- The port used may not be properly auto-detected. In that case, use the custom protocol syntax to specify the appropriate port name when creating your board.
let board = Board::from(SerialProtocol::new("COM4")).open();
Error: Task failed: "Protocol error: Operation timed out."
When running the basic sample code from Getting Started section, the program ends right away with the error:
Task failed: "Protocol error: Operation timed out."
- Check that your board has the proper and latest StandardFirmataPlus.ino Arduino sketch uploaded.
Hardware error
This error type appears in cases of issues related to device <-> hardware communication.
Error: HardwareError { source: UnknownPin { pin: Id(13) } }
- Check your pin number: it may not exist for you board.
- If it does: did you properly opened the board first ? Devices must be registered in the ready event (see Concepts & Overview page)
Error: Hardware error: Pin (8) not compatible with mode (ANALOG) - try to set pin mode.
The error message is pretty self explicit: your pin (8 here) is not compatible with what you are trying to do (read an ANALOG value here). Change the pin for a compatible one.
The folowing code will display you all pins and there compatibility:
use hermes_five::hardware::{Board, BoardEvent};
use hermes_five::io::IO;
#[hermes_five::runtime]
async fn main() {
let board = Board::run();
board.on(BoardEvent::OnReady, |mut board: Board| async move {
println!("Pins {:#?}", board.get_io().read().pins);
Ok(())
});
}