wwan: Add support for Gemalto Cinterion cellular modules
Includes specific support for PH8(1e2d-0053) / ELS61(1e2d-005b) modules.
Note for ELS61, the serial driver changes from serial option(ttyUSB) to usb-cdc (ttyACM).
Two additional fixes in this commit resolve issues with ttyACM devices: -
* wwan.sh - sys-fs has a subdirectory indirection (*/tty/ttyACMx) which was not handled properly
* wwan.usb - dependent scripts were not included, so this never actually called proto_set_available for example (and relied on inadvertent call for ttyUSB case)
Signed-off-by: David Thornley <david.thornley@touchstargroup.com>
(cherry picked from commit cb262b0939)
			
			
This commit is contained in:
		
				
					committed by
					
						
						John Crispin
					
				
			
			
				
	
			
			
			
						parent
						
							2ac5800fd9
						
					
				
				
					commit
					c4a0c0718a
				
			
							
								
								
									
										6
									
								
								package/network/utils/wwan/files/data/1e2d-0053
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								package/network/utils/wwan/files/data/1e2d-0053
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,6 @@
 | 
				
			|||||||
 | 
					{
 | 
				
			||||||
 | 
						"desc": "Cinterion PH8",
 | 
				
			||||||
 | 
						"control": 2,
 | 
				
			||||||
 | 
						"data": 3
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
							
								
								
									
										5
									
								
								package/network/utils/wwan/files/data/1e2d-005b
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								package/network/utils/wwan/files/data/1e2d-005b
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,5 @@
 | 
				
			|||||||
 | 
					{
 | 
				
			||||||
 | 
						"desc": "Cinterion ELS61",
 | 
				
			||||||
 | 
						"control": 1,
 | 
				
			||||||
 | 
						"data": 0
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -59,7 +59,7 @@ proto_wwan_setup() {
 | 
				
			|||||||
		json_set_namespace $old_cb
 | 
							json_set_namespace $old_cb
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		[ -n "$control" -a -n "$data" ] && {
 | 
							[ -n "$control" -a -n "$data" ] && {
 | 
				
			||||||
			ttys=$(ls -d /sys/bus/usb/devices/$devicename/${devicename}*/tty* | sed "s/.*\///g" | tr "\n" " ")
 | 
								ttys=$(ls -d /sys/bus/usb/devices/$devicename/${devicename}*/tty?* /sys/bus/usb/devices/$devicename/${devicename}*/tty/tty?* | sed "s/.*\///g" | tr "\n" " ")
 | 
				
			||||||
			ctl_device=/dev/$(echo $ttys | cut -d" " -f $((control + 1)))
 | 
								ctl_device=/dev/$(echo $ttys | cut -d" " -f $((control + 1)))
 | 
				
			||||||
			dat_device=/dev/$(echo $ttys | cut -d" " -f $((data + 1)))
 | 
								dat_device=/dev/$(echo $ttys | cut -d" " -f $((data + 1)))
 | 
				
			||||||
			driver=comgt
 | 
								driver=comgt
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,10 @@
 | 
				
			|||||||
 | 
					#!/bin/sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[ "$ACTION" = add -a "$DEVTYPE" = usb_device ] || exit 0
 | 
					[ "$ACTION" = add -a "$DEVTYPE" = usb_device ] || exit 0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					. /lib/functions.sh
 | 
				
			||||||
 | 
					. /lib/netifd/netifd-proto.sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
vid=$(cat /sys$DEVPATH/idVendor)
 | 
					vid=$(cat /sys$DEVPATH/idVendor)
 | 
				
			||||||
pid=$(cat /sys$DEVPATH/idProduct)
 | 
					pid=$(cat /sys$DEVPATH/idProduct)
 | 
				
			||||||
[ -f "/lib/network/wwan/$vid:$pid" ] || exit 0
 | 
					[ -f "/lib/network/wwan/$vid:$pid" ] || exit 0
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user