Generally create USB->RS232 driver

hrust_ray

Neuer User
Mitglied seit
11 Jan 2007
Beiträge
133
Punkte für Reaktionen
0
Punkte
0
Hi.
I want to connect KundenDisplay via USB->RS232 converter.
I'v read many topics here, but all I fount - it is necessary to compile firmware.
As I'm complete newbi in linux, for me will be much easer to get this driver as *.o module, that I can store it to USB disk and use it, when I need to send something via RS232.
On driver disk for my converter I have some source codes for linux. Is it possible to compile this SS to *.o file and then use it?
Sorry that I'm rising this topic again - I read all on this forum, maybe I missed something because of my not perfect german.

Thnx
 
If you have the source code for your driver, it should be possible to compile it and load it as a module.

You must make sure that you create a module for the correct version of the kernel in your firmware, and you need a cross compiler for mips.

With ds-mod you have a complete cross compiler tool chain. You can use it to create your kernel module, even if you don't intend to use the ds-mod firmware.
 
ds-mod is it a compiler with source codes of firmware?
Can I download it from somewere?
 
ds-mod for new firmwares based on Kernel 2.6.

ds-mod is a set of tools to modify and extend the original firmware. It contains the tools to compile user space programs, the kernel and kernel modules. It also contains make-files for various programs that can be compiled to run on the box.

You will need a linux system (real or inside a virtual machine) and an internet connection. The script will download the tools (compiler/linker) and sources for various packages. In your case the sources for the AVM kernel is the most important one.

ds-mod is normally used to create a replacement firmware, but you can also only use the tools to produce some binaries to run on the box.
 
Thnx for info.
Virtual PC I got.
What Linux variant U can recommend to install?
 
Ohhh.
I have now KUBUNTU Linux running on VMWare.
But Its really dificcult to understand how to compile module.
Also I found that on CD I have drivers *.c files only for RedHat7, RedHat8 and RedHat9.
My linux PC says that for my device this driver is used: uhci_hcd.o
I searched for this file on my HD - no such file.
Can I simply download such file?
Or maybe somebody has this file?

Thnx for your time
 
Ok, I have stinky-linux on VMWare.
Can i find driver for USB->RS232 in this linux installation?
I made search - not found :(
 
We need more informations about your USB-to-RS232-Converter.

Greets Oliver
 
Manufacture name is "XCS"
On Window XP
comport name is "USB-SERIAL CH340"
Driver provider "wch.cn"
Driver file details: "CH341PT.dll, CH341SER.sys"

I think in linux driver name should be CH341
 
This is a patch against linux-2.6.22. The FritzBox uses linux-2.6.13.1, which is a few years older. Especially the USB support was modified significantly since then. It is possible but unlikely that this driver will work with the old kernel.
 
"Patch" and "Driver" - is it the same?
Driver is compiled inside kernel or can be compiled as stand alone module?
 
I have idea - if somebody uses Usb->Serial converter, maybe U can share your module file for me?
Maybe if I try several ones, some can work for me.
Because I dont need some high speeds and so on - I need only basic function on speed 9600.
 
Thanx a LOT!!!
This evening I'l try them.

One more question.
As I understand I should use "insmod" to activate this driver.
"insmod driverpath/drivername". Is it correct?
And how "echo" command should look like? "echo > comX" ?
 
I tried all modules. Seems not works or I'm doing wrong.
this is content of /dev/ folder.
airprime.ko empeg.ko ipaq.ko kobil_sct.ko usbserial.ko
belkin_sa.ko ftdi_sio.ko ipw.ko mct_u232.ko visor.ko
cp2101.ko garmin_gps.ko ir-usb.ko omninet.ko whiteheat.ko
cyberjack.ko hp4x.ko keyspan.ko pl2303.ko
cypress_m8.ko io_edgeport.ko keyspan_pda.ko safe_serial.ko
digi_acceleport.ko io_ti.ko kl5kusb105.ko ti_usb_3410_5052.ko
I tried echo command with all 'tty*' and 'usb*' modules - no reaction

Then I tried insmod with different modules, provided by heini66:
# insmod /var/tmp/usbserial.ko -v
insmod: cannot insert `/var/tmp/usbserial.ko': Success (17): Success
# insmod /var/tmp/ti_usb_3410_5052.ko -v
insmod: cannot insert `/var/tmp/ti_usb_3410_5052.ko': Success (2): Success
# insmod /var/tmp/safe_serial.ko -v
insmod: cannot insert `/var/tmp/safe_serial.ko': Success (2): Success
# insmod /var/tmp/pl2303.ko -v
insmod: cannot insert `/var/tmp/pl2303.ko': Success (2): Success
# insmod /var/tmp/keyspan.ko -v
insmod: cannot insert `/var/tmp/keyspan.ko': Success (2): Success
# insmod /var/tmp/io_ti.ko -v
insmod: cannot insert `/var/tmp/io_ti.ko': Success (2): Success
# insmod /var/tmp/mct_u232.ko -v
insmod: cannot insert `/var/tmp/mct_u232.ko': Success (2): Success

content of /dev/ was not changed.
How can I see that module was inserted successfully? New device will appear in /dev/ ?
 
You can check with "lsmod". But there is another problem because no module is loaded correctely. Check "dmesg" why this problem occurs.

Greets Oliver
 
lsmod shows:
# lsmod
Module Size Used by Tainted: P
tiap 471344 0
usbserial 28320 0
kdsldmod 540160 2
usbahcicore 25616 0
usbcore 113232 3 usbserial,usbahcicore
isdn_fbox_fon4 896960 0
ubik2 69168 1 isdn_fbox_fon4
tiatm 107712 1 ubik2
Piglet 9312 0

I see usbserial is in list.
How can I find device, that uses usbserial module?
 
Holen Sie sich 3CX - völlig kostenlos!
Verbinden Sie Ihr Team und Ihre Kunden Telefonie Livechat Videokonferenzen

Gehostet oder selbst-verwaltet. Für bis zu 10 Nutzer dauerhaft kostenlos. Keine Kreditkartendetails erforderlich. Ohne Risiko testen.

3CX
Für diese E-Mail-Adresse besteht bereits ein 3CX-Konto. Sie werden zum Kundenportal weitergeleitet, wo Sie sich anmelden oder Ihr Passwort zurücksetzen können, falls Sie dieses vergessen haben.