Pl2303 on DSM 4.0

All discussions/development regarding the Intel D510 Chip can be placed here.
condor
Rookie
Rookie
Posts: 38
Joined: Mon Apr 23, 2012 1:51 am
Location: New York, USA

Re: Pl2303 on DSM 4.0

Postby condor » Tue Mar 26, 2013 12:27 am

Eduardo wrote:Updated to 4.2 - 3202. Compiled and working serial to USB drivers.
X86- Pineview. pl2303, ftdi_sio, cp210x.Checked ftdi ones only.

https://www.dropbox.com/s/9q74k4gcd5lq5 ... neview.rar

Thanks for posting the compiled drivers Eduardo.

I tried to use the pl2303 driver on my DS1511+ running DSM v4.2-3202 and I get the following when I try to install it:

Code: Select all

DiskStation> insmod /lib/modules/pl2303.ko
insmod: can't insert '/lib/modules/pl2303.ko': unknown symbol in module, or unknown parameter
DiskStation>

Any ideas?
DS1511+ / 3GB RAM / DSM 5.2-5967-2 / 5 x WD Red 3TB (SHR1)
DX510-1 / 5 x WD Red 3TB (SHR1)
DX510-2 / 5 x WD Red 3TB (SHR1)

USB-Disk1 Silicon Image 5744 2TB (RAID0)
USB-Disk2 Silicon Image 5744 2TB (RAID0)
USB-Disk3 JMicron JMB393 10TB (RAID5) via JMS539 USB-SATA Bridge

APC SU1000RM via pl2303 USB-Serial Cbl
Asterisk, Audio Stn, Cloud Stn, DHCP Svr, Directory Svr, DNS Svr, Download Stn, Mail Svr, Mail Stn, Media Svr, Perl, phpMyAdmin, Photo Stn, Surveillance Stn, Syslog Svr, Video Stn
Eduardo
Novice
Novice
Posts: 47
Joined: Wed Nov 07, 2012 3:20 pm
Location: Spain

Re: Pl2303 on DSM 4.0

Postby Eduardo » Tue Mar 26, 2013 2:18 am

condor wrote:
Eduardo wrote:Updated to 4.2 - 3202. Compiled and working serial to USB drivers.
X86- Pineview. pl2303, ftdi_sio, cp210x.Checked ftdi ones only.

https://www.dropbox.com/s/9q74k4gcd5lq5 ... neview.rar

Thanks for posting the compiled drivers Eduardo.

I tried to use the pl2303 driver on my DS1511+ running DSM v4.2-3202 and I get the following when I try to install it:

Code: Select all

DiskStation> insmod /lib/modules/pl2303.ko
insmod: can't insert '/lib/modules/pl2303.ko': unknown symbol in module, or unknown parameter
DiskStation>

Any ideas?


Hi condor,

It's working here. Please, try to insmod usbserial.ko and then ftdi_sio.ko and pl2303.ko
condor
Rookie
Rookie
Posts: 38
Joined: Mon Apr 23, 2012 1:51 am
Location: New York, USA

Re: Pl2303 on DSM 4.0

Postby condor » Thu Mar 28, 2013 12:56 pm

Eduardo wrote:Hi condor,

It's working here. Please, try to insmod usbserial.ko and then ftdi_sio.ko and pl2303.ko

Thanks for the reply Eduardo. I received a similar suggestion in a PM from lebowitz, who also sent me the compiled drivers as well.

There was already a usbserial.ko driver in /lib/modules so apparently Synology has started including this driver with the release of DSM 4.2-3202. When I tried only installing the pl2303.ko driver I received the insmod message I posted earlier and also observered the following entries in dmesg:

Code: Select all

DiskStation> insmod /lib/modules/pl2303.ko
insmod: can't insert '/lib/modules/pl2303.ko': unknown symbol in module, or unknown parameter
DiskStation>

