Closed sschimmel closed 5 years ago
In my case, the problem was with ModemManager, which was probing the serial port during startup and block it. I create the udev rule to specify the ModemManger should skip modem's (GPS, etc) serial port. For example, my udev rule:
SUBSYSTEM=="tty", KERNEL=="ttyUSB3", ACTION=="add", ATTRS{idVendor}=="1e0e", ATTRS{idProduct}=="9001", ENV{ID_MM_PORT_IGNORE}="1"
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week no further activity occurs. Feel free continue the discussion or ask for a never-stale
label to keep it open. If this is a support issue, consider sharing it on stack overflow to get more eyes on your problem.
I have a SIM7000 NB-IoT modem attached to a Raspberry Pi. It's connected via serial and I'm trying to control it using node.js and node-serialport.
Using screen I am able to communicate with the modem. Sending AT commands works and the response is received back and printed to the terminal.
When I issue the same command using node-serialport I do not receive an error on the .write() command however the response is not received and shown on screen.
Using
screen /dev/ttyS0
:AT+CSQ
is the command send to the modem by typing it in the terminal.The output of the script, source below, when running
DEBUG=serialport/* node index.js
:The source code of
index.js
:SerialPort@^7.1.4 Node: v10.15.1 Running on Raspbian (Linux) on a RaspberryPi.
The serial port is enabled and the ssh terminal on the serial port is disabled.
I've tried connecting the modem to my Windows laptop and using Putty and that also does work. Putty settings:![image](https://user-images.githubusercontent.com/459456/52861392-a0f44680-3132-11e9-9765-de4faa59d594.png)
I've followed the examples from the documentation and tried several solutions from Github and StackOverflow. The command seems to be echo'ed back just fine it's just the response that should follow after it that's not received.
The device works as is shown using screen and putty so I clearly must be missing something in the JS code. I just can't figure out what I'm missing so any help on this is appreciated.