ConfigurableFirmata USB becomes not ready

Hi,

Hoping to get some advice on setting-up ConfigurableFirmata on an Arduino Nano with an AT328PB.

Added a condition to lump the AT328PB in with nano group during board.h configuration:

...
// Arduino Duemilanove, Diecimila, Uno, Nano, etc.
#if defined(__AVR_ATmega168__) || defined(__AVR_ATmega328P__) || defined(__AVR_ATmega328__) || defined(__AVR_ATmega328PB__)
...

Have ConfigurableFirmata version 3.1.0 loaded in arduino-ide_2.2.1_Linux_64bit.

Set-up serial baud rate in ConfigurableFirmata.ino

...
//Firmata.begin(115200);
  Firmata.begin(57600)
...

Module enable defines in ConfigurableFirmata.ino:

...
#include <DigitalInputFirmata.h>
DigitalInputFirmata digitalInput;

#include <DigitalOutputFirmata.h>
DigitalOutputFirmata digitalOutput;

#include <SerialFirmata.h>
SerialFirmata serial;
...

Arduino serial monitor set to 57600 baud captures the following sequence, whenever the Nano board is reset:

"(Gibber)...ConfigurableFirmata qBooting device. Stand by... qUnknown pin mode q...(repeats last message ad infinitum)."

The repeated 'Unknown pin mode' message is a worry...perhaps best clue?

I copied the Firmata.js example blink.js file, and also set the baud rate for 57600 baud:

...
const options = {
  baud: 57600 // Set your desired baud rate 
};
const board = new Board(port.path, options);
...

Tail of output from running the blink.js file in 'output debug messages' mode of node, on a USB cable connected Linux box:

user@hostname:~$DEBUG=* node  blink.js
...
serialport/binding-abstract read +6ms
  serialport/bindings/unixRead Starting read +1ms
  serialport/bindings/unixRead read error [Error: EAGAIN: resource temporarily unavailable, read] {
  errno: -11,
  code: 'EAGAIN',
  syscall: 'read'
} +1ms
  serialport/bindings/unixRead waiting for readable because of code: EAGAIN +0ms
  serialport/bindings/poller Polling for "readable" +2ms

Many reads initially occur, before the USB serial device /dev/ttyUSB0 becomes unavailable, and communication suspends.

When I run the client blink.js code in node without debug messaging, the output is as follows:

user@hostname:~$node blink.js 
{
  manufacturer: '1a86',
  serialNumber: undefined,
  pnpId: 'usb-1a86_USB2.0-Ser_-if00-port0',
  locationId: undefined,
  vendorId: '1a86',
  productId: '7523',
  path: '/dev/ttyUSB0'
}
board constructed

The board object is created successfully in blink.js...

...
const board = new Board(port.path, options);
console.log("board constructed");
...

...yet the board.on("ready"...) function never executes.

...
  board.on("ready", () => {
    console.log("ready");
    // Never fires.
...

The whole ConfigurableFirmata and Firmata.js project folder can be inspected at the following: https://file.io/OuPTk63i3foI

If anyone can follow along, and please tell me why I get the repeated 'Unknown pin mode' message after resetting the Arduino, whilst connected by Arduino serial monitor?

GBEM👽

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.