Changing COM Port of USB2SER Driver

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Changing COM Port of USB2SER Driver

Jump to solution
1,689 Views
kamaljoshi
Contributor I

Hi,

 

I have the following hardware and the driver installed on my computer.

http://www.freescale.com/webapp/sps/site/prod_summary.jsp?

code=USB2SER&lang_cd=

 

However, I can not change the COM port of the USB.

 

Is it possible to change this COM port somehow to the number I like ?

Labels (1)
Tags (3)
1 Solution
804 Views
david_diaz
NXP Employee
NXP Employee

Hello,

I’m afraid that the option for changing the COM port number is not supported by the USB2SER driver that includes flow control support; however, there is a workaround that consists in temporally changing the used driver for the standard CDC driver (without flow control) using the INF file purposed on Appendix C of USB2SER Datasheet (attached). The procedure is the following:

  1. Go to “Device Manager” and expand “Ports (COM & LPT)” menu.
  2. Right click on “Freescale CDC Device” and select “Update Driver Software”.
  3. Select “Browse my computer for driver software”.
  4. Select “Let me pick from a list of drivers on my computer”.
  5. Click on the option “Have Disk”
  6. Click on “Browse” button and locate the INF file that I have attached to this response.
  7. Accept any Windows’ message.
  8. Now you can change the port number by clicking on “Freescale CDC Device” --> “Proprieties” --> “Port Settings” --> “Advanced” --> “COM Port Number”.
  9. Finally, accept changing the port number.

You can use the USB2SER with this driver, but it doesn’t support Hardware Flow Control. If you want to have the USB2SER device with all of its features, you need to repeat all the procedure, but now, selecting the INF file included on USB2SER installation folder, located at the following path:

C:\Program Files\Freescale\USB2SER\USB2SER_Drivers\FSL_USB_PID.inf

USB2SER developers are aware of this issue, and they are working on an updated driver for fixing it. Please let me know if you still having troubles or if you have further questions. Have a nice day.

*** NOTE: Please change the extension of usb2ser.info file for usb2ser.inf ***

Hope this information will be useful for you.

Have a good day.

David Diaz

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

View solution in original post

2 Replies
804 Views
dylan_hu
Contributor I

I have install the drive in ubuntu16.04 with USB2SER_Driver_Linux, but failed. Pls help .

the Log:

