QB64.org Forum
Active Forums => QB64 Discussion => Topic started by: GTC on January 14, 2021, 08:30:57 pm
-
@Fellippe
Regarding:
QB64 can open any COMn port number from 1 to 9.
This is my request that the upper limit of 9 ports be replaced with Windows' own limit of 255.
These days, plug-n-play hubs, etc, create port numbers above 9 and QB64's artificial limit of 9 is a nuisance.
Thanks.
-
Hi there.
@luke added an issue to the repository (https://github.com/QB64Team/qb64/issues/99) with the reported COM problem of your previous post. I believe he'll be able to see if this is feasible as well.
Thanks for your input!
-
Thanks Fellippe. Would you kindly flag this to his attention.
-
I'm opening ports higher than 9 without problem.
OPEN "COM" + port$ + ":9600,N,8,1,BIN,CS0,DS0" FOR RANDOM AS #1
where port$ can be 30+ on my laptop. I wrote a small routing for checking openable ports from 1 to 255 without problems
-
I'm opening ports higher than 9 without problem.
OPEN "COM" + port$ + ":9600,N,8,1,BIN,CS0,DS0" FOR RANDOM AS #1
where port$ can be 30+ on my laptop. I wrote a small routing for checking openable ports from 1 to 255 without problems
What OS are you using?
I'm using Win 7 and it gives me error 68 (device unavailable) if I go over 9. OK for 9 and under.
EDIT: Case in point -- I added a PCI-type dual serial port to my tower PC. The driver/Windows designated the new ports as COM11 and COM12. QB64 gave me error 68 on those so I had to use Device Manager to renumber those ports to COM2 and COM4, whereupon QB64 was happy.
This may be another manifestation of my other report about COM ports -- now classified on GitHub as a bug.
-
I'm running Win 8.1 with QB V1.4. I can have 2 x USB to RS232 and 1 USB to RS485 on COM9, 11 & 12 without problem. I have just tried re-assigning the COMs to lower numbers and my program no longer detects them. I've got another laptop here running (don't laugh!) Vista. I'll try it out later and see what happens on there.
-
I've just tried it on Win Vista (stop sniggering, I can hear you all!) and QB1.5. I installed a USB to RS232 adaptor (I had forgotten just how awkward Vista is with that sort of thing) and it was auto assigned COM15. I ran my program which normally auto finds usable ports and it failed to find it. I reassigned it to COM2 and it still didn't find it (error 68) so I'm not sure if it's a QB problem or my program. I'll have to do a bit more playing around and see whats going on
-
I've got another laptop here running (don't laugh!) Vista.
I've got tower PCs with Win 3.1, 95, 98 and XP. Not sure how boot-able they all are.
My lifelong procedure has been never to update Windows in place, but to buy a new PC with the latest version on it already.
I sat on XP for as long as possible and now I'm sitting on on 7 64-bit. I hated what I saw with 8 and I like 10 even less.
(BTW: Scuttlebut is that MS considers Windows development a money-losing thing nowadays and some pundits posit that they -- or some MS partner -- may port the GUI to some form of Unix.)
-
[...] I'm not sure if it's a QB problem or my program. I'll have to do a bit more playing around and see whats going on
I get the impression that COM port handing within QB64 is brittle. As mentioned, an associated bug report is on GitHub.
Thanks for the tests!
-
I'd like to work on this but I'm in the rather awkward position of not having the physical hardware to test with.
Can anyone recommend a software stack for setting up a COM port and connecting it to, say, a virtual modem or similar? Preferably a program that I can connect to with varying stop bits, baud rates etc.