METALiST

Raspberry Pi - 3GDongle

Dec 7th, 2019 (edited)
288
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. 1. sudo apt update ; sudo apt install -y libusb-dev usb-modeswitch git ; cd ~/ ; sudo git clone https://github.com/Trixarian/sakis3g-source.git ; cd sakis3g-source ; sudo ./compile stripped ; sudo mv build/sakis3gz /usr/bin/sakis3g ; cd ~/ ; sudo rm -rf sakis3g-source
  2. 2. clear ; cd /dev ; ls ; sudo lsusb ; cd ~/
  3. 3. sudo nano /usr/bin/connect.py (и вставить содержимое ниже: ↓)
  4.  
  5.  
  6. import os
  7. while True:
  8. status = __import__('subprocess').getoutput('sudo sakis3g status')
  9. if status == 'Not connected.':
  10. os.system('''sudo sakis3g connect USBMODEM="ID" APN="CUSTOM_APN" CUSTOM_APN="internet" APN_USER="0" APN_PASS="0"''')
  11.  
  12.  
  13. 4. sudo nano /etc/rc.local
  14. 5. sudo python3 /usr/bin/connect.py &
  15.  
  16.  
  17. sudo sakis3g --interactive
Add Comment
Please, Sign In to add comment