[some lyrics about little choice skipped]
Setup of Huawei e1550.
kernel modules:
kldload ucom
kldload u3g
dmesg will shows something like this:
ugen0.2: at usbus0
umass0: on usbus0
umass0: SCSI over Bulk-Only; quirks = 0x0000
umass0:2:0:-1: Attached to scbus2
umass1: on usbus0
umass1: SCSI over Bulk-Only; quirks = 0x0000
(probe0:umass-sim0:0:0:0): TEST UNIT READY. CDB: 0 0 0 0 0 0
(probe0:umass-sim0:0:0:0): CAM Status: SCSI Status Error
(probe0:umass-sim0:0:0:0): SCSI Status: Check Condition
(probe0:umass-sim0:0:0:0): NOT READY asc:3a,0
(probe0:umass-sim0:0:0:0): Medium not present
(probe0:umass-sim0:0:0:0): Unretryable error
cd1 at umass-sim0 bus 0 scbus2 target 0 lun 0
cd1: Removable CD-ROM SCSI-2 device
cd1: 1.000MB/s transfers
cd1: Attempt to query device size failed: NOT READY, Medium not present
……..
So we have devices cd1 (with linux/windows drivers) and da0 (it’s a micro-sd card reader)
u3g module still lacks of support this modem, so we need to get sources of usb_modeswitch from http://www.draisberghof.de/usb_modeswitch
Unpack, make clean & make.
Copy usb_modeswitch.conf to /etc/, and need to uncomment string related to.
Run of usb_modeswitch leads to activate modem device, ls /dev/ shows us two devices, ttyU0.0 и ttyU0.1 (for me, your device names may me differ by numbers).
To make use of modem easier, needs to add some config to /etc/devd.conf to provide authomatic handling
Code to add to devd.conf:
attach 100 {
device-name "ugen[0-9]+";
match "vendor" "0x12d1";
match "product" "0x1446";
action "/usr/local/bin/usb_modeswitch";
};
And don’t forget to do ‘cp usb_modeswitch /usr/local/bin’
Also this modem support mode switching by AT commands:
AT^U2DIAG=0 (modem only)
AT^U2DIAG=1 (modem + CD-ROM)
AT^U2DIAG=255 (modem + CD-ROM + Card Reader)
AT^U2DIAG=256 (modem + Card Reader, may use as usual flash drive after decline modem drivers setup)
So any can write own script to start usb_modeswitch and send needed command to /dev/tyyUx.y in one click