vcom_connected() == FALSE Ubuntu Linux 14.04 - Use USB for Serial Monitor

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

vcom_connected() == FALSE Ubuntu Linux 14.04 - Use USB for Serial Monitor

901 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by a_bet on Fri Mar 18 07:14:02 MST 2016
Hi everyone,
I'm new to lpcxpresso and to the arm world. I've bought a lpcxpresso 43s37 board, which is doing fine with all the lpcopen examples i've tried.
In order to do some ADC and dsplay the data I'd like to set up the serial monitor.
Sadly I don't have a usb-uart adaptor so I'm trying to use the vcom on J5 as said in the docs.
When I build and debug the usbd_rom_cdc_vcom example from the LPCOpen folder everything seems ok, and the debug console gives no error. But the simply anything happens: no Hello World printed on the Console.
Observing the Step Over execution I noticed that the 1st if statement in the superloop is always false.
The superloop is as follows

Quote:
while (1) {
/* Check if host has connected and opened the VCOM port */
if ((vcom_connected() != 0) && (prompt == 0)) {
vcom_write("Hello World!!\r\n", 15);
prompt = 1;
}
/* If VCOM port is opened echo whatever we receive back to host. */
if (prompt) {
rdCnt = vcom_bread(&g_rxBuff[0], 256);
if (rdCnt) {
vcom_write(&g_rxBuff[0], rdCnt);
}
}
/* Sleep until next IRQ happens */
__WFI();
}



So, it seems that the VCOM is actually NOT connected.
Since in the readme.txt is given no advice for linux users I'm quie stuck at this point.

Any hint woulb be higly appreciated,
thanks in advance
Labels (1)
3 Replies

689 Views
monparahimanshu
Contributor I

you can remove the hello world statement.

what code does is, when you open the port and send first string it sends back to host and afterwords it enter into the command transmitting loop.

in Linux you can install screen and try to send any char it will send back.

i hope it works, let me know if you have any question.+

Regards,

himanshu

0 Kudos

689 Views
rishitborad
Contributor II

Any one faced this issue? Whats the cause?

Thanks

Rishit

0 Kudos

689 Views
lpcware
NXP Employee
NXP Employee
bump
0 Kudos