Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - USB Device - usblauncher unable to update from *.lua files: (24 Items)
   
USB Device - usblauncher unable to update from *.lua files  
I am trying to make my target board, SabreLite, to be a USB Device; so when I connect the SabreLite to a PC, I want to 
at least see the VID and PID in the PC Device Manager.  I understand the PC side will need an *.INF file, but the VID 
and PID that are hexadecimal should still be updated.

So far i have tried updating the IFS boot script to include the PPS, to launch the usblauncher, and created the 
necessary directories for the *.lua files.  However, when executing the boot script, the PPS is missing a /var/pps.  The
 usblauncher is able to run, but when performing usb -vvv I do not see the VID and PID updated to my *.lua files.

When trying to create the missing directory with mkdir, i get an error: Function not implemented.

I also tried a QNX recommendation to run usblauncher through the SD mount.  I am able to get the usblauncher to perform,
 but when using usb -vvv I am still seeing the USB controller being a Hub, when I want it to be a device with the 
information from the *.lua files.  Also I am still unable to create a directory, when using mkdir.

So I would like to know if i need to mount a different binary for creating directories (mkdir)?  Also is the PPS really 
necessary to execute the usblauncher, so it can update the usb controller with the necessary *.lua files?


Thanks in advance.
RE: USB Device - usblauncher unable to update from *.lua files  
After starting usblauncher, would you be able to post the output of "pidin arg", at least the portion that shows io-usb 
or io-usb-dcd and usblauncher running?
Would you be able to post the "Host_Stack" and "Device_Stack" portions of your Lua file that usblauncher is reading in?
If you run 

echo "start_stack::device,1"  >> /pps/qnx/usb_ctrl

what happens?  check "pidin arg" again and see if io-usb-dcd has started.

Is the USB device that you're making serial-USB, umass, or something else?

I think we can ignore the missing /var/pps for now. It's not needed for what you're trying to accomplish.


-----Original Message-----
From: Christopher Olarti [mailto:community-noreply@qnx.com] 
Sent: Tuesday, June 17, 2014 5:44 PM
To: osmeta-core_os
Subject: USB Device - usblauncher unable to update from *.lua files

I am trying to make my target board, SabreLite, to be a USB Device; so when I connect the SabreLite to a PC, I want to 
at least see the VID and PID in the PC Device Manager.  I understand the PC side will need an *.INF file, but the VID 
and PID that are hexadecimal should still be updated.

So far i have tried updating the IFS boot script to include the PPS, to launch the usblauncher, and created the 
necessary directories for the *.lua files.  However, when executing the boot script, the PPS is missing a /var/pps.  The
 usblauncher is able to run, but when performing usb -vvv I do not see the VID and PID updated to my *.lua files.

When trying to create the missing directory with mkdir, i get an error: Function not implemented.

I also tried a QNX recommendation to run usblauncher through the SD mount.  I am able to get the usblauncher to perform,
 but when using usb -vvv I am still seeing the USB controller being a Hub, when I want it to be a device with the 
information from the *.lua files.  Also I am still unable to create a directory, when using mkdir.

So I would like to know if i need to mount a different binary for creating directories (mkdir)?  Also is the PPS really 
necessary to execute the usblauncher, so it can update the usb controller with the necessary *.lua files?


Thanks in advance.



_______________________________________________

OSMeta
http://community.qnx.com/sf/go/post110732
To cancel your subscription to this discussion, please e-mail osmeta-core_os-unsubscribe@community.qnx.com
Re: RE: USB Device - usblauncher unable to update from *.lua files  
Thanks for helping with my current situation.

Please find the attachment to be the data you are requesting.

I have been switching from serial and mass storage, but the data log is for the serial communication.




Thanks Again.
Attachment: Text usblauncher_data.txt 4.85 KB
Re: RE: USB Device - usblauncher unable to update from *.lua files  
Apologies also find the following attachments to be the rules.lua
Attachment: Text rules.lua 8.56 KB
RE: RE: USB Device - usblauncher unable to update from *.lua files  
I think two key things to watch for is to not start io-usb-dcd before usblauncher; let usblauncher start the USB stack 
for you, and to use the 'echo' command to send a PPS command to usblauncher to start the stack. Also, let usblauncher 
start devc-serusb_dcd, instead of starting this from your boot script. usblauncher will launch this driver.