DiskStation> dmesg | tail -n11
[309863.390930] pl2303: Unknown symbol usb_serial_handle_sysrq_char (err 0)
[309863.398204] pl2303: Unknown symbol usb_serial_disconnect (err 0)
[309863.404787] pl2303: Unknown symbol usb_serial_generic_close (err 0)
[309863.411582] pl2303: Unknown symbol usb_serial_suspend (err 0)
[309863.417891] pl2303: Unknown symbol usb_serial_handle_dcd_change (err 0)
[309863.425130] pl2303: Unknown symbol usb_serial_handle_break (err 0)
[309863.431747] pl2303: Unknown symbol usb_serial_generic_submit_read_urb (err 0)
[309863.439266] pl2303: Unknown symbol usb_serial_probe (err 0)
[309863.445240] pl2303: Unknown symbol usb_serial_register (err 0)
[309863.451439] pl2303: Unknown symbol usb_serial_deregister (err 0)
[309863.457827] pl2303: Unknown symbol usb_serial_resume (err 0)
DiskStation>

I then tried renaming the Synology usbserial.ko file and replacing it with the recompiled usbserial.ko. After doing this I was able to insmod both usbserial.ko and pl2303.ko.

Code: Select all

DiskStation> dmesg | tail
[309863.445240] pl2303: Unknown symbol usb_serial_register (err 0)
[309863.451439] pl2303: Unknown symbol usb_serial_deregister (err 0)
[309863.457827] pl2303: Unknown symbol usb_serial_resume (err 0)
[313939.299044] usbcore: registered new interface driver usbserial
[313939.305358] usbserial: USB Serial Driver core
[313975.334383] USB Serial support registered for pl2303
[313975.339913] pl2303 7-2:1.0: pl2303 converter detected
[313975.357220] usb 7-2: pl2303 converter now attached to ttyUSB0
[313975.363961] usbcore: registered new interface driver pl2303
[313975.370067] pl2303: Prolific PL2303 USB to serial adaptor driver
DiskStation>

These are the same messages I saw when I installed these drivers under DSM 4.1 so I assume that the install was successful.

I am using an older APC UPS with a USB-to-Serial cable (pl2303). Unfortunately Synology has also changed the UPS NUT drivers with DSM 4.2 so I haven't been able to get my UPS to be recognized yet. Hopefully I'll be able to figure it out again.

Thanks again for your help. Thanks to lebovitz too!
DS1511+ / 3GB RAM / DSM 5.2-5967-2 / 5 x WD Red 3TB (SHR1)
DX510-1 / 5 x WD Red 3TB (SHR1)
DX510-2 / 5 x WD Red 3TB (SHR1)

USB-Disk1 Silicon Image 5744 2TB (RAID0)
USB-Disk2 Silicon Image 5744 2TB (RAID0)
USB-Disk3 JMicron JMB393 10TB (RAID5) via JMS539 USB-SATA Bridge

APC SU1000RM via pl2303 USB-Serial Cbl
Asterisk, Audio Stn, Cloud Stn, DHCP Svr, Directory Svr, DNS Svr, Download Stn, Mail Svr, Mail Stn, Media Svr, Perl, phpMyAdmin, Photo Stn, Surveillance Stn, Syslog Svr, Video Stn
Eduardo
Novice
Novice
Posts: 47
Joined: Wed Nov 07, 2012 3:20 pm
Location: Spain

Re: Pl2303 on DSM 4.0

Postby Eduardo » Thu Mar 28, 2013 5:30 pm

condor wrote:
Eduardo wrote:Hi condor,

It's working here. Please, try to insmod usbserial.ko and then ftdi_sio.ko and pl2303.ko

Thanks for the reply Eduardo. I received a similar suggestion in a PM from lebowitz, who also sent me the compiled drivers as well.

There was already a usbserial.ko driver in /lib/modules so apparently Synology has started including this driver with the release of DSM 4.2-3202. When I tried only installing the pl2303.ko driver I received the insmod message I posted earlier and also observered the following entries in dmesg:

Code: Select all

DiskStation> insmod /lib/modules/pl2303.ko
insmod: can't insert '/lib/modules/pl2303.ko': unknown symbol in module, or unknown parameter
DiskStation>

