LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   D-Link DWM-222 shows up as ethernet device but want modem for GSM (https://www.linuxquestions.org/questions/linux-hardware-18/d-link-dwm-222-shows-up-as-ethernet-device-but-want-modem-for-gsm-4175736822/)

linuxuser371038 05-08-2024 10:10 AM

D-Link DWM-222 shows up as ethernet device but want modem for GSM
 
This is really irritating. I specifically searched around looking for 4g dongles which would support linux firstly but also NOT make an ethernet connection because that meant I would not have access to sms programmatically due to not being able to use modemmanager.

So I researched for a couple of days and didn't read anything about this for the DWM 222 and even looked in the usb_modeswitch rules and saw it was listed there so thought I would be good with this. I payed on the higher end for this one thinking it would do the job and when I plug it in it auto connected and showed as a wired connection in nmcli!!!

I also had to rip off the security sticker from the package to get into it so would not be able to get a refund.

Please tell me there is still a way to mode_switch it to use gsm or some other way to access sms from it?

The box says it supports sms access however I doubt their own software would be made for linux.

I read some other threads which seems there are a variety of functionality based on the firmware version, Some say they switch and another one notes the same lsusb number as mine who does not switch. So I guess a recent update made it plug and play but the question is whether it can be overcome to still access it as a modem...


EDIT: Btw the device id in lsusb is:

Code:

Bus 001 Device 116: ID 2001:7e46 D-Link Corp. Mobile Connect
This is NOT in the usb_modeswitch rules file. I have tried adding the relevant lines following other devices listed there and I shall cross my fingers and see what happens.

Ok well that didn't do anything. Still just autoconnected as a wired connection.

wpeckham 05-08-2024 10:35 AM

Are you following a guide such as this from the manufacturer? https://www.dlink.com/uk/en/support/...-222-on-ubuntu

linuxuser371038 05-08-2024 11:01 AM

Quote:

Originally Posted by wpeckham (Post 6500519)
Are you following a guide such as this from the manufacturer? https://www.dlink.com/uk/en/support/...-222-on-ubuntu

That has nothing to do with what I want to do.

I have read that. It just tells you how to make an internet connection not what type. Besides that is obsolete as it shows you having to do some commands whereas mine connects automatically.

That is telling you just how to make an ethernet wired connection while as I stated I want gsm modem functionality and this auto connection is scuppering that if indeed it can be hijacked at all to reveal gsm capabilities.

I just noticed I am apparently able to access sms from router mode by typing an address in the browser but that sucks! Well it is better than having to plug the sim into a phone but a few steps back from streamlined command line access.

I could make a python script to work with that however that will be a last resort.

wpeckham 05-08-2024 11:11 AM

That link has EXACTLY to do with what you are asking. I do not believe you read it all. I suggest you look it over again and think about what is going on.

You are getting a network connection to the GSM CELL service, it will WORK like a network connection because that is what it IS.

I assume you have installed the SIMM card? Because without one you are not likely to get much.

linuxuser371038 05-08-2024 11:25 AM

Quote:

Originally Posted by wpeckham (Post 6500525)
That link has EXACTLY to do with what you are asking. I do not believe you read it all. I suggest you look it over again and think about what is going on.

You are getting a network connection to the GSM CELL service, it will WORK like a network connection because that is what it IS.

I assume you have installed the SIMM card? Because without one you are not likely to get much.

I read it all and it is NOT relevant to the issue. You are not understanding what the issue is.

The faux Wired connections these devices make are different from gsm connections because they do not allow you to access the device as a modem. That is because it is using the device in a mode other than gsm and rather using some kind of low level access.

Some devices do this to make them 'plug and play' which prevents gsm functionality.

mmcli will show no modems and thus you cannot use it because the device is setup as a wired connection not a gsm one. This is an issue discussed online with several of these dongles.

TB0ne 05-08-2024 01:23 PM

Quote:

Originally Posted by linuxuser371038 (Post 6500528)
I read it all and it is NOT relevant to the issue. You are not understanding what the issue is.

The faux Wired connections these devices make are different from gsm connections because they do not allow you to access the device as a modem. That is because it is using the device in a mode other than gsm and rather using some kind of low level access. Some devices do this to make them 'plug and play' which prevents gsm functionality. mmcli will show no modems and thus you cannot use it because the device is setup as a wired connection not a gsm one. This is an issue discussed online with several of these dongles.

Sorry, wpeckham is exactly right. That guide exactly addresses your issue...you were asked if you have a SIM card installed. If you don't that means no internet, period. You don't use this as a 'modem', anymore than your smartphone uses a modem to connect. You don't dial things, but set up a network connection using the USB serial interface.

linuxuser371038 05-09-2024 01:21 AM

Quote:

Originally Posted by TB0ne (Post 6500547)
Sorry, wpeckham is exactly right. That guide exactly addresses your issue...you were asked if you have a SIM card installed. If you don't that means no internet, period. You don't use this as a 'modem', anymore than your smartphone uses a modem to connect. You don't dial things, but set up a network connection using the USB serial interface.

Nope you are also missing the point too.

The official name which I didn't recall before is that the device turns into an RNDIS device which apparently happened on a firmware upgrade between the time I was reading about the model using usb_modeswitch and it no longer doing so.

Yes the sim card is in. I can connect to the internet. That is not the problem. The problem is it being shown as a wired network device which blocks access to using gsm tools like modemmanager because it is not in GSM mode. Read about RNDIS and you will see.

Quote:

The Remote Network Driver Interface Specification is a Microsoft proprietary protocol used mostly on top of USB. It provides a virtual Ethernet link to most versions of the Windows, Linux, and FreeBSD operating systems.

Link here
discussing that is what happened with this specific device. The link indicates a firmware downgrade may do the trick.

TB0ne 05-09-2024 07:33 AM

Quote:

Originally Posted by linuxuser371038 (Post 6500640)
Nope you are also missing the point too. The official name which I didn't recall before is that the device turns into an RNDIS device which apparently happened on a firmware upgrade between the time I was reading about the model using usb_modeswitch and it no longer doing so. Yes the sim card is in. I can connect to the internet. That is not the problem. The problem is it being shown as a wired network device which blocks access to using gsm tools like modemmanager because it is not in GSM mode. Read about RNDIS and you will see.


Link here
discussing that is what happened with this specific device. The link indicates a firmware downgrade may do the trick.

Also indicates you didn't do much research; putting in your device along with "linux sms" pulls up:
https://github.com/fltt/dlinkcontrol

...a program that does exactly what you're after.

TenTenths 05-10-2024 05:28 AM

Quote:

Originally Posted by linuxuser371038 (Post 6500514)
access to sms programmatically

Is this specifically and the only point of having such a device? I've done a lot with SMS recently (and in the past), and have had a LOT of success with Gammu SMSD and this device: https://www.amazon.co.uk/dp/B00BD0V57I It appears as /dev/ttyUSB0 and works just like an "old school" AT modem for SMS sending and receiving.

linuxuser371038 05-10-2024 11:43 AM

Quote:

Originally Posted by TenTenths (Post 6500853)
Is this specifically and the only point of having such a device? I've done a lot with SMS recently (and in the past), and have had a LOT of success with Gammu SMSD and this device: https://www.amazon.co.uk/dp/B00BD0V57I It appears as /dev/ttyUSB0 and works just like an "old school" AT modem for SMS sending and receiving.

Not the only point no, for me anyway. The main point in my case is having a decent speed mobile internet connection but being able to use sms without using a phone is a convenient bonus. Much better for me considering I am always using my computer however rarely turn on my mobile phone.

EDIT: Hmm seems that ostent one is even rarer than the classic modems, in the uk at least, so a moot point.

Thanks for the recommendations. This might suit me. It might offer an alternative to the older 4g dongles which from what I am reading are now discontinued and they seem to have switched to RNDIS. The older dongles are hard to come by except in 2nd hand market it seems so maybe this thing you linked may be a drop in replacement.

The more I read on RNDIS the worse it sounds. I was reading earlier how one of the linux devs wants to get rid of it completely and rumours being it is due to it being inherently vulnerable and some 0day exploit existing they would rather not deal with and thus get rid of RNDIS completely. It was rumours but seems like there was something to it being vulnerable due to being a windows interface at its core.

TenTenths 05-13-2024 09:29 AM

Quote:

Originally Posted by linuxuser371038 (Post 6500940)
EDIT: Hmm seems that ostent one is even rarer than the classic modems, in the uk at least, so a moot point.

Really? I got one on Amazon UK last month, my friend got one a couple days later. Both arrived within a couple of days.

wpeckham 05-13-2024 12:45 PM

Quote:

Originally Posted by TenTenths (Post 6501400)
Really? I got one on Amazon UK last month, my friend got one a couple days later. Both arrived within a couple of days.

Got a link to the Amazon page for those devices? The OP might benefit..

TenTenths 05-13-2024 12:48 PM

Quote:

Originally Posted by wpeckham (Post 6501424)
Got a link to the Amazon page for those devices? The OP might benefit..

See post #9 🤣

linuxuser371038 05-14-2024 03:03 AM

Quote:

Originally Posted by TenTenths (Post 6501426)
See post #9 🤣

Yes I saw it there too but I do not use amazon, on principle :).


All times are GMT -5. The time now is 02:34 PM.