In rules.lua:

lines 79, 96, and 100 need to have the same path, e.g. /dev/otg/io-usb-dcd so that the drivers (e.g. devc-serusb_dcd) 
can connect to the USB stack.
to test umass you'll need to uncomment lines 98-101.

I see that io-usb-dcd is running before usblauncher. You'll need to let usblauncher start io-usb-dcd; disable io-usb-dcd
 from your boot script, start usblauncher as you are doing currently, then use the 'echo' command to write the command 
text to usblauncher's PPS control object:

# "start_stack::device,1" >> /pps/qnx/usb_ctrl
ksh: start_stack::device,1: cannot execute - No such file or directory

--> this should be:
echo "start_stack::device,1" >> /pps/qnx/usb_ctrl

This command instructs usblauncher to spawn io-usb-dcd, a child process, and establish a connection to this stack. Then 
it can override whatever descriptors are in the devu-usbser-mx6sabrelite-ci.so, to take on the personality of 'umass'  
or 'usb-serial' (with your VID/DID and any other modifications), launch the appropriate supporting driver (devu-
umass_client-block or devc-serusb_dcd), then enable the USB link so that the USB host (Windows PC) detects the device 
insertion.

echo "start_stack::device,1" >> /pps/qnx/usb_ctrl
--> start io-usb-dcd and override the descriptors to be umass, based on the 'umass' Lua table defined in /etc/
usblauncher/umass.lua

echo "start_stack::none" >> /pps/qnx/usb_ctrl
--> usblauncher will slay io-usb-dcd (the one that it spawned in the above step)

echo "start_stack::device,2" >> /pps/qnx/usb_ctrl
--> start io-usb-dcd and override the descriptors to be usb-serial, based on the 'usbser' Lua table defined in /etc/
usblauncher/usbser.lua

I see that you are running io-usb for the host-only port on the sabrelite. What you could do, once the above is working 
correctly, is plug a micro-USB cable into the OTG port, and the type A plug end of the cable into the port on the 
adjacent side of the board, then type 'usb' at the console and see if your device is enumerated. Or you could use a 
diagnostics tool on your Windows PC to see what is detected.

-----Original Message-----
From: Christopher Olarti [mailto:community-noreply@qnx.com] 
Sent: Wednesday, June 18, 2014 6:52 PM
To: osmeta-core_os
Subject: Re: RE: USB Device - usblauncher unable to update from *.lua files

Thanks for helping with my current situation.

Please find the attachment to be the data you are requesting.

I have been switching from serial and mass storage, but the data log is for the serial communication.




Thanks Again.



_______________________________________________

OSMeta
http://community.qnx.com/sf/go/post110755
To cancel your subscription to this discussion, please e-mail osmeta-core_os-unsubscribe@community.qnx.com
Re: RE: RE: USB Device - usblauncher unable to update from *.lua files  
Hi Andy,

Please find the attachment to be the latest actions for running usblauncher.  I included the *.build file and the log 
file.

I commented out the initialization of the USB OTG Mass at the .script portion and made the console.sh run usblauncher -h
.  I did update the *.lua files to be recognized in dev/io-usb-dcd instead of dev/otg/io-usb-dcd.  I also included in 
the console.sh the echo "start_stack::device,2" for umass after executing usblauncher.

I noticed in the log file, with "pidin arg", I did not see the device driver for a umass.

Attachment: Compressed file usblauncher.zip 8.26 KB
RE: RE: RE: USB Device - usblauncher unable to update from *.lua files  
Hi Christopher,

Could you add -vvvl to the usblauncher command-line, then run sloginfo -t and provide the output?
This turns up the verbosity setting so that we can see what usblauncher's doing at each step. The -l sends the output to
 slogger.

