Can I use a symlink instead of ttyUSB0?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I have a script that connects my raspberry to the internet using a 4G USB module. I call wvdial in /etc/rc.local and it connects.



It works well when my USB dongle mounts in ttyUSB0, but it randomly mounts in ttyUSB1, ttyUSB2... and fails to connect when this happens.



It makes sense because in my wvdial.conf file I have:



[Dialer Defaults]
Modem = /dev/ttyUSB0


To solve it, I created a symlink so the module mounts in /dev/huaweimodule and modified the previous file:



[Dialer Defaults]
Modem = /dev/huaweimodem


But now, sudo wvdial gives:




Cannot open /dev/huaweimodem: Inappropriate ioctl for device




How can I use a symlink instead of ttyUSB0 in wvdial.conf, or force my modem to always mount in ttyUSB0?










share|improve this question





















  • Who makes your symlinks? I'm using symlinks made by UDEV without problems. Have a look at: hintshop.ludvig.co.nz/show/persistent-names-usb-serial-devices
    – yeti
    Sep 27 at 14:58










  • UDEV, that link is the reference I followed to create the symlink. So are you using a symlink in wvdial.conf without any problem?
    – Daniel Viaño
    Sep 27 at 15:02










  • A related question is unix.stackexchange.com/questions/270179 .
    – JdeBP
    Sep 27 at 16:25










  • The symlink is created correctly? No spelling mistakes anywhere ("module" vs. "modem" etc.)?
    – dirkt
    Sep 27 at 17:09










  • Yes, the symlink is created correctly. However, I noticed it is pointing to ttyUSB2 when correct connection happens with ttyUSB0 for example. It's like the modem is mounting in several points at once.
    – Daniel Viaño
    Sep 28 at 6:49














up vote
0
down vote

favorite












I have a script that connects my raspberry to the internet using a 4G USB module. I call wvdial in /etc/rc.local and it connects.



It works well when my USB dongle mounts in ttyUSB0, but it randomly mounts in ttyUSB1, ttyUSB2... and fails to connect when this happens.



It makes sense because in my wvdial.conf file I have:



[Dialer Defaults]
Modem = /dev/ttyUSB0


To solve it, I created a symlink so the module mounts in /dev/huaweimodule and modified the previous file:



[Dialer Defaults]
Modem = /dev/huaweimodem


But now, sudo wvdial gives:




Cannot open /dev/huaweimodem: Inappropriate ioctl for device




How can I use a symlink instead of ttyUSB0 in wvdial.conf, or force my modem to always mount in ttyUSB0?










share|improve this question





















  • Who makes your symlinks? I'm using symlinks made by UDEV without problems. Have a look at: hintshop.ludvig.co.nz/show/persistent-names-usb-serial-devices
    – yeti
    Sep 27 at 14:58










  • UDEV, that link is the reference I followed to create the symlink. So are you using a symlink in wvdial.conf without any problem?
    – Daniel Viaño
    Sep 27 at 15:02










  • A related question is unix.stackexchange.com/questions/270179 .
    – JdeBP
    Sep 27 at 16:25










  • The symlink is created correctly? No spelling mistakes anywhere ("module" vs. "modem" etc.)?
    – dirkt
    Sep 27 at 17:09










  • Yes, the symlink is created correctly. However, I noticed it is pointing to ttyUSB2 when correct connection happens with ttyUSB0 for example. It's like the modem is mounting in several points at once.
    – Daniel Viaño
    Sep 28 at 6:49












up vote
0
down vote

favorite









up vote
0
down vote

favorite











I have a script that connects my raspberry to the internet using a 4G USB module. I call wvdial in /etc/rc.local and it connects.



It works well when my USB dongle mounts in ttyUSB0, but it randomly mounts in ttyUSB1, ttyUSB2... and fails to connect when this happens.



It makes sense because in my wvdial.conf file I have:



[Dialer Defaults]
Modem = /dev/ttyUSB0


To solve it, I created a symlink so the module mounts in /dev/huaweimodule and modified the previous file:



[Dialer Defaults]
Modem = /dev/huaweimodem


But now, sudo wvdial gives:




Cannot open /dev/huaweimodem: Inappropriate ioctl for device




How can I use a symlink instead of ttyUSB0 in wvdial.conf, or force my modem to always mount in ttyUSB0?










share|improve this question













I have a script that connects my raspberry to the internet using a 4G USB module. I call wvdial in /etc/rc.local and it connects.



It works well when my USB dongle mounts in ttyUSB0, but it randomly mounts in ttyUSB1, ttyUSB2... and fails to connect when this happens.



