Score:0

how to do i set bulk usb transfer rate

jp flag

I have a raspberry pi with Ubuntu 20.04 (installed from the image ubuntu-20.04.3-preinstalled-server-arm64+raspi.img).

I want to set the bulk USB transfer rate to 150.


Here is how I do it on Raspberry Pi OS:

  • Open /etc/rc.local with an editor.

  • Add the following line at the end of the file before exit 0:

sudo sh -c 'echo 150 > /sys/module/usbcore/parameters/usbfs_memory_mb'
  • Save & Close the file and reboot the system.

How do I do this on Ubuntu?

cc flag
Which Ubuntu version? 20.04 has the same file, with a default contents of 16, so maybe the same command will work.
guiverc avatar
cn flag
Raspberry Pi OS I see as just a *respun/tweaked* Debian, however you provided no release info on that. Most everything possible in Debian is the same with Ubuntu where the version details match up - details you've not provided. Also note they don't always match up, eg. my Ubuntu *jammy* differs to my Debian *bookworm* with Ubuntu ahead in some areas; but ~equal in a large proportion. What releases are you asking about???
Score:0
jp flag

Use the systemd start up service instead it actually says rc.local is no longer running upon boot up on Raspberry Pi4

so create a file like this

sudo vi /etc/systemd/system/usb_bulk_transfer_rate.service

write this for example

[Unit] Description=set usb bulk transfer rate After=multi-user.target

[Service] ExecStart=/usr/bin/python3 /home/pi/cams/src/acp/sonyCam/write_bulk_transfer_usb.py

[Install] WantedBy=multi-user.target

then write this in the python file (or what ever you prefer to use) cd /home/pi/cams/src/acp/sonyCam sudo vi write_bulk_transfer_usb.py

with open("/sys/module/usbcore/parameters/usbfs_memory_mb", "w") as f: print("150", file=f) f.close()

then start the service as follows

sudo systemctl enable usb_bulk_transfer_rate.service sudo systemctl start usb_bulk_transfer_rate.service sudo systemctl status usb_bulk_transfer_rate.service

check success by looking for 150 returned from the command

pi@CameraPi:~/cams/src/acp/sonyCam $ cat /sys/module/usbcore/parameters/usbfs_memory_mb 150

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.