DiskStation> dmesg | tail -n11
[309863.390930] pl2303: Unknown symbol usb_serial_handle_sysrq_char (err 0)
[309863.398204] pl2303: Unknown symbol usb_serial_disconnect (err 0)
[309863.404787] pl2303: Unknown symbol usb_serial_generic_close (err 0)
[309863.411582] pl2303: Unknown symbol usb_serial_suspend (err 0)
[309863.417891] pl2303: Unknown symbol usb_serial_handle_dcd_change (err 0)
[309863.425130] pl2303: Unknown symbol usb_serial_handle_break (err 0)
[309863.431747] pl2303: Unknown symbol usb_serial_generic_submit_read_urb (err 0)
[309863.439266] pl2303: Unknown symbol usb_serial_probe (err 0)
[309863.445240] pl2303: Unknown symbol usb_serial_register (err 0)
[309863.451439] pl2303: Unknown symbol usb_serial_deregister (err 0)
[309863.457827] pl2303: Unknown symbol usb_serial_resume (err 0)
DiskStation>

I then tried renaming the Synology usbserial.ko file and replacing it with the recompiled usbserial.ko. After doing this I was able to insmod both usbserial.ko and pl2303.ko.

Code: Select all

DiskStation> dmesg | tail
[309863.445240] pl2303: Unknown symbol usb_serial_register (err 0)
[309863.451439] pl2303: Unknown symbol usb_serial_deregister (err 0)
[309863.457827] pl2303: Unknown symbol usb_serial_resume (err 0)
[313939.299044] usbcore: registered new interface driver usbserial
[313939.305358] usbserial: USB Serial Driver core
[313975.334383] USB Serial support registered for pl2303
[313975.339913] pl2303 7-2:1.0: pl2303 converter detected
[313975.357220] usb 7-2: pl2303 converter now attached to ttyUSB0
[313975.363961] usbcore: registered new interface driver pl2303
[313975.370067] pl2303: Prolific PL2303 USB to serial adaptor driver
DiskStation>

These are the same messages I saw when I installed these drivers under DSM 4.1 so I assume that the install was successful.

I am using an older APC UPS with a USB-to-Serial cable (pl2303). Unfortunately Synology has also changed the UPS NUT drivers with DSM 4.2 so I haven't been able to get my UPS to be recognized yet. Hopefully I'll be able to figure it out again.

Thanks again for your help. Thanks to lebovitz too!


I always used the compiled usbserial.ko I posted, not the synology one. So, just to be sure, do you mean that Synology provided usbserial.ko doesn't work with our ftdi and pl2303 modules and we should use our usbserial.ko too?

Another question, are lebovitz's modules different from the ones I posted?
Eduardo
Novice
Novice
Posts: 47
Joined: Wed Nov 07, 2012 3:20 pm
Location: Spain

Re: Pl2303 on DSM 4.0

Postby Eduardo » Thu Mar 28, 2013 5:36 pm

I forgot to add my APC RS-550GI is working flawlessly here. Is a USB model, but I don´t think it has usb to serial component.
condor
Rookie
Rookie
Posts: 38
Joined: Mon Apr 23, 2012 1:51 am
Location: New York, USA

Re: Pl2303 on DSM 4.0

Postby condor » Thu Mar 28, 2013 10:24 pm

Eduardo wrote:I always used the compiled usbserial.ko I posted, not the synology one. So, just to be sure, do you mean that Synology provided usbserial.ko doesn't work with our ftdi and pl2303 modules and we should use our usbserial.ko too?

Another question, are lebovitz's modules different from the ones I posted?

From what I can tell, Synology began including /lib/modules/usbserial.ko with the release of DSM 4.2-3202. (I don't remember seeing it in DSM 4.1 but I could have missed it. It definitely wasn't there in DSM 4.0.) This might be related to their recent support of various USB devices such as bluetooth dongles, TV tuners, printers, etc.

Yes, I could not insmod the pl2303.ko driver until I replaced the Synology provided usbserial.ko driver with yours. Then I was able to insmod usbserial.ko followed by pl2303.ko.

I ran a binary file compare of the files you uploaded with the files that lebovitz sent me. All 3 files, pl2303.ko, ftdi_sio.ko and usbserial.ko are exactly the same. lebovitz didn't send the cp210x.ko file.

My only worry is that by replacing the Synology provided usbserial.ko driver I may have inadvertantly broken support for other Synology supported USB devices. I guess I'll wait and see.