Until you get everything working correctly, I recommend running

echo "start_stack::device,2" >> /pps/qnx/usb_ctrl

manually, instead of in the boot script.

You can run sloginfo in the background, and observe any new output as a response to the commands you enter on the 
console:

sloginfo -wt &

then

echo "start_stack::device,2" >> /pps/qnx/usb_ctrl

What output do you see?

It's ok to leave the first io-usb running. You'll need this to use the non-OTG port.  devb-umass appears to fail with "
xpt_configure: umass SIM attach failure" since the first io-usb instance is not running now.

If you have the first io-usb instance running (started by the boot script), then let usblauncher start the io-usb-dcd 
for the other controller, you'll be able to connect a USB cable between the two ports and run 'usb' or 'devb-umass' to 
test out the client device all on one target.

-Andy


-----Original Message-----
From: Christopher Olarti [mailto:community-noreply@qnx.com] 
Sent: Thursday, June 19, 2014 1:00 PM
To: osmeta-core_os
Subject: Re: RE: RE: USB Device - usblauncher unable to update from *.lua files

Hi Andy,

Please find the attachment to be the latest actions for running usblauncher.  I included the *.build file and the log 
file.

I commented out the initialization of the USB OTG Mass at the .script portion and made the console.sh run usblauncher -h
.  I did update the *.lua files to be recognized in dev/io-usb-dcd instead of dev/otg/io-usb-dcd.  I also included in 
the console.sh the echo "start_stack::device,2" for umass after executing usblauncher.

I noticed in the log file, with "pidin arg", I did not see the device driver for a umass.





_______________________________________________

OSMeta
http://community.qnx.com/sf/go/post110765
To cancel your subscription to this discussion, please e-mail osmeta-core_os-unsubscribe@community.qnx.com
Re: RE: RE: RE: USB Device - usblauncher unable to update from *.lua files  
Please find the attachment to be the latest request for running usblauncher with -vvvl.

I am not seeing anything new on the PC Device Manager, so I will be getting a USB analyzer this afternoon and inspect 
the bus.

I would like to understand some of the actions better when trying to make the SabreLite a USB Device as a Network, 
Serial, and Mass Storage.

1. Under rules.lua, can I create multiple instances of the Device Stack for each USB type?  Under the same Device_Stack{
 } can I have mutliple cmd assignments; for instance:

Device_Stack = {
	cmd  = 'io-usb-dcd -d -dusbncm-mx6sabrelite-ci ioport=0x02184000,irq=75';
        cmd = 'io-usb-dcd -d -dusbser-mx6sabrelite-ci ioport=0x02184000,irq=75';
        cmd = 'io-usb-dcd -d -dusbmass-mx6sabrelite-ci ioport=0x02184000,irq=75';
	path = '/dev/io-usb-dcd';
        descriptors = {umass, usbser,usbncm};
}

2.  What are the Serial and Networking Interfaces like the following for Mass Storage?

##############################################################
 ## Driver for USB Mass Storage interface
##############################################################
   echo Launching devb-umass...
   devb-umass cam pnp &
   echo done



Thanks again.
Attachment: Text usblauncher_vvvl.txt 18.64 KB
RE: RE: RE: RE: USB Device - usblauncher unable to update from *.lua files  
>>
cmd  = 'io-usb-dcd -d -dusbncm-mx6sabrelite-ci ioport=0x02184000,irq=75';
cmd = 'io-usb-dcd -d -dusbser-mx6sabrelite-ci ioport=0x02184000,irq=75';
cmd = 'io-usb-dcd -d -dusbmass-mx6sabrelite-ci ioport=0x02184000,irq=75';

This is like

x = 3
x = 4
x = 5

the final value of x is 5; only the last cmd assignment is used.

The idea is that you use only one command, any of them is doesn't much matter, such as cmd = 'io-usb-dcd -d -dusbmass-
mx6sabrelite-ci ioport=0x02184000,irq=75', then 

