Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Dim:
- def config_write(lines):
- SER.send ('\r\nPress number to edit item or press esc to stop edit:')
- a = SER.receive(10)
- while (a!=chr(0x1b)):
- a = SER.receive(10)
- if (a==chr(48)):
- SER.send ('\r\nEnter new APN:')
- lines_num=0
- config_write_lines(lines,lines_num)
- if (a==chr(49)):
- SER.send ('\r\nEnter new CAID_1:')
- lines_num=1
- config_write_lines(lines,lines_num)
- if (a==chr(50)):
- SER.send ('\r\nEnter new CAID_2:')
- lines_num=2
- config_write_lines(lines,lines_num)
- if (a==chr(51)):
- SER.send ('\r\nEnter new CAID_3:')
- lines_num=3
- config_write_lines(lines,lines_num)
- if (a==chr(52)):
- SER.send ('\r\nEnter new IP:')
- lines_num=4
- config_write_lines(lines,lines_num)
- if (a==chr(53)):
- SER.send ('\r\nEnter new PORT:')
- lines_num=5
- config_write_lines(lines,lines_num)
- if (a==chr(54)):
- SER.send ('\r\nEnter new LOGIN:')
- lines_num=6
- config_write_lines(lines,lines_num)
- if (a==chr(55)):
- SER.send ('\r\nEnter new PASSWORD:')
- lines_num=7
- config_write_lines(lines,lines_num)
- SER.send ('\r\n\r\n')
- SER.send ('BYE!\r\n')
- return ()
Advertisement
Add Comment
Please, Sign In to add comment