Trying to open a serial COM port

Started by Tinine, November 21, 2023, 15:22:10

Previous topic - Next topic

Tinine

But I get the error: SERIALFS: CreateFile() failed (2) and I can't seem to find a list of error codes 

This is using the example in the reference.  :(


J7M

I had a look to the source code of SB. The "2" in "SERIALFS: CreateFile() failed (2)" is the Windows error code returned by GetLastError() : https://learn.microsoft.com/en-us/windows/win32/debug/system-error-codes--0-499- Error 2 is "ERROR_FILE_NOT_FOUND". I had a while ago the problem, when I wanted to access COM4, I had to write in SB COM3 (or was it COM5? I don't remember anymore).

J7M

I checked, what SB is doing. It seems, that the bug is still there. If you want to open COMx, you have to write in SB COM(x+1). If you can confirm this, I will fix it.

Tinine

That appears to work....It doesn't complain at either 19200 or 460800. Later this morning, I will attach a microcontroller and confirm that we have good, solid communications.

Many thanks @J7M  8)

Tinine

#4

Quoteopen "COM6:1800000" as # 1    ' Open COM5 @1.8MBAUD

I can confirm that this is the problem. For COM5, I need to nominate COM6.

Communicating beautifully with the MicroMite BASIC interpreter on the "Armmite F4"

PC talking to Armmite F4 (manual)




J7M

Great to hear. I'll fix the COM-number bug.