echo "start_stack::device,1"   >> /pps/qnx/usb_ctrl  # to select the 1st item in descriptors {}, umass USB descriptors
or;
echo "start_stack::device,2"  >> /pps/qnx/usb_ctrl   # to select the 2nd item in descriptors {}, usbser USB descriptors
or;
echo "start_stack::device,3"  >> /pps/qnx/usb_ctrl   # to select the 3rd item in descriptors {}, usbncm USB descriptors

If usblauncher is used to override/set the USB descriptors, then any of the devu*-mx6sabrelite-ci.so shared objects can 
be used, since the USB descriptors that are compiled into these libraries are overridden based on how you instruct 
usblauncher to start the io-usb-dcd stack.

Were you able to type 

echo "start_stack::device,1" >> /pps/qnx/usb_ctrl

at the prompt?

In the last log, I see higher verbosity logs but I don't see that this command was run yet. This command is required to 
properly set up the Sabrelite as a USB Device on the OTG port.

Let's try to get descriptor overrides working for mass storage, then we can discuss USB-Serial and NCM after.

Cheers,
Andy

-----Original Message-----
From: Christopher Olarti [mailto:community-noreply@qnx.com] 
Sent: Thursday, June 19, 2014 2:31 PM
To: osmeta-core_os
Subject: Re: RE: RE: RE: USB Device - usblauncher unable to update from *.lua files

Please find the attachment to be the latest request for running usblauncher with -vvvl.

I am not seeing anything new on the PC Device Manager, so I will be getting a USB analyzer this afternoon and inspect 
the bus.

I would like to understand some of the actions better when trying to make the SabreLite a USB Device as a Network, 
Serial, and Mass Storage.

1. Under rules.lua, can I create multiple instances of the Device Stack for each USB type?  Under the same Device_Stack{
 } can I have mutliple cmd assignments; for instance:

Device_Stack = {
	cmd  = 'io-usb-dcd -d -dusbncm-mx6sabrelite-ci ioport=0x02184000,irq=75';
        cmd = 'io-usb-dcd -d -dusbser-mx6sabrelite-ci ioport=0x02184000,irq=75';
        cmd = 'io-usb-dcd -d -dusbmass-mx6sabrelite-ci ioport=0x02184000,irq=75';
	path = '/dev/io-usb-dcd';
        descriptors = {umass, usbser,usbncm};
}

2.  What are the Serial and Networking Interfaces like the following for Mass Storage?

##############################################################
 ## Driver for USB Mass Storage interface
##############################################################
   echo Launching devb-umass...
   devb-umass cam pnp &
   echo done



Thanks again.



_______________________________________________

OSMeta
http://community.qnx.com/sf/go/post110767
To cancel your subscription to this discussion, please e-mail osmeta-core_os-unsubscribe@community.qnx.com
Re: USB Device - usblauncher unable to update from *.lua files  
Hi Andy,

Please find the attachment to be the data you requested for usblauncher when the USB Host has been initialized and 
letting the usblauncher to perform the USB Device.

Also in my console.sh I let the script to run

##########################################################
## usblauncher
##########################################################
	echo Starting USBlauncher
	usblauncher -h -vvvl -p 2 -t -s /lib/dll/pubs/

then at my command prompt i performed the following commands:

#sloginfo -t
....
....
#sloginfo -wt &
....
....
#echo "start_stack::device,2" >> /pps/qnx/usb_ctrl
#        <-- No new data was outputted
#pidin arg
.....


usblauncher_sloginfo_t.txt -->just executes sloginfo -t after usblauncher
usblauncher_echo.txt --> appends with usblauncher_sloginfo_t.txt and uses the commands
sloginfo -wt &
echo "start_stack::device,2" >> /pps/qnx/usb_ctrl
pidin arg
Attachment: Compressed file usblauncher_slog.zip 9.58 KB
RE: USB Device - usblauncher unable to update from *.lua files  
Hi Christopher,

After the echo "start_stack::device,2" >> /pps/qnx/usb_ctrl

What's the output of

cat /pps/qnx/device/usb_ctrl
mount

Try (manually, at the console):