root@neusoft:/home/fuyongjie/Desktop/USB2SER# ./Install.sh ubuntu
Installing Freescale CDC driver on Ubuntu
Reading package lists... Done
Building dependency tree
Reading state information... Done
linux-headers-4.4.0-43-generic is already the newest version (4.4.0-43.63).
The following packages were automatically installed and are no longer required:
libstdc++-4.8-dev wx-common
Use 'apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 10 not upgraded.
fixing code con old kernel versions
make -C /lib/modules/4.4.0-43-generic/build M=/home/fuyongjie/Desktop/USB2SER modules
make[1]: Entering directory '/usr/src/linux-headers-4.4.0-43-generic'
CC [M] /home/fuyongjie/Desktop/USB2SER/cdc-freescale.o
/home/fuyongjie/Desktop/USB2SER/cdc-freescale.c: In function ‘acm_ctrl_msg’:
/home/fuyongjie/Desktop/USB2SER/cdc-freescale.c:140:2: error: implicit declaration of function ‘dbg’ [-Werror=implicit-function-declaration]
dbg("acm_control_msg: rq: 0x%02x val: %#x len: %#x result: %d",
^
In file included from include/linux/mmdebug.h:4:0,
from include/linux/gfp.h:4,
from include/linux/slab.h:14,
from /home/fuyongjie/Desktop/USB2SER/cdc-freescale.c:60:
/home/fuyongjie/Desktop/USB2SER/cdc-freescale.c: At top level:
include/linux/bug.h:33:45: error: negative width in bit-field ‘<anonymous>’
#define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); }))
^
include/linux/kernel.h:831:3: note: in expansion of macro ‘BUILD_BUG_ON_ZERO’
BUILD_BUG_ON_ZERO((perms) & 2) + \
^
include/linux/sysfs.h:102:12: note: in expansion of macro ‘VERIFY_OCTAL_PERMISSIONS’
.mode = VERIFY_OCTAL_PERMISSIONS(_mode) }, \
^
/home/fuyongjie/Desktop/USB2SER/cdc-freescale.c:329:47: note: in expansion of macro ‘__ATTR’
static struct kobj_attribute pid_attribute = __ATTR(val_pid,0666,show_pid,stor
^
In file included from include/linux/kobject.h:21:0,
from include/linux/cdev.h:4,
from include/linux/tty_driver.h:244,
from include/linux/tty.h:8,
from /home/fuyongjie/Desktop/USB2SER/cdc-freescale.c:61:
/home/fuyongjie/Desktop/USB2SER/cdc-freescale.c:329:67: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
static struct kobj_attribute pid_attribute = __ATTR(val_pid,0666,show_pid,stor
^
include/linux/sysfs.h:103:10: note: in definition of macro ‘__ATTR’
.show = _show, \
^
/home/fuyongjie/Desktop/USB2SER/cdc-freescale.c:329:67: note: (near initialization for ‘pid_attribute.show’)
static struct kobj_attribute pid_attribute = __ATTR(val_pid,0666,show_pid,stor
^
include/linux/sysfs.h:103:10: note: in definition of macro ‘__ATTR’
.show = _show, \
^
/home/fuyongjie/Desktop/USB2SER/cdc-freescale.c:329:76: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
struct kobj_attribute pid_attribute = __ATTR(val_pid,0666,show_pid,store_pid);
^
include/linux/sysfs.h:104:11: note: in definition of macro ‘__ATTR’
.store = _store, \
^
/home/fuyongjie/Desktop/USB2SER/cdc-freescale.c:329:76: note: (near initialization for ‘pid_attribute.store’)
struct kobj_attribute pid_attribute = __ATTR(val_pid,0666,show_pid,store_pid);
^
include/linux/sysfs.h:104:11: note: in definition of macro ‘__ATTR’
.store = _store, \
^
In file included from include/linux/mmdebug.h:4:0,
from include/linux/gfp.h:4,
from include/linux/slab.h:14,
from /home/fuyongjie/Desktop/USB2SER/cdc-freescale.c:60:
include/linux/bug.h:33:45: error: negative width in bit-field ‘<anonymous>’
#define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); }))
^
include/linux/kernel.h:831:3: note: in expansion of macro ‘BUILD_BUG_ON_ZERO’
BUILD_BUG_ON_ZERO((perms) & 2) + \
^
include/linux/sysfs.h:102:12: note: in expansion of macro ‘VERIFY_OCTAL_PERMISSIONS’
.mode = VERIFY_OCTAL_PERMISSIONS(_mode) }, \
^
/home/fuyongjie/Desktop/USB2SER/cdc-freescale.c:386:47: note: in expansion of macro ‘__ATTR’
static struct kobj_attribute vid_attribute = __ATTR(val_vid,0666,show_vid,stor
^
In file included from include/linux/kobject.h:21:0,
from include/linux/cdev.h:4,
from include/linux/tty_driver.h:244,
from include/linux/tty.h:8,
from /home/fuyongjie/Desktop/USB2SER/cdc-freescale.c:61:
/home/fuyongjie/Desktop/USB2SER/cdc-freescale.c:386:67: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
static struct kobj_attribute vid_attribute = __ATTR(val_vid,0666,show_vid,stor
^
include/linux/sysfs.h:103:10: note: in definition of macro ‘__ATTR’
.show = _show, \
^
/home/fuyongjie/Desktop/USB2SER/cdc-freescale.c:386:67: note: (near initialization for ‘vid_attribute.show’)
static struct kobj_attribute vid_attribute = __ATTR(val_vid,0666,show_vid,stor
^
include/linux/sysfs.h:103:10: note: in definition of macro ‘__ATTR’
.show = _show, \
^
/home/fuyongjie/Desktop/USB2SER/cdc-freescale.c:386:76: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
struct kobj_attribute vid_attribute = __ATTR(val_vid,0666,show_vid,store_vid);
^
include/linux/sysfs.h:104:11: note: in definition of macro ‘__ATTR’
.store = _store, \
^
/home/fuyongjie/Desktop/USB2SER/cdc-freescale.c:386:76: note: (near initialization for ‘vid_attribute.store’)
struct kobj_attribute vid_attribute = __ATTR(val_vid,0666,show_vid,store_vid);
^
include/linux/sysfs.h:104:11: note: in definition of macro ‘__ATTR’
.store = _store, \
^
/home/fuyongjie/Desktop/USB2SER/cdc-freescale.c: In function ‘acm_rx_tasklet’:
/home/fuyongjie/Desktop/USB2SER/cdc-freescale.c:588:27: warning: passing argument 1 of ‘tty_insert_flip_string’ from incompatible pointer type [-Wincompatible-pointer-types]
tty_insert_flip_string(tty, buf->base, buf->size);
^
In file included from /home/fuyongjie/Desktop/USB2SER/cdc-freescale.c:64:0:
include/linux/tty_flip.h:32:19: note: expected ‘struct tty_port *’ but argument is of type ‘struct tty_struct *’
static inline int tty_insert_flip_string(struct tty_port *port,
^
/home/fuyongjie/Desktop/USB2SER/cdc-freescale.c:589:25: warning: passing argument 1 of ‘tty_flip_buffer_push’ from incompatible pointer type [-Wincompatible-pointer-types]
tty_flip_buffer_push(tty);
^
In file included from /home/fuyongjie/Desktop/USB2SER/cdc-freescale.c:64:0:
include/linux/tty_flip.h:13:13: note: expected ‘struct tty_port *’ but argument is of type ‘struct tty_struct *’
extern void tty_flip_buffer_push(struct tty_port *port);
^
/home/fuyongjie/Desktop/USB2SER/cdc-freescale.c: In function ‘acm_tty_set_termios’:
/home/fuyongjie/Desktop/USB2SER/cdc-freescale.c:1013:29: error: incompatible types when initializing type ‘struct ktermios *’ using type ‘struct ktermios’
struct ktermios *termios = tty->termios;
^
/home/fuyongjie/Desktop/USB2SER/cdc-freescale.c: In function ‘acm_write_buffers_free’:
/home/fuyongjie/Desktop/USB2SER/cdc-freescale.c:1115:3: error: implicit declaration of function ‘usb_buffer_free’ [-Werror=implicit-function-declaration]
usb_buffer_free(usb_dev, acm->writesize, wb->buf, wb->dmah);
^
/home/fuyongjie/Desktop/USB2SER/cdc-freescale.c: In function ‘acm_write_buffers_alloc’:
/home/fuyongjie/Desktop/USB2SER/cdc-freescale.c:1135:13: error: implicit declaration of function ‘usb_buffer_alloc’ [-Werror=implicit-function-declaration]
wb->buf = usb_buffer_alloc(acm->dev, acm->writesize, GFP_KERNEL,
^
/home/fuyongjie/Desktop/USB2SER/cdc-freescale.c:1135:11: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
wb->buf = usb_buffer_alloc(acm->dev, acm->writesize, GFP_KERNEL,
^
/home/fuyongjie/Desktop/USB2SER/cdc-freescale.c: In function ‘acm_probe’:
/home/fuyongjie/Desktop/USB2SER/cdc-freescale.c:1401:6: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
buf = usb_buffer_alloc(usb_dev, ctrlsize, GFP_KERNEL, &acm->ctrl_dma);
^
/home/fuyongjie/Desktop/USB2SER/cdc-freescale.c:1434:12: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
rb->base = usb_buffer_alloc(acm->dev, readsize,
^
/home/fuyongjie/Desktop/USB2SER/cdc-freescale.c: At top level:
/home/fuyongjie/Desktop/USB2SER/cdc-freescale.c:1895:12: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
.ioctl = acm_tty_ioctl,
^
/home/fuyongjie/Desktop/USB2SER/cdc-freescale.c:1895:12: note: (near initialization for ‘acm_ops.ioctl’)
/home/fuyongjie/Desktop/USB2SER/cdc-freescale.c:1901:15: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
.tiocmget = acm_tty_tiocmget,
^
/home/fuyongjie/Desktop/USB2SER/cdc-freescale.c:1901:15: note: (near initialization for ‘acm_ops.tiocmget’)
/home/fuyongjie/Desktop/USB2SER/cdc-freescale.c:1902:15: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
.tiocmset = acm_tty_tiocmset,
^
/home/fuyongjie/Desktop/USB2SER/cdc-freescale.c:1902:15: note: (near initialization for ‘acm_ops.tiocmset’)
cc1: some warnings being treated as errors
scripts/Makefile.build:264: recipe for target '/home/fuyongjie/Desktop/USB2SER/cdc-freescale.o' failed
make[2]: *** [/home/fuyongjie/Desktop/USB2SER/cdc-freescale.o] Error 1
Makefile:1403: recipe for target '_module_/home/fuyongjie/Desktop/USB2SER' failed
make[1]: *** [_module_/home/fuyongjie/Desktop/USB2SER] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.4.0-43-generic'
Makefile:4: recipe for target 'all' failed
make: *** [all] Error 2
ERROR: compiling Freescale CDC module

0 Kudos
805 Views
david_diaz
NXP Employee
NXP Employee

Hello,

I’m afraid that the option for changing the COM port number is not supported by the USB2SER driver that includes flow control support; however, there is a workaround that consists in temporally changing the used driver for the standard CDC driver (without flow control) using the INF file purposed on Appendix C of USB2SER Datasheet (attached). The procedure is the following:

  1. Go to “Device Manager” and expand “Ports (COM & LPT)” menu.
  2. Right click on “Freescale CDC Device” and select “Update Driver Software”.
  3. Select “Browse my computer for driver software”.
  4. Select “Let me pick from a list of drivers on my computer”.
  5. Click on the option “Have Disk”
  6. Click on “Browse” button and locate the INF file that I have attached to this response.
  7. Accept any Windows’ message.
  8. Now you can change the port number by clicking on “Freescale CDC Device” --> “Proprieties” --> “Port Settings” --> “Advanced” --> “COM Port Number”.
  9. Finally, accept changing the port number.

You can use the USB2SER with this driver, but it doesn’t support Hardware Flow Control. If you want to have the USB2SER device with all of its features, you need to repeat all the procedure, but now, selecting the INF file included on USB2SER installation folder, located at the following path:

C:\Program Files\Freescale\USB2SER\USB2SER_Drivers\FSL_USB_PID.inf

USB2SER developers are aware of this issue, and they are working on an updated driver for fixing it. Please let me know if you still having troubles or if you have further questions. Have a nice day.

*** NOTE: Please change the extension of usb2ser.info file for usb2ser.inf ***

Hope this information will be useful for you.

Have a good day.

David Diaz

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------