Comments (15)
thank you for the update @erdemkahraman
feel free to provide feedback or recommend changes as you use mtda
from mtda.
Hello,
Thanks for giving MTDA a try and providing feedback!
Is the mass storage gadget working if you remove the keyboard from your configuration ?
I am asking because USB controllers have different capabilities and may not support the same number of USB functions for composite
Could you attach your full debug logs as well?
from mtda.
You don't seem to have a power controller. I will check how MTDA behaves. When we cannot power the target on/off from MTDA, we assume it is always ON but switching storage between the host and target may be done when we know the target is OFF
from mtda.
Hello @chombourger
First of all thanks for your fast reply
Hello,
Thanks for giving MTDA a try and providing feedback!
Is the mass storage gadget working if you remove the keyboard from your configuration ?
I am asking because USB controllers have different capabilities and may not support the same number of USB functions for composite
Could you attach your full debug logs as well?
to the first question
Yes I tried to remove the keyboard configuration and also serial and monitor. Storage was standalone but It did not worked.
Debug level is at 3 and full debug logs that I have sent it already. I don't know if there is any more logs.
You don't seem to have a power controller. I will check how MTDA behaves. When we cannot power the target on/off from MTDA, we assume it is always ON but switching storage between the host and target may be done when we know the target is OFF
And yes I have tried to add a power target configuration as dummy for MTDA but the result did not change
from mtda.
Yes I tried to remove the keyboard configuration and also serial and monitor. Storage was standalone but It did not worked. Debug level is at 3 and full debug logs that I have sent it already. I don't know if there is any more logs.
well I am hoping that we would get more information from journalctl -u mtda
. Logs you have shared are those from the client (mtda-cli
), I'd like to see those from the server (mtda-service
)
from mtda.
Hi @chombourger
I am attaching the logs.
mtda-journal.log
mtda-service.log
from mtda.
Thank you.
It appears that MTDA was told that the block device should appear as /dev/sda
:
storage.usbf.probe(): /dev/sda not found!
Can you confirm you have a mass storage device attached to your system and that it shows up as /dev/sda?
from mtda.
Looking at your config file you had:
file=/dev/mmcblk1p3
I will check the code to understand why we are then looking for /dev/sda
from mtda.
What version (commit hash?) are you using by the way?
from mtda.
Thank you.
It appears that MTDA was told that the block device should appear as
/dev/sda
:storage.usbf.probe(): /dev/sda not found!
Can you confirm you have a mass storage device attached to your system and that it shows up as /dev/sda?
There is no device called /dev/sda (Maybe I tried to run it with default conf with using device=/dev/sda or sth like that), I have a partition that is not mounted on my rootfs. I want to attach it to device under test and it is /dev/mmcblk1p3
And yes It is appearing when I list the devices lets have a look;
rock@rock-3a:$ ls /dev | grep mmcblk*
mmcblk1
mmcblk1p1
mmcblk1p2
mmcblk1p3
And I am using the master branch the last commit is 02d0e8c49547db1ec055903d8a8897386216ac65
from mtda.
Also my configuration is here
rock@rock-3a:~$ cat /etc/mtda/config
[main]
debug=3
[console]
variant=serial
port=/dev/ttyUSB0
rate=115200
[storage]
variant=usbf
device=/dev/mmcblk1p3
rock@rock-3a:~$ mtda-cli storage target
# debug3: main.load_timeouts_config()
# debug3: main.load_timeouts_config: None
# debug3: main.start()
failed to connect the shared storage device to the target!
from mtda.
do you mind checking what happens if you replace device= with file= (in the [storage]) block?
from mtda.
do you mind checking what happens if you replace device= with file= (in the [storage]) block?
Same behavior
rock@rock-3a:~$ mtda-cli storage target
# debug3: main.load_timeouts_config()
# debug3: main.load_timeouts_config: None
# debug3: main.start()
failed to connect the shared storage device to the target!
Also I am able to do it by using
sudo modprobe g_mass_storage \
stall=0 \
removable=1 \
idVendor=0x0781 \
idProduct=0x5572 \
bcdDevice=0x011a \
iManufacturer="SanDisk" \
iProduct="Cruzer Switch" \
iSerialNumber=1234567890 \
file=/dev/mmcblk1p3
Also the lsmod output is here (While I am trying to use mtda-cli with storage, Actually I want to tell the g_mass_storage is inactive);
rock@rock-3a:~$ lsmod
Module Size Used by
veth 20480 0
bridge 122880 0
stp 16384 1 bridge
llc 16384 2 bridge,stp
nf_conntrack_netlink 40960 0
nfnetlink 16384 2 nf_conntrack_netlink
nf_conntrack 139264 1 nf_conntrack_netlink
nf_defrag_ipv6 16384 1 nf_conntrack
nf_defrag_ipv4 16384 1 nf_conntrack
overlay 98304 0
ftdi_sio 53248 1
usbserial 36864 3 ftdi_sio
binfmt_misc 20480 1
fuse 94208 1
ip_tables 28672 0
x_tables 28672 1 ip_tables
ipv6 397312 31 bridge
dwc3 131072 0
udc_core 36864 1 dwc3
dwc3_of_simple 16384 0
realtek 20480 1
from mtda.
For example
I am able to use mtda-cli storage with
mtda-cli storage write images/image.wic
And I am attaching my device with g_mass_storage
It is working fine with that way but only attaching with "mtda-cli storage target/host" is not working
from mtda.
Hi @chombourger
I guess, you have mentioned earlier, the target and storage features are binded why I said this?
Because I used the power feature via using shellcmd variant and then I reconfigured the storage feature,
[main]
debug=3
[storage]
variant=usbf
file=/dev/mmcblk1p3
[power]
variant = shellcmd
on-cmd = /bin/true
off-cmd = /bin/true
check-on = /bin/false
And then I manually added the usb_f_mass_storage
kernel module and then mtda-cli storage target/host
worked.
But. The storage feature is not working ""standalone"", but dummy power settings fits me no problem.
Thanks a lot for your effort.
from mtda.
Related Issues (20)
- meta-isar: add swupdate support HOT 4
- Default Siemens security policy HOT 1
- support pure dropin-style based configuration
- add a prefix (priority) to systemd drops HOT 1
- console_send unexpectedly returning None HOT 9
- image checksum
- one assist board (e.g. one NanoPI): many DUTs
- storage_update doesn't work HOT 3
- Ugly exception in the absence of an USB gadget device HOT 1
- Bad performance of storage write HOT 1
- help: using pytest with shellcmd power control HOT 7
- Use f-strings instead of .format()
- mtda-service.postinst assumes to always run on target
- Make Lava installation optional
- Zeroconf configuration fails if 192.0.2.0 is unreachable
- Outdated hap-python / unmaintained crypto libs
- storage mount fails most of the time with usbsdmux
- upload image from the web interface
- Default Siemens Code of Conduct
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mtda.