slay devb-ram
slay pps
slay usblauncher

pps -m /pps/qnx
usblauncher -h -vvvl -p 2 -t -s /lib/dll/pubs/
echo "start_stack::device,2" >> /pps/qnx/usb_ctrl

What happens?

-Andy

-----Original Message-----
From: Christopher Olarti [mailto:community-noreply@qnx.com] 
Sent: Thursday, June 19, 2014 4:35 PM
To: osmeta-core_os
Subject: Re: USB Device - usblauncher unable to update from *.lua files

Hi Andy,

Please find the attachment to be the data you requested for usblauncher when the USB Host has been initialized and 
letting the usblauncher to perform the USB Device.

Also in my console.sh I let the script to run

##########################################################
## usblauncher
##########################################################
	echo Starting USBlauncher
	usblauncher -h -vvvl -p 2 -t -s /lib/dll/pubs/

then at my command prompt i performed the following commands:

#sloginfo -t
....
....
#sloginfo -wt &
....
....
#echo "start_stack::device,2" >> /pps/qnx/usb_ctrl
#        <-- No new data was outputted
#pidin arg
.....


usblauncher_sloginfo_t.txt -->just executes sloginfo -t after usblauncher
usblauncher_echo.txt --> appends with usblauncher_sloginfo_t.txt and uses the commands
sloginfo -wt &
echo "start_stack::device,2" >> /pps/qnx/usb_ctrl
pidin arg



_______________________________________________

OSMeta
http://community.qnx.com/sf/go/post110770
To cancel your subscription to this discussion, please e-mail osmeta-core_os-unsubscribe@community.qnx.com
Re: USB Device - usblauncher unable to update from *.lua files  
Hi Andy,

Please find the attachment to be the results from your request.
Attachment: Text usblauncher_slay.txt 1.5 KB
RE: USB Device - usblauncher unable to update from *.lua files  
Hi Christopher,

I believe in your build file usblauncher was included in the IFS and the full path is /bin/usblauncher? If so, please 
try

/bin/usblauncher -h -vvvl -p 2 -t -s /lib/dll/pubs

This will need to be run on a separate line from

echo "start_stack::device,2" >> /pps/qnx/usb_ctrl

(from usblauncher_slay.txt it looked like both lines were pasted together--perhaps your e-mail application may be 
removing line endings automatically?)

e.g.

slay devb-ram
slay pps
slay usblauncher

pps -m /pps/qnx
/bin/usblauncher -h -vvvl -p 2 -t -s /lib/dll/pubs/
echo "start_stack::device,2" >> /pps/qnx/usb_ctrl

Cheers,
Andy

-----Original Message-----
From: Christopher Olarti [mailto:community-noreply@qnx.com] 
Sent: Thursday, June 19, 2014 4:54 PM
To: osmeta-core_os
Subject: Re: USB Device - usblauncher unable to update from *.lua files

Hi Andy,

Please find the attachment to be the results from your request.



_______________________________________________

OSMeta
http://community.qnx.com/sf/go/post110772
To cancel your subscription to this discussion, please e-mail osmeta-core_os-unsubscribe@community.qnx.com
Re: RE: USB Device - usblauncher unable to update from *.lua files  
Hi Andy,

I apparently do not have a bin/usblauncher.

# ls bin/
sh           slog2info




But in my build script, it does contain the binary:





# Redirect console messages
[type=link] /bin/sh=/proc/boot/ksh
[type=link] /dev/console=/dev/ser1
[type=link] /tmp=/dev/shmem

# Programs require the runtime linker (ldqnx.so) to be at a fixed location

# Shared libraries
libc.so
libm.so.2

##############################################################
## Multimedia Publishing
##############################################################
/bin/usblauncher=usblauncher

[search=${QNX_TARGET}/etc/usblauncher]
/etc/usblauncher/rules.lua=rules.lua
/etc/usblauncher/umass.lua=umass.lua
/etc/usblauncher/usbser.lua=usbser.lua

