USB-GPIO-Adapter mit Linux OpenSource-Treiberunterstützung?

Gast #5250248
Lesenswert?

MCP2221. Hat UART, I2C und Die GPIO, die wahlweise Input, Output, ADC 
oder DAC sein können. Gibts im DIL-Gehäuse, kannst Du Dir ganz einfach 
auf einer Lochrasterkarte zusammenbauen. Über I2C kannst Du dann auch 
noch weitere ADCs, DACs, Portextender, LED-Treiber, Displays und was 
auch immer anschließen. Für den I2C-Port des MCP2221 liefert Microchip 
einen Linux-Kernel-Treiber, mit dem sich der Port wie andere I2C-Ports 
ansteuern lässt.

fchk
OP #5250251
Lesenswert?

Danke fürs Feedback. Also beim Arduino müsste ich wohl erst ein Programm 
schreiben (C/C++), welches zwischen RS232- und GPIO-Port weiterleitet?

Ist ein wenig zu aufwändig momentan, da die Zeit fehlt. Was ich suche 
ist eher sowas, was man am Compi oder Laptop über USB verbinden kann. 
Ohne grosse "Übungen" (wie Kernel-Treiber-Module zu kompilieren und so) 
sollte dann der USB-to-GPIO-Adapter unter /sys/class/gpio/ sichtbar 
werden. Sollte also von Linux schon von Grund auf unterstützt werden, 
falls möglich ab Kernel 2.4 oder 2.6...

Ich verwende zwar momentan Kernel 3.16, es wäre aber nur von Vorteil 
wenn auch kleinere Kernel-Versionen unterstützt würden. Dann ist der 
Treiber bei Kernel 3.x oder 4.x sicher einigermassen ausgereift..
OP #5250254
Lesenswert?

Gast #5250259
Lesenswert?

1
bingo@bingo-pc2:~$ lsusb
2
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
3
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
4
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
5
Bus 005 Device 002: ID 04d8:000a Microchip Technology, Inc. CDC RS-232 Emulation Demo
6
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
7
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
8
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
9
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
10
Bus 009 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
11
Bus 008 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
12
bingo@bingo-pc2:~$
OP #5250275
Lesenswert?

Gast #5250283
Lesenswert?

User J. schrieb:
> Ist die Konsolenausgabe von einem "Raspi" ?

oben: nein, aber jetzt:
1
pi@pi-one:~$ lsusb
2
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
3
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
4
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
5
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
6
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
7
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
8
Bus 002 Device 003: ID 04d8:000a Microchip Technology, Inc. CDC RS-232 Emulation Demo
9
Bus 002 Device 002: ID 214b:7000  
10
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
11
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
12
pi@pi-one:~$ ls -l /dev/ttyA*
13
crw-rw---- 1 root dialout 166, 0 Dez 20 18:37 /dev/ttyACM0
14
pi@pi-one:~$
Gast #5250292
Lesenswert?

User J. schrieb:
> Wie gesagt such ich sowas wie das ->
> 
http://ch.farnell.com/texas-instruments/usb-to-gpio/usb-schnittstellen-adapter-eval/dp/1901883?mckv=LsZ9k1pm_dc|pcrid|90940810960|&gross_price=true&CATCI=pla-18283950120&CAAGID=18061213600&CMP=KNC-GCH-GEN-SHOPPING-German&CAGPSPN=pla&gclid=EAIaIQobChMIk_fBrIyZ2AIVpwrTCh1JTgiLEAQYAiABEgJtKvD_BwE&CAWELAID=120185710000038537
>
> Hat jemand Erfahrung mit dem Teil? Linux-kompatibel?

Vermutlich (eher ziemlich sicher): nein

Lies mal das Data sheet, auf S.25 steht:
1
The adapter solution includes a set of PC libraries and a GUI that can be used to allow
2
PC applications access to the adapter and target devices that the adapter supports.
3
The GUI and PC libraries are designed using the Microsoft® .NET Framework, in order
4
to leverage as many standard libraries as possible. As previously described in this
5
document, the adapter presents itself as a USB HID to Windows. Because of this, no
6
custom driver is required, and the application software on the PC can use the standard
7
Microsoft Windows USB driver (usbhid.sys).

:(  :(  :(
OP #5250321
Lesenswert?

Evtl. sowas?
-> 
https://numato.com/product/8-channel-usb-gpio-module-with-analog-inputs

Läuft auch über RS232 und wird darüber angesprochen.

Wenn ich das verhindern möchte (Opensource-Treiber und entsprechende HW 
welche ohne Umweg über USB-RS232 die Signale sendet - nur direkt über 
USB und dann unter /sys/class/gpio/ was einbindet... aber sowas gibt's 
wahrscheinlich gar nicht?), dann müsste ich wohl ne PCI- oder 
PCIe-Steckkarte verwenden... na ja, aber das kostet dann meist ein paar 
hundert Euro oder so.
OP #5250324
Lesenswert?

Eine Alternative, um auf die Schnelle was (nicht-zeitkritisch) 
anzusteuern?
-> 
http://www.tronisoft.com/shop/rs232-io-board/rs232-data-acquisition-board/rs232-to-io-dacio-300.html

Läuft ebenfalls über RS232, die C#-Quelltexte (Download auf der Seite) 
welche Signale nach RS232 senden lassen könnte ich auch umschreiben für 
Linux.. viele GPIO-Projekte etwa für das Rapsi verwenden "NodeJS"
OP #5250332
Lesenswert?

Vielen Dank! :) Abesehen davon dass das Teil offen ist, ist so weit 
alles gut..

Am liebsten hätte ich sowas wie nen USB-Stick, wo ein paar farbige Kabel 
raushängen. Gibt's aber wahrscheinlich nicht..:(

Perl? Ist doch irgendwie ähnlich wie PHP von der Sprache her. 
(prozedurale Variante, oder gibt heutzutage OO bei Perl?) PHP ist 
natürlich web-lastiger. Habe das noch so in Erinnerung, ca. 12 Jahre her 
das letze Mal mit perl..

Antwort schreiben

Bitte melde dich an, um einen Beitrag zu schreiben.

oder

Mit Google-Account einloggen

Die Registrierung ist kostenlos und dauert nur eine Minute.

Jetzt registrieren