#! /bin/bash
rmmod cdc_acm
rmmod ftdi_sio
rmmod usbserial
modprobe usbserial vendor=0x1fef product=0x2018
modprobe ftdi_sio
exit 0
[ 1399.161523] usbcore: registered new interface driver usbserial
[ 1399.161648] usbcore: registered new interface driver usbserial_generic
[ 1399.163270] usbserial: USB Serial support registered for generic
[ 1399.163385] usbserial_generic 1-1.4:1.0: Generic device with no bulk out, not allowed.
[ 1399.163432] usbserial_generic: probe of 1-1.4:1.0 failed with error -5
[ 1399.163481] usbserial_generic 1-1.4:1.1: The "generic" usb-serial driver is only for testing and one-off prototypes.
[ 1399.163501] usbserial_generic 1-1.4:1.1: Tell linux-usb@vger.kernel.org to add your device to a proper driver.
[ 1399.163517] usbserial_generic 1-1.4:1.1: generic converter detected
[ 1399.165688] usb 1-1.4: generic converter now attached to ttyUSB0
[ 1399.212258] usbcore: registered new interface driver ftdi_sio
[ 1399.212406] usbserial: USB Serial support registered for FTDI USB Serial Device
^@xB ^@^E^@^@^@^@^@^@^@ ^C^^@ ^C^^@ ^C^^@ ^C^^@ ^C^^@ ^C^^@ ^C^^@ ^C^^@ ^C^^@ ^$
yy^Ay^Aye�
yyye�
yye�
ye�
ye��^@^@@(^A^@^@ �^@^@ �^@^@ �^@^@ �^@^@ �^@^@ �^@^@ �^@^@ �^@E+8"@^@^@@ �^@^@ �^$
Could it be a problem with my stty settings?
pi@raspberrypi ~ $ stty -a -F /dev/ttyUSB0
speed 9600 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
Resol vbus is a protocol. It is not plain text. What happens when you decode it ?
--
You received this message because you are subscribed to the Google Groups "Resol Vbus" group.
To unsubscribe from this group and stop receiving emails from it, send an email to resol-vbus+...@googlegroups.com.
To post to this group, send email to resol...@googlegroups.com.
Visit this group at http://groups.google.com/group/resol-vbus.
For more options, visit https://groups.google.com/d/optout.
It was the stty setting.
After this command everything works.
stty -F /dev/ttyUSB0 1:0:bd:0:0:0:0:0:0:0:1:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0
# Rule for vbus-usb adapter
SUBSYSTEM=="tty", ATTRS{idVendor}=="1fef", ATTRS{idProduct}=="2018", RUN="sh /etc/vbusinit"
#! /bin/bash
rmmod cdc_acm
rmmod ftdi_sio
rmmod usbserial
modprobe usbserial vendor=0x1fef product=0x2018
modprobe ftdi_sio
stty -F /dev/ttyUSB0 1:0:bd:0:0:0:0:0:0:0:1:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0
exit 0
Nope. What bit doesn't work ?
--
You received this message because you are subscribed to the Google Groups "Resol Vbus" group.
To unsubscribe from this group and stop receiving emails from it, send an email to resol-vbus+...@googlegroups.com.
To post to this group, send email to resol...@googlegroups.com.
Visit this group at https://groups.google.com/group/resol-vbus.
Add blacklist cdc_acm to /etc/modprobe.d/vbus-blacklist.conf
Udev rule /etc/udev/rules.d/95-usbserial.rules
ACTION=="add", ATTRS{idVendor}=="1fef", ATTRS{idProduct}=="2018", SYMLINK+="ttyVbus", RUN+="/etc/vbusinit"
edit /etc/vbusinit
#! /bin/bash
echo 1fef 2018 > /sys/bus/usb-serial/drivers/generic/new_id
/etc/vbusinit1 & exit
Edit /etc/vbusinit1
#! /bin/bash
sleep 5
stty -F /dev/ttyVbus 1:0:bd:0:0:0:0:0:0:0:1:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0
exit 0
Somehow it doesn't work with a single script.