[search=${QNX_TARGET}/armle-v7/lib/dll/pubs]
/lib/dll/pubs/pp-generic.so=pp-generic.so

#Restore search path
[search=${MKIFS_PATH}]


should i include usblauncher as a general command?
RE: RE: USB Device - usblauncher unable to update from *.lua files  
Hi Christopher, 

Ok, let's try it from another angle, since you had usblauncher started somehow.

- don't mount the ram disk to / at boot up so we can rule out a problem with where /pps/qnx/device/usb_ctrl is being 
written to
- start pps with -m /pps/qnx

then try the echo "start_stack::device,1" etc. as before.

If you're still having problems it may be best to arrange a screen share / WebEx through your QNX contact (portal) so 
that we can walk you through the steps live.

-Andy

-----Original Message-----
From: Christopher Olarti [mailto:community-noreply@qnx.com] 
Sent: Thursday, June 19, 2014 5:23 PM
To: osmeta-core_os
Subject: Re: RE: USB Device - usblauncher unable to update from *.lua files

Hi Andy,

I apparently do not have a bin/usblauncher.

# ls bin/
sh           slog2info




But in my build script, it does contain the binary:





# Redirect console messages
[type=link] /bin/sh=/proc/boot/ksh
[type=link] /dev/console=/dev/ser1
[type=link] /tmp=/dev/shmem

# Programs require the runtime linker (ldqnx.so) to be at a fixed location

# Shared libraries
libc.so
libm.so.2

##############################################################
## Multimedia Publishing
##############################################################
/bin/usblauncher=usblauncher

[search=${QNX_TARGET}/etc/usblauncher]
/etc/usblauncher/rules.lua=rules.lua
/etc/usblauncher/umass.lua=umass.lua
/etc/usblauncher/usbser.lua=usbser.lua

[search=${QNX_TARGET}/armle-v7/lib/dll/pubs]
/lib/dll/pubs/pp-generic.so=pp-generic.so

#Restore search path
[search=${MKIFS_PATH}]


should i include usblauncher as a general command?



_______________________________________________

OSMeta
http://community.qnx.com/sf/go/post110774
To cancel your subscription to this discussion, please e-mail osmeta-core_os-unsubscribe@community.qnx.com
Re: RE: USB Device - usblauncher unable to update from *.lua files  
I left everything close to the original file, except I included information for slogger2.

I performed the following commands

#pps -m /pps/qnx
#usblauncher -h -vvvl -p 2 -t -s /lib/dll/pubs/ echo "start_stack::device,1" >> /pps/qnx/usb_ctrl

However I do not see the USB Serial in the PC Device Manager, like i would if i uncommented

    ##############################################################
## USB OTG port (operating in device mode)...
## The commands below will configure the i.MX6 OTG port as a Mass Storage Device
#############################################################  
    Example of CDC-ACM (serial) device #####

    #display_msg Configure USB Serial Device

    # Step 1 - Start USB device stack
    #io-usb-dcd -dusbser-mx6sabrelite-ci ioport=0x02184000,irq=75
    #waitfor /dev/io-usb-dcd/io-usb 4
    #waitfor /dev/io-usb-dcd/devu-usbser-mx6sabrelite-ci.so 4

    # Step 2 - Start USB CDC-ACM function driver and enable USB soft connect
    #devc-serusb_dcd -e -v -F -s -d iface_list=0,unit=1
    #waitfor /dev/serusb1 4 
    #ulink_ctrl -l 1
Attachment: Text usblauncher_restartpps.txt 11.49 KB
Re: RE: USB Device - usblauncher unable to update from *.lua files  
So when using usblauncher, how can I verify the descriptors on the QNX has accepted my descriptors and strings from 
rules.lua.


Thanks in advance.
RE: RE: USB Device - usblauncher unable to update from *.lua files  
Hi Christopher,

I think we'll be able to help you best through a WebEx where we can issue the commands and walk you through the steps 
live. Would that be possible?

Thanks,
Andy