The APC UPS I am using is an older rack-mounted SmartUPS with only a D9 serial port. I use an APC AP9833 (940-0272A) USB-to-Serial cable containing a pl2303 chip to connect it to the DiskStation. However, the DiskStation doesn't support the pl2303 or apcsmart in it's implementation of the NUT package.

I was able to solve both problems on DSM 4.0 by using the pl2303 driver that lebovitz supplied back when he created this thread and by installing the ipkg NUT package and making a few symbolic links and edits to ups.sh and ups.conf to enable support for apcsmart.

Then Synology began including the apcsmart NUT driver with DSM 4.1 which made it easier but still required edits to ups.conf.

Now it seems that Synology has updated the entire NUT package with the release of DSM 4.2 and the edits I made before don't work now.

Sorry but I've gotten a bit off topic here. :)
Last edited by condor on Thu Mar 28, 2013 10:37 pm, edited 2 times in total.
DS1511+ / 3GB RAM / DSM 5.2-5967-2 / 5 x WD Red 3TB (SHR1)
DX510-1 / 5 x WD Red 3TB (SHR1)
DX510-2 / 5 x WD Red 3TB (SHR1)

USB-Disk1 Silicon Image 5744 2TB (RAID0)
USB-Disk2 Silicon Image 5744 2TB (RAID0)
USB-Disk3 JMicron JMB393 10TB (RAID5) via JMS539 USB-SATA Bridge

APC SU1000RM via pl2303 USB-Serial Cbl
Asterisk, Audio Stn, Cloud Stn, DHCP Svr, Directory Svr, DNS Svr, Download Stn, Mail Svr, Mail Stn, Media Svr, Perl, phpMyAdmin, Photo Stn, Surveillance Stn, Syslog Svr, Video Stn
Eduardo
Novice
Novice
Posts: 47
Joined: Wed Nov 07, 2012 3:20 pm
Location: Spain

Re: Pl2303 on DSM 4.0

Postby Eduardo » Thu Mar 28, 2013 10:31 pm

Hi condor,

Crystal clear now.
Thanks for this rich info. For sure, quite useful for some of us.

Regards.
jvmkite
I'm New!
I'm New!
Posts: 7
Joined: Wed May 05, 2010 12:16 pm

Re: Pl2303 on DSM 4.0

Postby jvmkite » Mon Apr 29, 2013 3:39 pm

Hello,

I'm having a problem with the use of this driver pl2303.ko.

I'm reading rs232 information coming from an Inverter.
After upgrading o DSM 4.2-2302 and installing these new drivers, my logs suddenly stop working.

There is no error on messages or dmesg.
Is there a way to debug the drivers?

Does anybody had this kind of problems?
Does this new firmware have power options that would disable USB energy?
jvmkite
I'm New!
I'm New!
Posts: 7
Joined: Wed May 05, 2010 12:16 pm

Re: Pl2303 on DSM 4.0

Postby jvmkite » Tue May 21, 2013 11:38 am

Just to give a feedback, that I fixed the problem of my PL2303 USB2Serial dongles.
The problem was that they were stopping communicating from time to time.

Apparently because the ones I've used were cheap Chinese dongles and the USB mass was not correctly soldered into the circuit board.(PCB)

After carefully open them, I could fix the problem using a soldering iron to better fix the USB plug.
bessone
I'm New!
I'm New!
Posts: 2
Joined: Tue Aug 20, 2013 1:51 pm

Re: Pl2303 on DSM 4.0

Postby bessone » Tue Aug 20, 2013 2:00 pm

Someone managed to install the driver for Diskstation DS123J (Marvell Armada) with DSM 4.2 successfully?
lebovitz
Experienced
Experienced
Posts: 139
Joined: Sun Oct 30, 2011 9:49 am

Re: Pl2303 on DSM 4.0

Postby lebovitz » Thu Aug 29, 2013 6:17 pm

Sorry, but I don't have this device so I can't help you here (though I do work at Marvell and my friends here actually designed this chip :-) )
condor
Rookie
Rookie
Posts: 38
Joined: Mon Apr 23, 2012 1:51 am
Location: New York, USA

Re: Pl2303 on DSM 4.0

Postby condor » Sat Sep 14, 2013 8:29 pm

