Comments (3)
adapters are directly connected to pi usb ports. I tested trendnet https://www.amazon.com/TRENDnet-Converter-Installation-Universal-TU-S9/dp/B0007T27H8/ref=sr_1_3 and another brand both didn't list serial.
from consolepi.
Yes, this is a known issue with some serial adapters. Most of the adapters based on the FTDI chips seem to have serial #s but we've found plenty that don't. This is especially a pain when using a pigtail adapter (single USB on one-side 4 serial pig-tails on the other).
That piece is not required, it's used to set unique aliases mapped to specific adapters so rather then the first-come first serve use of /dev/ttyUSB0 ... ttyUSB1 and so on. That specific adapter would be mapped to an alias say /dev/blue1 or /dev/flr1_idf1_switch the alias can be whatever you want it just needs to match between the 2 files involved.
There are a couple of options when the serial # isn't populated.
-
Use other attributes or fewer attributes if there is no fear of conflict. i.e. if this is the only adapter you intent to use with idVendor: 1a86, and idProduct: 7523 then you can manually configure the udev rule to include only those attributes. The other option is to do the mapping based on the specific usb port, which will work, but only if the adapter is always plugged into the same port (still work if a hub is in place, you just need to get the address then always plug everything in the same way).... Unfortunately I don't recall enough to provide more on that, it's been too long, and I don't have need for that method... but it's possible, google something like 'udev rules based on physical port'
-
Don't use the predictable ports at all. If you only have 1 or maybe 2 (technically you can have more) adapters you expect to ever use, then they will still be available via TELNET starting at TELNET port 8001. If you have more than 1 there is a chance they could flip on reboot, I've never tried it as I've always had mine mapped, but that was the reason I built the mapping in the first place was to make it completely predictable. It will still work without it. Also if you ssh to ConsolePi and type consolepi-menu you'll have a menu that lists all the local adapters (as well as remote adapters), however the udev aliases are handy in the menu as well... If an alias is set I use the alias to describe the connection in the menu.
The 2 files that are involved are
/etc/udev/rules.d/10-ConsolePi.rules This is where mapping rules are configured. It's where the alias is made for a specific adapter based on unique attributes, that alias is then used in the definition in ser2net.conf to map the TELNET port.
A row in that file looks like this:
SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="AREDACT89", SYMLINK+="Blue1_7001"
You can still do a mapping if you have other attributes that will be unique, or by using fewer attributes if you don't expect other adapters you might use would be in conflict.
To aid in figuring out what attributes you might be able to use a log file was created in
"/var/log/ConsolePi/consolepi-addudev.error"
when the consolepi-addconsole kicked back the error.
If you find attributes you can use and configure the udev file manually, the SYMLINK (Blue1_7001 in the example) needs to match the row defining the TELNET connection in /etc/ser2net.conf
7001:telnet:0:/dev/Blue1_7001:9600 8DATABITS NONE 1STOPBIT banner
Note definitions in the 800x range already exist for the non alias locations '/dev/ttyUSB0'... So both of them will work, and the default will work with or without an alias
I want to add a list of adapters somewhere on this repo... so I'll add the trendnet so I know to stay away from it. I found 1 in my stash that doesn't have a serial programmed, but all my others do (most are based on FTDI chips).
Will Close this - as it's not an issue with ConsolePi, but a known limitation with some adapters. Will add building a page with more details on this issue and the options to my todo list. Also an option in the addconsole script to notify you and give you the option to map it automatically based on the port it's plugged into. <-- Not anytime soon on either unfortunately, mdns discovery, as well as improving DHCP based discovery is consuming most of my cycles at the moment.
from consolepi.
Thanks, great info, I'll definitely put it to good use. Before I learned of ConsolePi I setup a usb hub with multiple serial adapters and ser2net and found a handy guide that walked through setting up the udev stuff based on physical port mapping and aliases (like you mentioned) so I might do something similar here in ConsolePi. Thanks again for all your work!
Mike
from consolepi.
Related Issues (20)
- Single Command Install Script Failing Install HOT 4
- ValueError on 'Launching ConsolePi Serial Console Menu' HOT 2
- Feature request: ports & devices encoded in SSH username HOT 14
- TypeError when adding console HOT 2
- AttributeError when renaming device HOT 2
- Include drivers for Aruba 9000 Series gateway series HOT 4
- FTDI missing serial numbers HOT 2
- consolepi-mdnsreg failed HOT 6
- Custom baud rates for different serial consoles? HOT 1
- Latest RaspberryPi OS uses incompatible python version HOT 1
- Cannot change Hotspot SSID HOT 2
- Menu will not load HOT 3
- ipv4.ip_forward not persisting HOT 4
- Installation fails on Pi 1B Buster HOT 2
- Integration of serial ports ttySC0 + ttySC1 to local serial adapter list? HOT 4
- zero 2 W Install hung up HOT 2
- Aliases take over serial port names HOT 5
- Install errors out HOT 3
- Error HASH not match from the requirements file
- Hardware-Serial via PCI not detected.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from consolepi.