-----Original Message-----
From: Christopher Olarti [mailto:community-noreply@qnx.com] 
Sent: Thursday, June 19, 2014 7:59 PM
To: osmeta-core_os
Subject: Re: RE: USB Device - usblauncher unable to update from *.lua files

So when using usblauncher, how can I verify the descriptors on the QNX has accepted my descriptors and strings from 
rules.lua.


Thanks in advance.



_______________________________________________

OSMeta
http://community.qnx.com/sf/go/post110777
To cancel your subscription to this discussion, please e-mail osmeta-core_os-unsubscribe@community.qnx.com
RE: RE: USB Device - usblauncher unable to update from *.lua files  
Hi Christopher,

#pps -m /pps/qnx
#usblauncher -h -vvvl -p 2 -t -s /lib/dll/pubs/ 
#### echo must be on a new line
echo "start_stack::device,1" >> /pps/qnx/usb_ctrl

The next step is to confirm that the text echoed to /pps/qnx/usb_ctrl is processed by usblauncher.
When it's working you'll see output similar to this:

# echo "start_stack::device,1" >> /pps/qnx/device/usb_ctrl
Jan 01 00:08:05.054    5    12   100 CMD: start_stack device,3
Jan 01 00:08:05.054    6    12   100 cmd_status::0 (No error)

Jan 01 00:08:05.054    5    12   100 Launch io-usb-dcd -d -dusbser-mx6sabrelite-ci ioport=0x02184000,irq=75 -n /dev/otg/
io-usb-dcd
Jan 01 00:08:05.054    5    12   100 CMD: start_stack error No error
Jan 01 00:08:05.059    5    12   100 Driver io-usb-dcd has pid 639002

Right now I don't think any of these log messages show up on your target which means usblauncher doesn't receive the PPS
 command to start the device stack.

If you could submit a standard support case, with reference to this post our support team can help you further.

Best regards,
Andy

-----Original Message-----
From: Christopher Olarti [mailto:community-noreply@qnx.com] 
Sent: Thursday, June 19, 2014 6:04 PM
To: osmeta-core_os
Subject: Re: RE: USB Device - usblauncher unable to update from *.lua files

I left everything close to the original file, except I included information for slogger2.

I performed the following commands

#pps -m /pps/qnx
#usblauncher -h -vvvl -p 2 -t -s /lib/dll/pubs/ echo "start_stack::device,1" >> /pps/qnx/usb_ctrl

However I do not see the USB Serial in the PC Device Manager, like i would if i uncommented

    ##############################################################
## USB OTG port (operating in device mode)...
## The commands below will configure the i.MX6 OTG port as a Mass Storage Device
#############################################################  
    Example of CDC-ACM (serial) device #####

    #display_msg Configure USB Serial Device

    # Step 1 - Start USB device stack
    #io-usb-dcd -dusbser-mx6sabrelite-ci ioport=0x02184000,irq=75
    #waitfor /dev/io-usb-dcd/io-usb 4
    #waitfor /dev/io-usb-dcd/devu-usbser-mx6sabrelite-ci.so 4

    # Step 2 - Start USB CDC-ACM function driver and enable USB soft connect
    #devc-serusb_dcd -e -v -F -s -d iface_list=0,unit=1
    #waitfor /dev/serusb1 4 
    #ulink_ctrl -l 1




_______________________________________________

OSMeta
http://community.qnx.com/sf/go/post110776
To cancel your subscription to this discussion, please e-mail osmeta-core_os-unsubscribe@community.qnx.com
Re: RE: RE: USB Device - usblauncher unable to update from *.lua files  
Hi Andy,

I think almost got to your expected result after performing

echo "start_stack::device,1">>/pps/qnx/usb_ctrl

However, the usb_ctrl is in the "device" folder after usblauncher is enabled so i did

echo "start_stack::device,1">>/pps/qnx/device/usb_ctrl

and i received the following:

# echo "start_stack::device,1">>/pps/qnx/device/usb_ctrl 
# DLL Error Library cannot be found
 FAILED  - io_usb_dlopen
