I'm coding C/C++ on an Arduino to communicate with a Node.js server over the serial port using the serialport Node.js package. I have written this code on a Mac. In my Node.js code I need to reference the USB port, for reference mine is:
/dev/tty.wchusbserialfa14
On a Mac, to get a list of ports in a format that will work in my Node.js code I use the terminal and this command:
ls /dev/{tty,cu}.*
I can not find the equivalent for a Windows computer. Could someone please tell me what the command is to list the ports on a Windows machine, in a format that I can use in my Node.js.
Thanks!
Edit: Added more context about use of ports
You are searching not USB ports, but serial ports. Because you are using USB to serial converter that build in Arduino, and looking about serial ports. How to get list of serial ports in windows you can find here or in google.
Excuse me, can't comment yet.
Thanks for your help! The following command gave me a list of ports in a format that will work in my Node.js code:
chgport
Related
I am pretty new to gammu, my nokia which was working fine with it has died and I am getting a Huawei K4505 3g modem to replace it.
I would like to try using gammu-detect, but am running under windows and it isnt included in the distribution files.
Is there a way of getting it/ using it under windows, or alternatively can anyone direct me to the correct config settings for my 'new' modem.
I have searched everywhere, and have found some references to installing detect under windows, but no details as to how to actually do it!
Many thanks .... David.
update ... couldnt find windows version of --detect, but config file worked fine
with device = com19 and connection = at19200
NOt possible to use a usb connection type directly, so need to map modem to a virtual com port first.
I'm trying to read temperatures into NodeJS (or command-line program) app on Windows with DS18B20 thermometers connected to serial port.
There are some apps, but I can't use them (Digitemp - no support for Windows, Logtemp - it doesn't communicate with NodeJS.
Is there any possible way to read temperatures directly in NodeJS from serial port or from command-line program?
There are lots of tutorials and libraries for Arduino, but nothing for this issue.
Thanks
I am trying to open USB port in Python (using pySerial). I ran port listing tool, but it only shows COM ports. I'd like to open USB port instead (trying to communicate with tablet, but that's not relevant, I suppose). I know it is possible (and quite easy) on Linux, but I am on Windows 8, so there's nothing like "/dev/tty...".
I'd like to show you some of my code, but I can't, because I have none yet (I need to know how to open USB port to be able to start coding, I am just testing yet).
Maybe I will have to install some other module, but I'd rather just stay with pySerial, if it's possible.
Can anyone help me with opening USB port?
I'm using Ruby 1.8 and linux (Ubuntu and SLAX), and i need to write a script in ruby which finds out if some specific usb device is connected to the system and on which USB port (0,1,2, etc). It was done before with the help of HAL (hal-find-by-capability --capability serial), but now i can't use this approach. I was trying to read /var/log/messages file trying to find the number of the usb port, but it appears that this number may not be written in some systems. Other thing i tried is to check /dev folder and search for ttyUSB# file, but it doesn't appear on some system when new device connects to USB.
I would appreciate any ideas how to do this.
lsusb is a linux command for displaying your usb hubs and listing the devices that are connected to them. In ruby I believe you'd be able to do something like this:
ls_results = `lsusb`
You should be able to parse that for whatever device you're looking for.
I'm sorry that I couldn't provide you an ruby sample. I had the same problem in C / C++ (QT). You can find my snippet here:
http://www.known-issues.net/cpp/how-to-detect-if-dev-is-a-usb-device.html
You have libusb ruby bindings which allow to control usb devices.
I want to control my robot using wireless module(zigbee). I have a device FT232R for converting USB to Serial i/f. It is working on windows 7 but I am not getting how to use this device on Linux(ubuntu). Please help me.
Note: Actually my robot is working in slave mode( running on micro-controller). I will control it by sending command over serial wireless link(running on Linux).
If you can't find any existing drivers then libusb might help