The C Source, Patches and (shudder!) Bugs
Post Reply
grugrugru
Posts: 3
Joined: 23 Nov 2020, 12:44

Huawei E3531 dongle and usb otg host

Post by grugrugru » 23 Nov 2020, 12:56

Hi,
I am trying to use the huawei e3531 dongle with the STM32 microprocessor via usb otg. This means that I have to perform mode switching to switch to modem mode. I read the source code but still didn't know quite sure the steps needed to perform the mode switching operation.
In my understanding, I can perform the mode switching by these steps, please correct me if I'm wrong:
1. Perform normal enumeration
2. Send bulk data with the special operation code
3. Remove device/config/whatever descriptor from the memory
4. Perform enumeration again

Are these steps enough to switch the dongle from MSC mode to modem mode?

LOM
Posts: 1404
Joined: 11 Jul 2012, 15:14
Location: Koh Samui, TH

Re: Huawei E3531 dongle and usb otg host

Post by LOM » 24 Nov 2020, 05:37

Looks ok but:

Enumeration is usually done by the kernel (udev or hotplug) not by the user, are you sure you need to do that by yourself?

Be aware that some USB host controllers in otg mode must be forced into host mode or they may drop the USB VBus during the time your dongle is absent from the bus when it morphs.
If VBus gets dropped then your dongle will reset and come back in initial mode ie not switched.

grugrugru
Posts: 3
Joined: 23 Nov 2020, 12:44

Re: Huawei E3531 dongle and usb otg host

Post by grugrugru » 24 Nov 2020, 18:12

Enumeration is usually done by the kernel (udev or hotplug) not by the user, are you sure you need to do that by yourself?
The ST USB HOST library has its own enumeration process implementation.
I only need to reset the peripheral to get the re-enumeration process started.
Be aware that some USB host controllers in otg mode must be forced into host mode or they may drop the USB VBus during the time your dongle is absent from the bus when it morphs.
If VBus gets dropped then your dongle will reset and come back in initial mode ie not switched.
Yeah, I did see that the VBUS gets dropped but I took that part of the code out. You say that it morphs. How long does it take for the dongle to finish morphing/switching?

New Question:
I sent out the bulk message.Then, when I performed read op, the dongle sent a STALL response. Is this normal?

grugrugru
Posts: 3
Joined: 23 Nov 2020, 12:44

Re: Huawei E3531 dongle and usb otg host

Post by grugrugru » 24 Nov 2020, 20:45

Turns out I didn't convert the raw message into bytestring. Thanks for the support.

sarausa
Posts: 3
Joined: 13 Nov 2023, 05:11

Re: Huawei E3531 dongle and usb otg host

Post by sarausa » 13 Nov 2023, 05:19

You may need to adjust this code to fit your dongle's specific requirements. For example, you may need to use a different special operation code, aa route planner or you may need to perform additional steps to configure the dongle for modem mode.

musicallydown1
Posts: 1
Joined: 13 Dec 2023, 09:59
Contact:

Re: Huawei E3531 dongle and usb otg host

Post by musicallydown1 » 13 Dec 2023, 10:02

Musically Down Tiktok primary feature was its ability to download TikTok videos effortlessly. Users could simply input the TikTok video link into Musically Down, and the platform would generate a downloadable file, making it convenient for users to save and share content.

Also Check:

https://rentry.co/vf6ch
https://www.gamespot.com/profile/musica ... /26154205/
https://www.docdroid.net/SFZ1LgG/untitl ... ent-2-docx
https://qiita.com/musicallydown1/items/ ... 194117f910
https://coda.io/publish-preview/pGIyfxF ... hMode=Play
https://www.bloglovin.com/@musicallydow ... into-world
https://www.theodysseyonline.com/a-musi ... ia?draft=1

Post Reply