Once again, lebovitz was kind enough to email me the pl2303 drivers compiled for DSM 4.3 (Pineview). Thanks lebovitz! I hope I can return the favor.

For those that haven't been following this thread, I have an older rack-mounted APC SmartUPS with only a D9 serial port. I use an APC AP9833 (940-0272A) USB-to-Serial cable containing a pl2303 chip to connect it to a DS1511+ DiskStation. However, DSM doesn't natively support the pl2303 chip or the apcsmart UPS driver. Below is the workaround I use for this:

These are the commands I use to set up pl2303 support. I've already copied the new usbserial.ko and pl2303.ko files to the root of share1. I usually set up all 4 USB ports but only USB0 is required.

Code: Select all

mknod /dev/ttyUSB0 c 188 0
mknod /dev/ttyUSB1 c 188 1
mknod /dev/ttyUSB2 c 188 2
mknod /dev/ttyUSB3 c 188 3
chown root:root /dev/ttyUSB0
chown root:root /dev/ttyUSB1
chown root:root /dev/ttyUSB2
chown root:root /dev/ttyUSB3
chmod 644 /dev/ttyUSB0
chmod 644 /dev/ttyUSB1
chmod 644 /dev/ttyUSB2
chmod 644 /dev/ttyUSB3
mv /lib/modules/usbserial.ko /lib/modules/usbserial.ko.save
mv /volume1/share1/pl2303.ko /lib/modules/
mv /volume1/share1/usbserial.ko /lib/modules/
chown root:root /lib/modules/usbserial.ko
chown root:root /lib/modules/pl2303.ko
chmod 644 /lib/modules/usbserial.ko
chmod 644 /lib/modules/pl2303.ko
insmod /lib/modules/usbserial.ko
insmod /lib/modules/pl2303.ko

Verify that the USB-to-Serial cable has been detected:

Code: Select all

DiskStation> dmesg -T | tail
[Sat Sep 14 12:14:23 2013] usbcore: registered new interface driver usbserial
[Sat Sep 14 12:14:23 2013] usbserial: USB Serial Driver core
[Sat Sep 14 12:14:23 2013] USB Serial support registered for pl2303
[Sat Sep 14 12:14:23 2013] pl2303 7-2:1.0: pl2303 converter detected
[Sat Sep 14 12:14:23 2013] usb 7-2: pl2303 converter now attached to ttyUSB0
[Sat Sep 14 12:14:23 2013] usbcore: registered new interface driver pl2303
[Sat Sep 14 12:14:23 2013] pl2303: Prolific PL2303 USB to serial adaptor driver
DiskStation>

Modify file /usr/syno/etc/ups/ups.conf to change the line "driver = usbhid-ups" to " driver = apcsmart" and the line "port = auto" to " port = /dev/ttyUSB0". Note that there is an extra space before "driver" and before "port". This extra whitespace is required for the fix to work.

Code: Select all

[ups]
         driver = apcsmart
         port = /dev/ttyUSB0
        #community = name
        #snmp_version = v2c

Restart the UPS monitoring service.

Code: Select all

DiskStation> ups.sh restart
Restart UPS
/usr/syno/bin/ups.sh restart invoked.
Network UPS Tools - UPS driver controller SDS4-3-2013Q3branch-3773-130814
Can't open /var/state/ups/apcsmart-ttyUSB0.pid: No such file or directory
Start Driver
Network UPS Tools - UPS driver controller SDS4-3-2013Q3branch-3773-130814
Network UPS Tools - APC Smart protocol driver 3.04 (SDS4-3-2013Q3branch-3773-130814)
APC command table version 3.0
Start UPS Server
Network UPS Tools upsd SDS4-3-2013Q3branch-3773-130814
fopen /var/state/ups/upsd.pid: No such file or directory
listening on ::1 port 3493
listening on 127.0.0.1 port 3493
listening on fe80::211:32ff:fe0a:6739 port 3493
listening on 192.168.0.1 port 3493
Connected to UPS [ups]: apcsmart-ups
/usr/syno/share/cmdvartab not found - disabling descriptions
Start UPS client
Network UPS Tools upsmon SDS4-3-2013Q3branch-3773-130814
fopen /var/run/upsmon.pid: No such file or directory
UPS: ups@localhost (master) (power value 1)
Using power down flag file /etc/killpower
DiskStation> Executing command: online
DiskStation>