It makes sense because in my wvdial.conf file I have:



[Dialer Defaults]
Modem = /dev/ttyUSB0


To solve it, I created a symlink so the module mounts in /dev/huaweimodule and modified the previous file:



[Dialer Defaults]
Modem = /dev/huaweimodem


But now, sudo wvdial gives:




Cannot open /dev/huaweimodem: Inappropriate ioctl for device




How can I use a symlink instead of ttyUSB0 in wvdial.conf, or force my modem to always mount in ttyUSB0?







usb raspbian modem wvdial rc.local






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Sep 27 at 14:53









Daniel Viaño

1




1











  • Who makes your symlinks? I'm using symlinks made by UDEV without problems. Have a look at: hintshop.ludvig.co.nz/show/persistent-names-usb-serial-devices
    – yeti
    Sep 27 at 14:58










  • UDEV, that link is the reference I followed to create the symlink. So are you using a symlink in wvdial.conf without any problem?
    – Daniel Viaño
    Sep 27 at 15:02










  • A related question is unix.stackexchange.com/questions/270179 .
    – JdeBP
    Sep 27 at 16:25










  • The symlink is created correctly? No spelling mistakes anywhere ("module" vs. "modem" etc.)?
    – dirkt
    Sep 27 at 17:09










  • Yes, the symlink is created correctly. However, I noticed it is pointing to ttyUSB2 when correct connection happens with ttyUSB0 for example. It's like the modem is mounting in several points at once.
    – Daniel Viaño
    Sep 28 at 6:49
















  • Who makes your symlinks? I'm using symlinks made by UDEV without problems. Have a look at: hintshop.ludvig.co.nz/show/persistent-names-usb-serial-devices
    – yeti
    Sep 27 at 14:58










  • UDEV, that link is the reference I followed to create the symlink. So are you using a symlink in wvdial.conf without any problem?
    – Daniel Viaño
    Sep 27 at 15:02










  • A related question is unix.stackexchange.com/questions/270179 .
    – JdeBP
    Sep 27 at 16:25










  • The symlink is created correctly? No spelling mistakes anywhere ("module" vs. "modem" etc.)?
    – dirkt
    Sep 27 at 17:09










  • Yes, the symlink is created correctly. However, I noticed it is pointing to ttyUSB2 when correct connection happens with ttyUSB0 for example. It's like the modem is mounting in several points at once.
    – Daniel Viaño
    Sep 28 at 6:49















Who makes your symlinks? I'm using symlinks made by UDEV without problems. Have a look at: hintshop.ludvig.co.nz/show/persistent-names-usb-serial-devices
– yeti
Sep 27 at 14:58




Who makes your symlinks? I'm using symlinks made by UDEV without problems. Have a look at: hintshop.ludvig.co.nz/show/persistent-names-usb-serial-devices
– yeti
Sep 27 at 14:58












UDEV, that link is the reference I followed to create the symlink. So are you using a symlink in wvdial.conf without any problem?
– Daniel Viaño
Sep 27 at 15:02




UDEV, that link is the reference I followed to create the symlink. So are you using a symlink in wvdial.conf without any problem?
– Daniel Viaño
Sep 27 at 15:02












A related question is unix.stackexchange.com/questions/270179 .
– JdeBP
Sep 27 at 16:25




A related question is unix.stackexchange.com/questions/270179 .
– JdeBP
Sep 27 at 16:25












The symlink is created correctly? No spelling mistakes anywhere ("module" vs. "modem" etc.)?
– dirkt
Sep 27 at 17:09




The symlink is created correctly? No spelling mistakes anywhere ("module" vs. "modem" etc.)?
– dirkt
Sep 27 at 17:09












Yes, the symlink is created correctly. However, I noticed it is pointing to ttyUSB2 when correct connection happens with ttyUSB0 for example. It's like the modem is mounting in several points at once.
– Daniel Viaño
Sep 28 at 6:49




Yes, the symlink is created correctly. However, I noticed it is pointing to ttyUSB2 when correct connection happens with ttyUSB0 for example. It's like the modem is mounting in several points at once.
– Daniel Viaño
Sep 28 at 6:49















active

oldest

votes











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f471848%2fcan-i-use-a-symlink-instead-of-ttyusb0%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f471848%2fcan-i-use-a-symlink-instead-of-ttyusb0%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

How to check contact read email or not when send email to Individual?

Displaying single band from multi-band raster using QGIS

How many registers does an x86_64 CPU actually have?