Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 10 Feb 2016, 20:39
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Network
pgprs-2.0 beta version - January 27, 2016
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [9 Posts]  
Author Message
rerwin


Joined: 24 Aug 2005
Posts: 1648
Location: Maine, USA

PostPosted: Mon 25 Jan 2016, 12:41    Post subject:  pgprs-2.0 beta version - January 27, 2016
Subject description: Upgrade of original pgprs
 

Pgprs-2.0 will be a reorganized version of the original pgprs that employs a more standard implementation and an improved user interface. It includes a new interface script, pgprs, and logic similar to frisbee's Mobile Wireless (GPRS) function.

Now, the modem and phone number fields are replaced by drop-down lists for selection. Those lists are maintained in a new configuration file, gprs.conf, making it possible for developers and users to add device file names as they appear -- but new names should also be reported here, so they can be added officially.

Initially, I am providing a beta version for verification that connections function as they should. I do not have a 3G modem to test with, so rely on users to confirm that operation or report failures. Once correct operation is confirmed, I plan to then upload a package named pgprs-2.0.

Included below is an update to the connection wizard and the script that responds to connect/disconnect initiation from the network tray icon. That update is backward compatible, so can be installed even without pgprs-2.0. That "connect_updates" package contains a version for modern puppies (tahrpup, slacko) and a "legacy" version. (The correct version is installed based on the presence of the /usr/lib/gtkdialog directory.)

Thank you to 01micko for the pgprs2 interim solution to the absence of pgprs in tahrpup, which was necessary due to the removal of the all-firmware directory on which the old pgprs depends.

Thanks, too, to Lazy Pup for his help with some of the debugging.

Please report any problems here or by PM. Thanks for supporting this upgrade to pgprs.
Richard
connect_updates-20160126.pet
Description  Connect wizard and Connect/AppRun using standard interfaces
to pgprs and frisbee
pet

 Download 
Filename  connect_updates-20160126.pet 
Filesize  10.22 KB 
Downloaded  8 Time(s) 
pgprs-1.5.2-20160127-beta.pet
Description  Beta version of potential pgprs-2.0
pet

 Download 
Filename  pgprs-1.5.2-20160127-beta.pet 
Filesize  9.17 KB 
Downloaded  9 Time(s) 

Last edited by rerwin on Thu 28 Jan 2016, 07:38; edited 4 times in total
Back to top
View user's profile Send private message 
watchdog

Joined: 28 Sep 2012
Posts: 929

PostPosted: Mon 25 Jan 2016, 15:30    Post subject:  

Working here in slacko 6.3.0 32 bit! Firewall setup required. I'm posting by a 3G usb modem dongle connection:

Code:
Attempting connection through /dev/ttyUSB0 to APN internet.wind...

Press CTRL-C to close the connection at any stage!
defining PDP context...

AT
OK
AT
OK
AT+CGDCONT=1,"IP","internet.wind"
OK
ATH
OK
ATE1
OK
AT+CSQ
waiting for connect...

+CSQ: 15,99

OK
ATD*99***1#
CONNECT
Connected.
If the following ppp negotiations fail,

try restarting the phone.