Check that the UPS is now monitored.

Code: Select all

DiskStation> tail /var/log/messages
Sep 14 13:02:45 DiskStation root: /usr/syno/bin/ups.sh restart invoked.
Sep 14 13:02:57 DiskStation apcsmart[4753]: Startup successful
Sep 14 13:02:57 DiskStation root: The UPS is connected. driver=[]
Sep 14 13:02:58 DiskStation upsd[5062]: Startup successful
Sep 14 13:02:58 DiskStation upsd[5062]: upsd.c:733 IP [127.0.0.1] add to ACL list
Sep 14 13:02:58 DiskStation upsd[5062]: upsd.c:737 IP [::1] add to ACL list
Sep 14 13:02:59 DiskStation upsmon[5137]: Startup successful
Sep 14 13:02:59 DiskStation upsmon[5139]: UPS [ups@localhost] connected
DiskStation>

That's it. This is a little bit off topic here but I included it anyway. Synology has helpfully included the apcsmart driver with DSM but hasn't provided a method to actually use it. This workaround currently works with DSM 4.2 and DSM 4.3. I used a slightly different workaround for DSM 4.0 and 4.1.
DS1511+ / 3GB RAM / DSM 5.2-5967-2 / 5 x WD Red 3TB (SHR1)
DX510-1 / 5 x WD Red 3TB (SHR1)
DX510-2 / 5 x WD Red 3TB (SHR1)

USB-Disk1 Silicon Image 5744 2TB (RAID0)
USB-Disk2 Silicon Image 5744 2TB (RAID0)
USB-Disk3 JMicron JMB393 10TB (RAID5) via JMS539 USB-SATA Bridge

APC SU1000RM via pl2303 USB-Serial Cbl
Asterisk, Audio Stn, Cloud Stn, DHCP Svr, Directory Svr, DNS Svr, Download Stn, Mail Svr, Mail Stn, Media Svr, Perl, phpMyAdmin, Photo Stn, Surveillance Stn, Syslog Svr, Video Stn
tech-mentor
I'm New!
I'm New!
Posts: 2
Joined: Mon Nov 25, 2013 9:20 pm

Re: Pl2303 on DSM 4.0

Postby tech-mentor » Tue Nov 26, 2013 3:53 pm

These instructions worked like a charm for me. I am using a ds412+ (Cedarview) with DSM 4.3 and I was able, finally, to use my old APC SmartUPS 1000.

Thank you!
porangi.chris
I'm New!
I'm New!
Posts: 3
Joined: Sat Jan 18, 2014 3:33 pm

Re: Pl2303 on DSM 4.0

Postby porangi.chris » Sat Jan 18, 2014 3:58 pm

Hi Edurado et al,

Thank you so much for providing the drivers. I'm trying to get a weatherlink serial to usb adapter working which has the CP210x chipset. My Synology box is a DS412+ with DSM 4.3 and Atom D2700 which I am suspecting is why I have this problem.

I have followed your instructions through http://davies-barnard.co.uk/2014/01/synology-weather-link/ but get stuck when trying to insmod the new ko files starting with usbserial.ko where I get this error:

Code: Select all

bash-3.2$ sudo insmod usbserial.ko             
insmod: can't insert 'usbserial.ko': invalid module format
bash-3.2$


Is this because these are compiled for the D510 processor?

Thanking you in advance of your time.

Chris
ilium007
Beginner
Beginner
Posts: 25
Joined: Mon Jun 13, 2011 8:28 am

Re: Pl2303 on DSM 4.0

Postby ilium007 » Sun Mar 09, 2014 8:47 am

I would also like to find out if we can get some instructions on how to compile this for the Intel / Atom chipsets / kernel if possible. My 1513+ runs this kernel:

Linux diskStation 3.2.40 #3827 SMP Tue Feb 11 19:48:28 CST 2014 x86_64 GNU/Linux synology_cedarview_1513+

Cheers

Return to “Intel D510 Development Room”

Who is online

Users browsing this forum: No registered users and 2 guests