**** BEGIN LOGGING AT Fri Mar 26 02:59:56 2021 Mar 26 07:47:44 set_ Mar 26 12:21:37 tank as in vessel containing stuff or a vehicle with treads and a turret Mar 26 12:50:17 Hi, for PPP networking, there are a few scripts for connection, after it is connected, it adds entries into routing table. Try to figure out the location of script code or command for doing that. My purpose is to modify it and add metric into routing IP. Mar 26 12:56:45 this is for your wan modem? hmm, it doesn't support showing up as usb ethernet-like device? Mar 26 12:58:24 we added external cell modem Mar 26 12:58:48 yes I know, that's why I asked Mar 26 12:59:32 I guess it is wan modem (cellular modem) Mar 26 13:01:48 the question still stands: assuming it's attached via usb, is it not capable of acting like an ethernet-like device (I think every cellular modem I've ever looked at had that capability) instead of having to use ppp ? Mar 26 13:02:32 what's so bad about using ppp? Mar 26 13:02:53 besides, you still need to configure a bunch of things, usually that's done with AT commands Mar 26 13:03:09 from what I can tell, no connman support for it Mar 26 13:03:36 It doesn't show up as usb ethernet-like device. It needs wan driver. Right now, it is configured as PPP network through modem UART port. Mar 26 13:03:44 and that's why we don't use connman for the gsm/3g/4g connection Mar 26 13:04:02 mru: yeah but that probably means he'll have to ditch connman entirely Mar 26 13:04:16 they coexist nicely here Mar 26 13:04:23 really? interesting Mar 26 13:04:40 my understanding was that connman is rather persistent about enforcing its idea of what the default route should be Mar 26 13:04:58 connman is configured to ignore the ppp interface Mar 26 13:05:08 PPP networking works. it creates as ppp0 dev, everything is ok. except I want to make some improvements Mar 26 13:05:17 pppd sets a second default route with a higher metric Mar 26 13:05:20 kernel does the rest Mar 26 13:05:53 pppd sets default gw with metric 0 Mar 26 13:06:08 not if you patch it and configure it otherwise Mar 26 13:06:09 I want to make it as higher metric Mar 26 13:06:13 mru: interesting, that's not the behaviour I've read in posts I encountered, e.g.: "Unfortunately, PPPD Mar 26 13:06:16 tries to set the default route to the new interface thereby deleting Mar 26 13:06:16 and re-establishes the default route." Mar 26 13:06:19 the default route established by Connman. Connman in turn notices this Mar 26 13:06:19 crap, sorry Mar 26 13:06:24 hardwrap :( Mar 26 13:07:12 and I've often seen people with really weird routing tables whenever they try to configure things around connman's back, hence my concern Mar 26 13:07:35 but if it works it works I guess Mar 26 13:07:50 I can manually do it, by deleting entries added, then adding back with metric Mar 26 13:08:56 I like to make cellular modem coexists with wifi, and wifi has precedence Mar 26 13:10:25 yes I know... which is why I had hoped you could just use connman, since I think it selects the default route based on an online-check (which is probably superior to a metric-based solution in real-world scenarios, i.e. it will ensure the cellular fallback is used if the wifi connection has no internet) Mar 26 13:10:56 Also, currently, if cell is on, then connect wifi, and disconnect wifi, will make cell on work, because gw routing is deleted when wifi is off, Mar 26 13:11:55 yeah because you're going behind its back hence end up fighting it Mar 26 13:12:12 pppd 2.4.8 added a 'defaultroute-metric' option Mar 26 13:12:35 I haven't use connman for ppp, yet. Mar 26 13:12:42 tiger: what cellular module are you using? Mar 26 13:12:54 quectel bg96 Mar 26 13:13:38 connected via usb? Mar 26 13:13:50 the trickier part was getting everything to use the correct dns server Mar 26 13:14:45 connected through UART port Mar 26 13:14:56 oh Mar 26 13:14:58 oof Mar 26 13:15:25 well then you really are stuck with ppp I guess Mar 26 13:15:34 pppd connects it through dial-up script Mar 26 13:17:16 I had wan driver installed and worked with usb connection, but this one is UARt serial connection. It is hard to figure out serial WAN. Mar 26 13:18:50 yeah, using uart connection does not sound ideal Mar 26 13:20:02 hardware design limits usb connection. Hardware guys think uart is easier Mar 26 13:20:40 is this beaglebone + external cape, or a custom design based on the am335x ? Mar 26 13:21:00 this is the script for connections: https://pastebin.com/CEWAP6Sp Mar 26 13:21:06 in the former case yeah I understand why they don't want to use usb Mar 26 13:21:59 it is pretty much based on Beaglebone Black Wireless , Rev C boards (am335x) Mar 26 13:22:31 so it's a custom design? then there's really no excuse for using uart instead of usb for the connection Mar 26 13:23:07 It is custom design, but it is a copy of beaglebone black Mar 26 13:23:34 with your custom stuff added Mar 26 13:23:39 it's a custom design. Mar 26 13:24:46 not much, we added out custom powering circuit. The rest is the same. Cellular is connected to a uart port UARt2) Mar 26 13:25:53 beaglebone black only has two ports of usb, one is for device, and the other is for micro usb host. So no room for usb connection of cellular Mar 26 13:26:02 connecting it to the usb host port would not have been significantly more difficult (unless you need that usb host port too) Mar 26 13:26:08 there's no "micro usb host" Mar 26 13:26:14 there's the micro usb device port, and the host port Mar 26 13:26:35 the modem would take the place of the usb host port (since it would effectively be plugged into it) Mar 26 13:27:03 anyway, doesn't matter if the hardware has already been designed (without software consideration :P ) Mar 26 13:28:07 ok. micro usb device port and host port. We have to add a usb hub for cellular usb connection. So,  hardball kicks to software. It is true, it IS UART now, any way Mar 26 13:28:37 I see, so you do need the host port also for things, ok Mar 26 13:28:47 and the device port too? Mar 26 13:29:12 doesn't matter, too late anyway Mar 26 13:29:15 the micro usb port is used for flashing firmware Mar 26 13:30:44 anyway, I don't know anything about pppd, though mru mentioned an option for changing the default metric Mar 26 13:31:00 I pasted pppd.sh in pastebin, not sure you can take a quick look. I did not find anything that sets routing IP Mar 26 13:32:11 I have connman setup, I saw p2p technologies in connman, Let me try connman, and mru's suggestions Mar 26 13:32:25 as for default route disappearing when you bring wifi up/down, connman expects full control over the default route... if you're going to go behind its back by using pppd (and I think you have no choice since connman doesn't support ppp interfaces from what I've been able to find), it might be a good idea to switch to systemd-networkd which I'm pretty sure isn't as obsessive Mar 26 13:32:30 p2p isnt ppp Mar 26 13:33:21 then there is no ppp in connman Mar 26 13:33:29 don't know how Mar 26 13:34:19 the worst part is, connman does have some amount of integration support for pppd, but it's used for pptp and l2tp vpn tunnels, not for normal ppp connections Mar 26 13:35:05 The worst case, I think, I can run an autoscript, deletes all routing IPs added, and creates new one. Put everything I manually do into script Mar 26 13:35:28 and then pray connman doesn't undo it? Mar 26 13:37:11 connman seems not do much in ppp case, at least I haven't notice anything yet. Manual steps, or current one at-a-time (wifi and cell) work ok. Mar 26 14:12:40 @mru Hi, I added : defaultroute defaultroute-metric 10 into the script ( https://pastebin.com/ZcZ2ujYF ). It doesn't work Mar 26 14:13:06 Not sure that is the way to add Mar 26 14:24:19 this is the pppd config file we use: https://github.com/victronenergy/meta-victronenergy/blob/master/meta-venus/recipes-connectivity/ppp/files/provider Mar 26 14:51:15 I tried several times, added to options file or into script command, both failed:   /etc/ppp/options: unrecognized option 'defaultroute-metric' Mar 26 14:51:53 which pppd version do you have? Mar 26 14:52:43 that option was added in 2.4.8 Mar 26 14:53:41 how to show version for pppd? pppd --version or -version not working Mar 26 14:54:19 pppd --version works here Mar 26 14:54:33 or any invalid option Mar 26 14:55:14 pppd version 2.4.7 Mar 26 14:55:30 then you need to update it Mar 26 14:55:32 Let me update it Mar 26 14:59:08 for buster version: it is Package: ppp (2.4.7-2+4.1+deb10u1), already latest. It doesn't let me to update Mar 26 15:03:24 downloaded 2.4.9, don't know it can be installed or it needs dependency Mar 26 15:04:49 since you have the older version installed, you obviously also have the dependencies Mar 26 15:04:57 I doubt there are any new ones in the latest version Mar 26 15:44:56 mru: to compile it you probably need the -dev packages Mar 26 15:46:19 the source package lists libpam0g-dev, libpcap0.8-dev, libssl-dev, libsystemd-dev, zlib1g-dev Mar 26 16:18:52 I have trouble to install: It needs libcrypt1, and I downloaded libcrypt1_4.4.17-1_armhf, which breaks libc6 (<< 2.29-4) Mar 26 16:20:09 yeah don't do that. don't try to install ppp from a later debian release, that's going to break your whole system Mar 26 16:20:20 if you really need a newer pppd, compile it from source Mar 26 16:23:05 I think I am going to run a script to delete and add routing IPs. I believe it shall work **** ENDING LOGGING AT Sat Mar 27 02:59:58 2021