Serial communication not working unless Serial monitor is opened/closed

Post here first, or if you can't find a relevant section!
GonzoG
Posts: 403
Joined: Wed Jan 15, 2020 11:30 am
Answers: 27
Location: Prudnik, Poland

Re: Serial communication not working unless Serial monitor is opened/closed

Post by GonzoG »

TurboTimmy wrote: Wed Dec 29, 2021 5:45 pm
ag123 wrote: Wed Dec 29, 2021 5:43 pm select HID for your keyboard
Ok, so that would mean using 2 USB cables wouldn't it? Or could I use dongle to do both the HID part, and the serial? I'll give that a go and see what happens :D
Yes, it means using 2 USB cables.
For now, there's no easy way of using keyboard and serial on USB interface.
ag123
Posts: 1668
Joined: Thu Dec 19, 2019 5:30 am
Answers: 25

Re: Serial communication not working unless Serial monitor is opened/closed

Post by ag123 »

messing with USB is a challenge 'beyond *duino*', if you really wanted to go the distance, you could give it a try. it probably is a whole large project on its own ;)
it takes being very familiar with ST's USB driver stack and the hardware and being very familiar with USB protocols as well.
TurboTimmy
Posts: 22
Joined: Wed Dec 22, 2021 9:43 pm

Re: Serial communication not working unless Serial monitor is opened/closed

Post by TurboTimmy »

GonzoG wrote: Wed Dec 29, 2021 5:48 pm
TurboTimmy wrote: Wed Dec 29, 2021 5:45 pm
ag123 wrote: Wed Dec 29, 2021 5:43 pm select HID for your keyboard
Ok, so that would mean using 2 USB cables wouldn't it? Or could I use dongle to do both the HID part, and the serial? I'll give that a go and see what happens :D
Yes, it means using 2 USB cables.
For now, there's no easy way of using keyboard and serial on USB interface.
In that case, the project is well and truly over. :( I cannot take up 2 USB ports with this. The only way around it might be to use a USB hub in the build but I am not overly keen on that option.

I can get the Arduino Pro Micro to do all of this just using the 1 usb port. I thought it might also be possible with this STM board. It's a shame as this board is so much faster.
TurboTimmy
Posts: 22
Joined: Wed Dec 22, 2021 9:43 pm

Re: Serial communication not working unless Serial monitor is opened/closed

Post by TurboTimmy »

ag123 wrote: Wed Dec 29, 2021 5:49 pm messing with USB is a challenge 'beyond *duino*', if you really wanted to go the distance, you could give it a try. it probably is a whole large project on its own ;)
it takes being very familiar with ST's USB driver stack and the hardware and being very familiar with USB protocols as well.
That is a million light years away from my skill level, so I think this project is dead and burried. It's a shame because it is so very close to being perfect. Actually this build was the reason I got the STM board in the first place. I cant thank you enough for the help that you have given me with this, and also GonzoG.
ag123
Posts: 1668
Joined: Thu Dec 19, 2019 5:30 am
Answers: 25

Re: Serial communication not working unless Serial monitor is opened/closed

Post by ag123 »

messing with usb is one of a 'biggest challenge' playing with stm32, you can map all the 'impossible' scenarios, and make all the 'possible' usb devices, it can turn into 'anything' (keyboards, mouse, serial, modems, ethernet, wifi, audio, video, sd card adapter, etc ... the list goes on), there are 'rewards' going the distance, but it won't be a 'small thing'.
for the problem at hand, using 2 usb ports is probably an 'easiest' way for now.
Post Reply

Return to “General discussion”