unable to load dll devu--dusbser-mx6sabrelite-ci
In function usbdc_attach_hub -- /builds/660_SDP/svn/hardware/support/publishers/usblauncher/dcd.c:247 device_root_hub !=
 NULL -- assertion failed


Thanks.
RE: RE: RE: USB Device - usblauncher unable to update from *.lua files  
Hi Christopher,

My apologies. I gave you the wrong path, yes it should be /pps/qnx/device/usb_ctrl not /pps/qnx/usb_ctrl

I see an issue in your Device_Stack cmd string:

-d -dusbncm-mx6sabrelite-ci

Try again but remove the extra '-d' as this is incorrect syntax.

-Andy

-----Original Message-----
From: Christopher Olarti [mailto:community-noreply@qnx.com] 
Sent: Friday, June 20, 2014 12:07 PM
To: osmeta-core_os
Subject: Re: RE: RE: USB Device - usblauncher unable to update from *.lua files

Hi Andy,

I think almost got to your expected result after performing

echo "start_stack::device,1">>/pps/qnx/usb_ctrl

However, the usb_ctrl is in the "device" folder after usblauncher is enabled so i did

echo "start_stack::device,1">>/pps/qnx/device/usb_ctrl

and i received the following:

# echo "start_stack::device,1">>/pps/qnx/device/usb_ctrl 
# DLL Error Library cannot be found
 FAILED  - io_usb_dlopen
unable to load dll devu--dusbser-mx6sabrelite-ci
In function usbdc_attach_hub -- /builds/660_SDP/svn/hardware/support/publishers/usblauncher/dcd.c:247 device_root_hub !=
 NULL -- assertion failed


Thanks.



_______________________________________________

OSMeta
http://community.qnx.com/sf/go/post110790
To cancel your subscription to this discussion, please e-mail osmeta-core_os-unsubscribe@community.qnx.com
Re: RE: RE: RE: USB Device - usblauncher unable to update from *.lua files  
Hi Andrew,

Thanks for your help.  It seems like it is working fine now, I am able to see devices being displayed in the PC Device 
Manager.

However, I am unable to switch between devices when using

echo "start_stack::device,1">>/pps/qnx/device/usb_ctrl, where 1 can change to none, 2, 3, ....

It seems like i have to slay usblauncher and re-enable usblauncher with the device that i want.  Is there something i 
should consider when changing devices?


Thanks for all of your help.


Chris.
RE: RE: RE: RE: USB Device - usblauncher unable to update from *.lua files  
Hi Chris,

Try

echo "start_stack::device,1">>/pps/qnx/device/usb_ctrl
echo "start_stack::none">>/pps/qnx/device/usb_ctrl
echo "start_stack::device,2">>/pps/qnx/device/usb_ctrl
echo "start_stack::none">>/pps/qnx/device/usb_ctrl
echo "start_stack::device,3">>/pps/qnx/device/usb_ctrl

slaying usblauncher is not necessary.

Note that "start_stack::none" is the correct syntax; "start_stack::device,none" is not.

-Andy

-----Original Message-----
From: Christopher Olarti [mailto:community-noreply@qnx.com] 
Sent: Friday, June 20, 2014 4:23 PM
To: osmeta-core_os
Subject: Re: RE: RE: RE: USB Device - usblauncher unable to update from *.lua files

Hi Andrew,

Thanks for your help.  It seems like it is working fine now, I am able to see devices being displayed in the PC Device 
Manager.

However, I am unable to switch between devices when using

echo "start_stack::device,1">>/pps/qnx/device/usb_ctrl, where 1 can change to none, 2, 3, ....

It seems like i have to slay usblauncher and re-enable usblauncher with the device that i want.  Is there something i 
should consider when changing devices?


Thanks for all of your help.


Chris.



_______________________________________________

OSMeta
http://community.qnx.com/sf/go/post110797
To cancel your subscription to this discussion, please e-mail osmeta-core_os-unsubscribe@community.qnx.com
Re: RE: RE: RE: RE: USB Device - usblauncher unable to update from *.lua files  
That's it....

Thanks again...