Skip to content

Script error when receiving messages #3

@SENSEI-Matt

Description

@SENSEI-Matt

I am getting a script error relating to received messages. It looks like the 'mailboxCheck' needs to include a callback and pass it to 'sendMessage'. I have modified the index.js file and added a callback and this has resolved it. The error I received was:

/node_modules/iridium-sbd/index.js:558
Oct 04 11:05:09 gateway node[1915]: callback(err, momsn);
Oct 04 11:05:09 gateway node[1915]: ^
Oct 04 11:05:09 gateway node[1915]: TypeError: callback is not a function
Oct 04 11:05:09 gateway node[1915]: at /node_modules/iridium-sbd/index.js:558:23
Oct 04 11:05:09 gateway node[1915]: at df (/node_modules/iridium-sbd/index.js:604:10)
Oct 04 11:05:09 gateway node[1915]: at SerialPort. (/node_modules/iridium-sbd/index.js:363:14)
Oct 04 11:05:09 gateway node[1915]: at emitOne (events.js:116:13)
Oct 04 11:05:09 gateway node[1915]: at SerialPort.emit (events.js:211:7)
Oct 04 11:05:09 gateway node[1915]: at /node_modules/iridium-sbd/index.js:303:22
Oct 04 11:05:09 gateway node[1915]: at Array.forEach ()
Oct 04 11:05:09 gateway node[1915]: at SerialPort.readSBD (/node_modules/iridium-sbd/index.js:302:16)
Oct 04 11:05:09 gateway node[1915]: at SerialPort._emitData (/node_modules/serialport/lib/serialport.js:313:18)
Oct 04 11:05:09 gateway node[1915]: at SerialPort. (/node_modules/serialport/lib/serialport.js:293:14)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions