nadsat

nadsat

Connecting EC25 using VintageNetMobile

Hi there, I’m trying to use VintageNetMobile with a Quectel EC25 modem in a rpi4, but I haven’t been able to get it work, when I run VintageNet.get_by_prefix() I got (the part related with ppp0):

  {["interface", "ppp0", "config"],
   %{
     type: VintageNetMobile,
     vintage_net_mobile: %{
       modem: VintageNetMobile.Modem.QuectelEC25,
       service_providers: [%{apn: "imovil.virginmobile.cl"}]
     }
   }},
  {["interface", "ppp0", "connection"], :disconnected},
  {["interface", "ppp0", "state"], :retrying},
  {["interface", "ppp0", "type"], VintageNetMobile}

It is posible to send AT commands (I don’t know why that works, because AFAIK the /dev/ttyUSB3 is used by VintageNetMobile.Modem.QuectelEC25)

iex(19)> Elixircom.run("/dev/ttyUSB3", speed: 115200)
at
OK
ATI
Quectel
EC25
Revision: EC25AUFAR02A04M4G

OK

the last thing that I get with dmesg

[    6.798652] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[    6.804770] brcmfmac: brcmf_cfg80211_set_power_mgmt: power save enabled
[   11.064161] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[   13.058396] usb 1-1.3: new high-speed USB device number 3 using xhci_hcd
[   13.199423] usb 1-1.3: New USB device found, idVendor=2c7c, idProduct=0125, bcdDevice= 3.18
[   13.208005] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[   13.216335] usb 1-1.3: Product: Android
[   13.221219] usb 1-1.3: Manufacturer: Android
[   13.305067] usbcore: registered new interface driver option
[   13.310936] usbserial: USB Serial support registered for GSM modem (1-port)
[   13.318297] option 1-1.3:1.0: GSM modem (1-port) converter detected
[   13.324980] usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB0
[   13.332511] option 1-1.3:1.1: GSM modem (1-port) converter detected
[   13.339184] usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB1
[   13.346472] option 1-1.3:1.2: GSM modem (1-port) converter detected
[   13.353126] usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB2
[   13.360397] option 1-1.3:1.3: GSM modem (1-port) converter detected
[   13.367007] usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB3

It’s important to note that I connect the modem with the rpi4 through USB, using an adapter. Any suggestion on how to debug the problem?. I tried connecting the modem in a Linux based computer and it worked (the ppp connection)

Marked As Solved

fhunleth

fhunleth

Co-author of Nerves

Could you check whether the wwan0 network interface is present? VintageNet.info and ifconfig can do this.

VintageNetMobile wants that the wwan0 interface is present before it even attempts to set up the PPP connection on /dev/ttyUSB3. If VintageNetMobile were a little smarter it could do better, but I believe this is the problem.

Since you have the modem’s serial ports working, I’m inferring that you’ve enabled the required kernel modules at vintage_net_mobile/lib/vintage_net_mobile/modem/quectel_EC25.ex at main · nerves-networking/vintage_net_mobile · GitHub. If you haven’t, then maybe that’s the issue (plus I’m surprised that the serial ports showed up)

As a final guess, could you run dmesg? There might be a hint in the kernel logs as to why wwan0 isn’t showing up or maybe something else is happening.

Also Liked

nadsat

nadsat

Thank you for your answer.

I had a couple of modules missing (CONFIG_USB_SERIAL_WWAN and CONFIG_USB_WDM).

By the way, the same configuration works with the simcom 7600

nadsat

nadsat

It worked straight away with the configuration of the EC25, there is an issue related with simcom modems, I commented there.

https://github.com/nerves-networking/vintage_net_mobile/issues/76

just let me know if there is anything else to test

nadsat

nadsat

I added these modules to a base Nerves system (in my case was rpi4)

CONFIG_PPP=m
CONFIG_PPP_BSDCOMP=m
CONFIG_PPP_DEFLATE=m
CONFIG_PPP_FILTER=y
CONFIG_PPP_MPPE=m
CONFIG_PPP_MULTILINK=y
CONFIG_PPP_ASYNC=m
CONFIG_PPP_SYNC_TTY=m
CONFIG_USB_NET_CDC_NCM=m
CONFIG_USB_NET_HUAWEI_CDC_NCM=m
CONFIG_USB_NET_QMI_WWAN=m
CONFIG_USB_SERIAL_OPTION=m
CONFIG_USB_SERIAL_WWAN=m
CONFIG_USB_WDM=m
CONFIG_USB_USBNET=m
CONFIG_USB_NET_DRIVERS=m

in the nerves_defconfig

BR2_PACKAGE_USB_MODESWITCH=y
BR2_PACKAGE_PPPD=y
BR2_PACKAGE_PPPD_FILTER=y
BR2_PACKAGE_BUSYBOX_CONFIG_FRAGMENT_FILES="${NERVES_DEFCONFIG_DIR}/busybox.fragment"

and the busybox.fragment

CONFIG_MKNOD=y
CONFIG_WC=y

finally the configuration in target.exs

{"ppp0",
  %{
    type: VintageNetMobile,
    vintage_net_mobile: %{
      modem: VintageNetMobile.Modem.QuectelEC25,
      service_providers: [
        %{apn: "apn.provider.com"}
      ]
    }
}}

That worked for both EC25 and sim7600

Where Next?

Popular in Questions Top

_russellb
I want to try my hand at web scraping. What tools/libraries do I need to use. I’m hoping to turn this into something professional so don’...
New
vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
greenz1
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
earth10
Hi, I’m just starting to build a side-project with Elixir and Phoenix and doing some basic test with Elixir alone. What strikes me is th...
New
Emily
I have VueJS GUIs with the project generated using Webpack. I have Elixir modules that will need to be used by the VueJS GUIs. I forese...
New
belgoros
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
ycv005
I have followed this StackOverflow post to install the specific version of Erlang. And When I am running mix ecto.setup then getting fol...
New
vegabook
I’m brand new to Phoenix and I have stripped one of the demo applications to the bone. I just want to get an svg up on the screen. Here i...
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
JDanielMartinez
Hi! May someone helps me, please! I have two apps into an umbrella project: the first one is Database, which manages queries, and the se...
New

Other popular topics Top

JakeBecker
TL;DR: I’ve just released an implementation of Microsoft’s IDE-independent Language Server Protocol for Elixir. It adds language support ...
1144 53690 245
New
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
johnnyicon
Hi all, I’ve just started learning Elixir and Phoenix Framework, so please pardon my n00bness at this stage. I’m trying to use Postgres...
New
stefanluptak
Hello everybody, usually, I use a 29" ultra-wide monitor for VSCode which can easily accomodate explorer (files panel) + file with code ...
New
gausby
I asked this very same question on twitter and got some interesting feedback, but I thought it would be a good question to ask here as we...
1207 39297 209
New
saif
Hello everyone, Long time lurker first time poster here. I’ve recently begun working on Elixir full-time again! :raised_hands: It’s been...
New
marick
I had some trouble figuring out how to make many-to-many associations work. Once I got it working, I wrote a blog post. Because I’m a nov...
New
openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New

We're in Beta

About us Mission Statement