Script chat -v -f /etc/ppp/chatscripts/gprs-connect-chat finished (pid 24221), status = 0x0
Serial connection established.
using channel 1
Using interface ppp0
Connect: ppp0 <--> /dev/ttyUSB0
Warning - secret file /etc/ppp/pap-secrets has world and/or group access
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0xfaab41c6> <pcomp> <accomp>]
rcvd [LCP ConfReq id=0x0 <asyncmap 0x0> <auth chap MD5> <magic 0xf43d5a> <pcomp> <accomp>]
No auth is possible
sent [LCP ConfRej id=0x0 <auth chap MD5>]
rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0xfaab41c6> <pcomp> <accomp>]
rcvd [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0xf43d5a> <pcomp> <accomp>]
sent [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0xf43d5a> <pcomp> <accomp>]
sent [LCP EchoReq id=0x0 magic=0xfaab41c6]
kernel does not support PPP filtering
sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
rcvd [LCP DiscReq id=0x2 magic=0xf43d5a]
rcvd [LCP EchoRep id=0x0 magic=0xf43d5a fa ab 41 c6]
rcvd [IPCP ConfNak id=0x1 <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
sent [IPCP ConfReq id=0x2 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
rcvd [IPCP ConfReq id=0x0]
sent [IPCP ConfNak id=0x0 <addr 10.0.0.1>]
rcvd [IPCP ConfNak id=0x2 <addr 10.43.65.20> <ms-dns1 193.70.152.25> <ms-dns2 212.52.97.25>]
sent [IPCP ConfReq id=0x3 <addr 10.43.65.20> <ms-dns1 193.70.152.25> <ms-dns2 212.52.97.25>]
rcvd [IPCP ConfReq id=0x1]
sent [IPCP ConfAck id=0x1]
rcvd [IPCP ConfAck id=0x3 <addr 10.43.65.20> <ms-dns1 193.70.152.25> <ms-dns2 212.52.97.25>]
local  IP address 10.43.65.20
remote IP address 10.0.0.1
primary   DNS address 193.70.152.25
secondary DNS address 212.52.97.25


/etc/pgprs.conf:

Code:
GPRSDEV=/dev/ttyUSB0
GPRSNBR=*99***1#
GPRSAPN=internet.wind
GPRSPIN=
GPRSUSER=
GPRSPAPONLY=false
GPRSNBRS='*99# #777 *99***1# *99***2# *99***3# *99***4#'
GPRSOTHERDEVS='/dev/ircomm* /dev/ttyUB* /dev/ttyS0 /dev/ttyS1'


Problems with connect-updates: after closing the 3G connection I was not able to setup the eth0 connection again by the internet connection wizard. I removed connect-updates, restarted X and now I'm with eth0 again.
Back to top
View user's profile Send private message 
rerwin


Joined: 24 Aug 2005
Posts: 1648
Location: Maine, USA

PostPosted: Tue 26 Jan 2016, 14:11    Post subject:  

watchdog,
Thank you very much, for trying the packages, showing us what success looks like, and reporting the problem.
watchdog wrote:
Problems with connect-updates: after closing the 3G connection I was not able to setup the eth0 connection again by the internet connection wizard. I removed connect-updates, restarted X and now I'm with eth0 again.
To work the problem, I need more details. First, are there any connectwizard/pgprs error messages at the end of file /etc/xerrs.log? Assuming there are none, please tell me what you did and saw after clicking the "Disconnect" button in the connection window.

Note that this version of pgprs disables the other networks, to prevent the network controller (dhcpcd) from interrupting the connection. 01micko has recommended that to me.

Thanks for your help.
Richard
Back to top
View user's profile Send private message 
watchdog

Joined: 28 Sep 2012
Posts: 929

PostPosted: Tue 26 Jan 2016, 15:43    Post subject:  

rerwin wrote:

end of file /etc/xerrs.log? Assuming there are none, please tell me what you did and saw after clicking the "Disconnect" button in the connection window.


After disconnecting the mobile modem clicking on Connect on the desktop does not open the default connection manager which is Network Wizard for me. Network Wizard does not work from Menu-Setup-Internet Connection Wizard, too.

Quote:
Note that this version of pgprs disables the other networks, to prevent the network controller (dhcpcd) from interrupting the connection. 01micko has recommended that to me.


Yes, a running dhcpd updates resolv.conf which is not good but when you close pgprs2 you might be able to setup eth0 again.
Back to top
View user's profile Send private message 
rerwin


Joined: 24 Aug 2005
Posts: 1648
Location: Maine, USA

PostPosted: Wed 27 Jan 2016, 00:28    Post subject:  

A-hah! And oops.

The clue is an error message in xerrs.log. It is a bug I fixed in my test setup but did not fully implement in the development copy. (The problem is that the command, cut -f 2 -d \", confuses the parser inside `...` but is OK in $(...) -- both should execute the command.)

The corrected package is now uploaded above. Thank you to all three who downloaded the original -- please replace your copy with the new connect_updates package.
R
Back to top
View user's profile Send private message 
watchdog

Joined: 28 Sep 2012
Posts: 929

PostPosted: Wed 27 Jan 2016, 01:38    Post subject:  

In someway it works but there is a bug. I disconnected eth0 right-clicking the network-tray down-right and connected by pgprs2 and the mobile modem after installing the new connect_updates. The connection was successfull and I was fully online but the window said "connection unsuccessfull". I attach screenshot. There was not a disconnect button. I clicked OK and the log-window closed and then I launched pgprs2 again from Menu-Network: it detected a connection alive and offered to disconnect. I disconnected and was able to setup eth0 again.
screenshot.png
Description 
png

 Download 
Filename  screenshot.png 
Filesize  134.2 KB 
Downloaded  21 Time(s) 
Back to top
View user's profile Send private message 
rerwin


Joined: 24 Aug 2005
Posts: 1648
Location: Maine, USA

PostPosted: Wed 27 Jan 2016, 14:28    Post subject:  

watchdog wrote:
The connection was successful and I was fully online but the window said "connection unsuccessful". I attach screenshot. There was not a disconnect button.
Thanks for that report. This is the area where I am dependent on your help. The test for success checks for a file named /var/run/ppp-gprs.pid. When you are connected through pgprs, please check for that file or something similar ( /var/run/ppp*). If the file is present, that suggests that pgprs is not waiting long enough for the ppp daemon to get started and create the file. If there is only another, similar, file, please tell me its name.

Maybe I need to change the 'sleep 1' (in /usr/local/pgprs/pgprs-connect) to a loop to keep checking for, say, 10 seconds.
R
Back to top
View user's profile Send private message 
watchdog

Joined: 28 Sep 2012
Posts: 929

PostPosted: Wed 27 Jan 2016, 17:00    Post subject:  

I can't replicate the first behaviour: I have reinstalled connect_updates and it's now properly working (three attempts to replicate the error...). In /var/run there are ppp-gprs.pid and ppp0.pid. Maybe a "sleep 5" before checking success of the connection could solve a possible bad start of the script which is indeed very fast. It's solved for me. Many thanks.
Back to top
View user's profile Send private message 
rerwin


Joined: 24 Aug 2005
Posts: 1648
Location: Maine, USA

PostPosted: Wed 27 Jan 2016, 21:16    Post subject:  

That is good news. I suspect that connecting the first time since boot requires extra time for the ppp components to load from disk or elsewhere in RAM, causing a small delay in the appearance of the file used as the indicator of a connection.

To address that, I have added a 5-second loop that tests every second until the file appears, or stops trying. Uploaded as "20160127"
R

EDIT: I have now restored the connect_updates package inadvertently replaced by the updated pgprs.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [9 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Network
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0664s ][ Queries: 12 (0.0102s) ][ GZIP on ]