Unfortunately no one can be told what fun_plug is - you have to see it for yourself.
You are not logged in.
Hi,
firstly thanks for all the information on this sight - long thought that my DNS 323 could do more than just sit there as file storage.
my project -
link a power usage monitor (free from EON) via a serial usb cable to the DNS to capture the XML output and store to a file/database for analysis -(point being to utilise a device already running 24hrs rather than keeping a PC burning power to measure power)
I have succeeded in getting this working on my PC (linux - Fedora 12) by following the below links as starting points.
http://www.linuxuk.org/?s=current+cost
http://www.jibble.org/currentcost/
Now for the fun with the DNS.
a) got fun-plug 0.5 successfully working
b) got Optware up and running - installed the Perl and rrdtools that I wanted.
using "lsusb" I can see the serial cable but am not able to use modprobe to install the driver in.
root@dlink:/# lsusb
Bus 001 Device 002: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
Bus 001 Device 001: ID 0000:0000
root@dlink:/#
root@dlink:/# modprobe usbserial vendor =0x067b product=0x2303
modprobe: cannot parse modules.dep
root@dlink:/#
Using perl CPAN to add modules also seems to take an age - and not even sure if this is working at the moment (am I going to need to consider re-writing the perl scripts for modules that are delivered by optware only?)
Attempt 2
CHROOT Debian
while being unfamiliar with debian based distros thought would give it a go but now I am unable to see any USB devices on running lsusb.
So -
Main question -- is the project doomed in some way due to firmware constraints?
if the answer is no - can I have some pointers on how to resolve some of the errors I am seeing.
in searching for an answer to the modprobe error there was a suggestion to try
root@dlink:/# depmod -a
depmod: can't open '/lib/modules/2.6.12.6-arm1/modules.dep': No such file or directory
root@dlink:/# mkdir /lib/modules/2.6.12.6-arm1
root@dlink:/# depmod -a
root@dlink:/#
trying modprobe again
root@dlink:/# modprobe usbserial vendor =0x067b product=0x2303
modprobe: /etc/modprobe.d: No such file or directory
modprobe: cannot parse modules.dep
root@dlink:/#
so
root@dlink:/# mkdir /etc/modprobe.d
root@dlink:/# modprobe usbserial vendor =0x067b product=0x2303
modprobe: cannot parse modules.dep
root@dlink:/#
and feeling that I am back where I started!.
Modules.dep exists in
//lib/modules/2.6.12.6-arm1
and is currently empty.
so -- any thoughts and pointers greatly received.
Offline
Seeing you depmod story, I understand that your modules are not located in /lib/modules/2.6.12.6-arm1. They should, I think.
Offline
Thanks for thought ,
2 more questions from there - a) how do I get that folder to persist on reboot? = created last night and reboot this afternoon and no longer exists?
b)put the usbserial.ko file in the location and get.
root@dlink-:/lib/modules/2.6.12.6-arm1# modprobe usbserial vendor
=0x067b product=0x2303
insmod: cannot insert '/lib/modules/2.6.12.6-arm1/usbserial.ko': invalid module format
modprobe: failed to load module usbserial: No such file or directory
Offline
a) Put your modules elsewere, for instance /ffp/lib/modules/2.6.12.6-arm1, and create a symlink on reboot. Add the line
ln -s /ffp/lib/modules/2.6.12.6-arm1 /lib/modules/2.6.12.6-arm1
to /ffp/etc/fun_plug.local
b) I can be mistaken, but I think you've got the wrong kernel module. Can you load it directly using insmod? If not, what does dmesg say?
Offline
Thanks for coming back.
had got to the answer for a) from trying to set a persistant home file- think my perl CPAN issues are home file space related.
Anyway - usbserial -
root@dlink-:/mnt/HD_a2/ffp/lib/modules/2.6.12.6-arm1# insmod usbserial.ko
insmod: cannot insert 'usbserial.ko': invalid module format
dmesg seems to back up what you are suggesting,
usbserial: version magic '2.6.6-arm2 ARMv5 gcc-3.3' should be '2.6.12.6-arm1 ARMv5 gcc-3.3'
so where can I get the correct file from?
Running dlink firmware version 1.08.
Offline
perl etc seems to be sorted and working - created a "real" home drive space for root and so far so good - got my scripts running on test input.
All that is needed to get the project working is the usbserial set up. - then I am going to need to try and write up how-to notes.
Offline
Thanks for the link -- somehow missed the other options on that site.
so now - got a usbserial that is correct for kernal - created a persistant /etc/module.d and modprobe usbserial successfully.
(and added modprobe to fun_plug.local to ensure that installed each boot.)
now dmesg states
usbcore: registered new driver usbserial
drivers/usb/serial/usb-serial.c: USB Serial support registered for Generic
usbserial_generic 1-1:1.0: Generic converter detected
usb 1-1: Generic converter now attached to ttyUSB0
usbcore: registered new driver usbserial_generic
drivers/usb/serial/usb-serial.c: USB Serial Driver core v2.0
so all excited thinking that I had cracked it took a look in /dev for ttyUSB0 to check permissions and set write as needed by my perl script - no ttyUSB0 to be found.
tried unpluging and repluging USB cable, dmesg
usb 1-1: USB disconnect, address 2
generic ttyUSB0: Generic converter now disconnected from ttyUSB0
usbserial_generic 1-1:1.0: device disconnected
usb 1-1: new full speed USB device using ehci_platform and address 3
usbserial_generic 1-1:1.0: Generic converter detected
usb 1-1: Generic converter now attached to ttyUSB0
so -- where is ttyUSB0 to be found???
find -name ttyUSB0 -- no result.
so found thread http://dns323.kood.org/forum/viewtopic.php?pid=37642
From there created it myself
mknod /dev/ttyUSB0 c 188 0
chmod a+rw /dev/ttyUSB0
root@dlink-:/mnt/HD_a2/energy_monitor# stty -F /dev/ttyUSB0
speed 57600 baud;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;
eol2 = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W;
lnext = ^V; flush = ^O; min = 1; time = 0;
ignbrk -brkint -icrnl -imaxbel
-opost
-isig -icanon -iexten -echo
now...
running perl script and cannot get output - although no errors reported.
reading up on mknod and the 188 and 0 are "major" and "minor" numbers. elsewhere I find that serial port driver is 188 with -0 to 15 as minor numbers - so am I right to copy the above code or do I need a different minor number?
if I have used mknod correctly is there a way of changing the BAUD directly and capturing output from the command line to validate that usbserial set up is complete and that the lack of data is down to the perl script?
Offline
update - have got stty to change baud rate and got some output in perl but guessing my ttyUSB0 definition is still not correct.
Perl> open (SERIAL, "+>/dev/ttyUSB0")
1
Perl> $line = <SERIAL>
from the device man notes -"The CC128 Display Unit outputs ASCII text over its serial port at 57600 baud, 1 start, 8-bit
data, 1 stop, no parity, no handshake. This version does not listen for incoming data"
any thoughts on what I need to change?
thanks in advice.
Offline
tried screen but got white screen from DNS (worked a treat on the PC though) found cat /dev/ttyUSB0 and that seems to work better in terms of being able to see output.
Issue is that output is still
When I first tried this on PC and had BAUD rate wrong I got this, however Baud rate is set correctly.
I have been trying different stty settings (sane, cooked etc ans well as undef)
when working on the PC I have -
[root@localhost ~]# stty -F /dev/ttyUSB0 -a
speed 57600 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>;
swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V;
flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 hupcl -cstopb cread -clocal -crtscts
-ignbrk brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl -ixon -ixoff -iuclc -ixany
imaxbel -iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke
changing the DNS to match does not make any difference - except that there are some values that cannot be set (-iutf8, line)
any thoughts as to what the next steps should be?
Last edited by shadowspawn (2010-08-26 01:18:03)
Offline
Been hammering away at this but still no joy in getting readable output through the DNS323.
Should I give up or is there something obvious to try that I have been missing?
Thanks
Offline