Gaetano
Members-
Posts
10 -
Joined
-
Last visited
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
@Ryzer pcduino definitely works fine with dwc2. I cannot get OTG to work without it. I am not qulified to make any comments on whether this makes sense or is a coincidence, but if I don't load the module, it's doesn't work. For some reason, the mass storage gadget is still a little unstable in Windows (sometimes the File Explorer window shuts down for no reason), but on a Linux laptop, it is rock stable. It has also been running for two days in my car and doesn't seem to miss a beat there either (Linux host).
-
I found a solution: downgrade the kernel to version 5.10.218 on SD-card_images by Johang Gunarsson in sweden. I used his Bookworm image. It does require a bit of work: Rsync is often broken on his images for pcduino (it looks for a libcryto.1 module but that module is obsolete), so you may need to downoad and compile rsync if you need it. The wifi is also unstable with the main line driver. I fixed the issue by installing morrownr's driver, but it takes ages to compile on the old lady (about 45 mins). I took the kernel and headers from this archive: https://archive.debian.org/debian/pool/main/l/linux/ Apparently, the big change between kernel 5 and 6 wrt OTG is usb-role-switch. Pcduino can support this new requirement, but someone with the right knowledge needs to take the time to update the device tree, and since the board is old, this may take time, or at this stage, may never happen.
-
I do get multiple warnings while compiling the DTS file, about 50-100 warnings similar to this: ttt.dts:1752.3-32: Warning (gpios_property): /usb0-vbus:gpio: cell 0 is not a phandle reference ttt.dts:1764.3-32: Warning (gpios_property): /usb1-vbus:gpio: cell 0 is not a phandle reference ttt.dts:1776.3-32: Warning (gpios_property): /usb2-vbus:gpio: cell 0 is not a phandle reference ttt.dts:1823.4-34: Warning (gpios_property): /leds/led-3:gpios: cell 0 is not a phandle reference ttt.dts:1828.4-34: Warning (gpios_property): /leds/led-4:gpios: cell 0 is not a phandle reference The phandles are in this kind of format on the dts file: phandle = <0x20>; phandle = <0xc2>; phandle = <0x1c>; phandle = <0xc3>; phandle = <0xc4>; phandle = <0x16>; phandle = <0xc5>; example: Note: the usb0 vbus was originally disabled but I enabled it as the pcduino3 nano has a single regulator for all ports and it is attached to usb0 apparently. In the closing section of __symbols__, I have redirected all 3 regulators to usb0. I believe that the fact it is disabled is because they don't recommend powering the board through the OTG port as it can cause voltage drops when connecting devices as host. My setup will be a gadget with a wifi dongle in a USB A port, so voltage drops should not be a concern, this is just my assumption... usb0-vbus { compatible = "regulator-fixed"; regulator-name = "usb0-vbus"; regulator-min-microvolt = <0x4c4b40>; regulator-max-microvolt = <0x4c4b40>; enable-active-high; gpio = <0x17 0x01 0x09 0x00>; status = "okay"; phandle = <0xc2>;
-
Dear Ryzer, Alas, the device tree updsate didn't change anything. Here is the process that uses a lot of CPU: 13.0 0.0 0:05.51 kworker/0:14+events_freezable_power_ Google says it is related to power state changes, and from kernel 6, power saving settings have been more aggressive in Linux, so that's why I am trying to set up a Buster-based system.
-
Ryzer, Thank you for your suggestions. I will try the update for the device tree, but with otg as value, the board will be a storage device for my dashcam. I am trying to get a Buster release with kernel 6.6.75 to compile under armbian build, but so far, the compilation fails because there is no availale package for base-files. I did put the file in the cache/sources folder (which worked for a bullseye version), but nothing works for the buster version. So far, the biggest progress was achieved by commenting out or adding the following in armbianEnv.txt (no updates in modules.conf, config.txt or cdmline.txt). With those updates, the drive and folders show up instantly upon activating hte gadget, I can navigate the folders, but writing is a hit and miss (using libcomposite, not g_mass_storage) #overlay_prefix=sun7i-a20 param_usb_device_mode=otg overlays=dwc2 (instead of the usual dtoverlays) With those parameters, Windows file explorer and Windows Explorer no longer crash. The top command shows 13% CPU usage for a kworker process related to power. A google search found that this may be due to a device/driver continuously requesting a power state change (conflict between drivers?). No errors in dmesg regarding dwc2. Here are the final line: [ 75.627225] loop0: detected capacity change from 0 to 83886080 [ 75.628674] loop0: p1 [ 76.067022] loop0: detected capacity change from 0 to 83884032 [ 76.519886] FS-Cache: Loaded [ 76.784125] Key type cifs.spnego registered [ 76.784185] Key type cifs.idmap registered [ 76.787080] CIFS: Attempting to mount //192.168.0.1/Tesladrive [ 76.893017] CIFS: decode_ntlmssp_challenge: authentication has been weakened as server does not support key exchange [ 78.023297] loop0: detected capacity change from 0 to 83886080 [ 78.023757] loop0: p1 [ 78.568262] loop0: detected capacity change from 0 to 83884032 [ 79.642716] Mass Storage Function, version: 2009/09/11 [ 79.642755] LUN: removable file: (no medium) and usb related lines: [ 4.097675] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver [ 4.097739] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 5 [ 4.115390] usb usb5: Manufacturer: Linux 6.6.75-legacy-sunxi musb-hcd [ 4.115403] usb usb5: SerialNumber: musb-hdrc.1.auto [ 20.084995] systemd[1]: Reached target usb-gadget.target - Hardware activated USB gadget.
-
Coming late to the party, but I have observed a similar thing with moderm kernels on PCduino 3 nano. To know what is happeneing, have you tried connecting to UART? That gives you more info about what is going on. Now I have trouble with the OTG port. I am unable to configure it for mass storage.
-
I am trtying to keep my pcduino 3 nano alive. It has been working perfectly under a debian bullseye distro from Johan Gunarsson for 4 years and now I can't get the OTG to work under any release (bullseye, bookworm or trixie) I have explored many avenues, but even a plain manual setup of g_mass_storage doesn't work in a workable way. The drive appears in Windows Explorer after several minutes, and any copy or delete to that gadget drive takes ages (3+ minutes for a 12kb file) before it fails or succeeds silently. I am looking for a forum where pcduino users can help each other. Thank you, Gaetano.
-
Hi Chris, when I tried to install the headers on my pcduino3nano, there were two options: linux-headers-armmp (or equivalent for your board) and kernel-headers. This secong package name was incomplete, but apt suggested a list of possible matches for my system. Give that a try. Cheers, Gaetano.
-
Thanks Werner. Meanwhile I have tried a minimal image and did not plug the ethernet cable it, the Armbian initial boot script installed the drivers and connected seamlessly to wifi. No need for the marrownr external driver, so the headers problem is no longer a problem. Now I am keeping my fingers crossed that the OTG will work (it didn't work with Johang's latest images. So I created my own using hte armbian compilation script. It doesn't have Trixie for pcduino3nano, but bookworm should work. Cheers, Gaetano.
-
Hi, this is my first post, my apologies, I could not find a matching topic category for this PCduino3 nano question/issue (no built-in wifi, I use a Roccar wifi dongle) I have successfully built the image using the armbian configuration script (bookworm current), the board boots and runs teslausb, however, I am unable to install the driver for my wifi dongle. The error when starting the install-driver.sh script is "your kernel headers are not properly installed". I tried apt install linux-headers-current-sunxi and kernel-headers-armmp, they install successfully but I still get the same error about the kernet headers not being properly installed. The drivers are for rtl88x2bu cloned from morrownr on github Any help would be appreciated Gaetano.
