USB Modem (CDC)

Post here first, or if you can't find a relevant section!
Post Reply
bobemoe
Posts: 10
Joined: Sun May 30, 2021 11:43 am

USB Modem (CDC)

Post by bobemoe »

I am working on a project that uses the WeAct V3.0 BlickPill STM32F411CE with ArduinoIDE and https://github.com/stm32duino/BoardManagerFiles which is connected to a PCB and working just fine. Most of the IO pins are in use. We have almost 100 of these PCBs and have now come to the point where we want to add connectivity to them.

I am trying to work out if it is possible to connect a 3G dongle to the USB port of the BlickPill so we don't need to make hardware changes to all the existing boards.

The 3G dongle we have for testing, presents itself to Linux as a GSM modem (ttyUSB0, ttyUSB1, ttyUSB2, ttyUSB3), and a USB Mass Storage device (sdb). I confirm /dev/ttyUSB0 responds OK to AT command.

From my research I believe the STM32 needs to be running in Host mode and enumerate the dongle's MSC and CDC to find the correct CDC serial port.

I've read this is possible in CubeMX. I've also read that although the USB Host libs are included in stm32duino, that the CDC and MSC functionality is not fully implemented.

I've also seen lots of PR's going on over on GitHub working on enumeration, CDC and MSC. A lot of them have been merged so maybe this is getting close? A lot of issues asking about HID and MSC devices remain unsolved. I could not find any confirmation of this working or any working examples.

My question is does this sound feasible? Even if I get a CDC serial stream, I'd also need some library to allow me to connect, and preform HTTP PUT/GET that will use the CDC? Can anyone point me in the right direction for this?

Are we better off just scraping the existing boards and making a new version with a GSM modem on board? We would rather not do this as we hand etch the boards and would be weeks of work! I'd really like a solution that could just be plug and play with a firmware update ;)

Any thoughts?

Many thanks :D
Post Reply

Return to “General discussion”