-
Notifications
You must be signed in to change notification settings - Fork 441
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ardSerial.py suggestion #88
Comments
We removed the AMA0 because querying AMA0 will lead to a dead thread when
sending handshaking signals.
The new BiBoard will have an independent serial port to communicate with
Pi, so ttyS0 should always work. I'd keep the current code.
…On Wed, Jun 26, 2024 at 1:40 AM Reid Graves ***@***.***> wrote:
From lines 673 to 699 in ardserial.py:
def showSerialPorts(allPorts):
# currently an issue in pyserial where for newer raspiberry pi os
# (Kernel version: 6.1, Debian version: 12 (bookworm)) or ubuntus (22.04)
# it classifies the /dev/ttyS0 port as a platform port and therefore won't
be queried
# pyserial/pyserial#489 <pyserial/pyserial#489>
if os.name == 'posix' and sys.platform.lower()[:5] == 'linux':
extra_ports = glob.glob('/dev/ttyS*')
for port in extra_ports:
if port not in allPorts:
allPorts.append(port)
for item in allPorts:
if 'AMA0' in item:
allPorts.remove(item)
allPorts = deleteDuplicatedUsbSerial(allPorts)
for index in range(len(allPorts)):
logger.debug(f"port[{index}] is {allPorts[index]} ")
print("\n*** Available serial ports: ***")
print(*allPorts, sep = "\n")
if platform.system() != "Windows":
for p in allPorts:
if 'cu.usb' in p:
print('\n* Manually connect to the following port if it fail to connect automatically\n')
if config.useMindPlus:
print(p.replace('/dev/',''),end='\n\n')
else:
print(p, end='\n\n')
I suggest removing:
for item in allPorts:
if 'AMA0' in item:
allPorts.remove(item)
I had to remove this to get ardserial to work, as port /dev/ttyS0 doesn't
work for me, however, ttyAMA0 is available, but this line loop removes the
possibility of connecting to it
—
Reply to this email directly, view it on GitHub
<#88>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACKLZGGUEZLWWCZ4BW5PEP3ZJGTQ5AVCNFSM6AAAAABJ4J642WVHI2DSMVQWIX3LMV43ASLTON2WKOZSGM3TGMRWHE2TMNQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
--
~~
Rongzhong Li, PhD
http://borntoleave.github.io
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
From lines 673 to 699 in ardserial.py:
def showSerialPorts(allPorts):
# currently an issue in pyserial where for newer raspiberry pi os
# (Kernel version: 6.1, Debian version: 12 (bookworm)) or ubuntus (22.04)
# it classifies the /dev/ttyS0 port as a platform port and therefore won't be queried
# pyserial/pyserial#489
if os.name == 'posix' and sys.platform.lower()[:5] == 'linux':
extra_ports = glob.glob('/dev/ttyS*')
for port in extra_ports:
if port not in allPorts:
allPorts.append(port)
for item in allPorts:
if 'AMA0' in item:
allPorts.remove(item)
I suggest removing:
for item in allPorts:
if 'AMA0' in item:
allPorts.remove(item)
I had to remove this to get ardserial to work, as port /dev/ttyS0 doesn't work for me, however, ttyAMA0 is available, but this line loop removes the possibility of connecting to it
The text was updated successfully, but these errors were encountered: