You are not logged in.
Pages: 1
Hello Everyone,
I've started a little project in my spare time that some of you Aussies may be interested in, as the title says its a Telstra Broadband Manager. It's still in early its early stages but so far it can dial the modem, records usage (duration and data up/down), send/recieve SMS messages, use the service menu for recharges etc., and it shows the current signal strength. Oh yes and you can be connected to the internet and still be able to do everything else
Its not really ready for general consumption as of yet but let me know if there is any interest and what features anyone would like to see in it.
For those who care as it stands the project is based in python, using wxpython as the gui and pyserial for tty communications.
For the moment I'm wrapping wvdial as a dialer.
I've set the project up in a very modular way so in the future there will be a console only mode and probably support for using pppd/chat or possibly even just pppd as I'm already doing alot of serial comms for other features.
Cheers, Jon
Offline
Offline
Lovely
I presume this is for NextG? Is there a limit to which cards it works with (USB/PCMCIA etc)?
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
Its specifically for the MF626PP (USB) since thats the one I have. However if my information is correct (and I'll find out shortly if it is) all of the ZTE modems use the same AT command set so assuming you can get as far as opening the tty port for the modem it should work with only a few changes in the program.
It will probably switch to a general broadband manager eventually as I'm only travelling over here and go back to Canada in the fall so I'll want to be able to use it with Rogers as well
Offline
Little update... I've been talking with the ZTE tech support and all of the ZTE modems work the same way so it should work for any of them
Offline
Cool... Sounds good. Is that the one that installs itself as a CD drive until the drivers are loaded?
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
Yepper, thats the one
Offline
Ok its pretty much ready for you guys to tear it apart and tell me all the things I did wrong! All it needs is a new name.. thoughts? Right now I'm calling it Telstra Broadband Manager but I have the feeling Telstra may not like that name, so rather then change it later I'm going to change it before I release it.
Offline
For all those two people anxiously awaiting a good tool for connecting to there wireless broadband I present JBM (Jon's Broadband Manager) which should be ok until a good tool comes along
Project is now available at: https://launchpad.net/jbm
Let me know what you guys think, it is my first public project release so try to be nice
There is no proper installer or anything fancy like that yet but its pretty easy to install.
Exert from the readme...
Requirements:
Linux Kernal 2.2 or greater
Python 2.6
pyserial
Installation:
To install the project extract the python code to a known location (any will do)
Create the folder ~/.jbm
Copy wvdialrc from the installation folder into ~/.jbm
To run execute jbm.py
Optionally a script can be created to ease running of the application.
For example
Create file:
/usr/bin/jbm
Fill file with:
#!/bin/bash
python "<path jbm was installed to>/jbm.py" $1 $2 $3 $4 $5 $6 $7 $8 $9
Make file executable:
chmod +x /usr/bin/jbm
Known Bugs:
With application running if you unplug the modem and plug it back in SMS, Service Menu,
signal display will nolonger function.
Port/Modem detection only works if modem is plugged in before application is started.
Enjoy!
Jon Estey
Offline
Awesome, good work
I don't have a modem at the moment, but I'll give it a shot as soon as I can get my hands on one
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
Thanks
I'm thinking of doing a little rework to the app, I'm thinking of doing a c/c++ backend that deals with all of the serial port/connection messyness
then having a python frontend for the pretty interface. The reasons being:
pyserial doesn't release the serial port after closing it so if you unplug and replug the modem while JBM is running you end up with an additional few ttyUSBs and JBM stops working...
I wanted to add dbus support so that JBM would know when the modem is plugged in allowing it to setup ports dynamically but woefully pydbus only supports gtk main loops so it doesn't work with wx unless I have another thread running a gtk main loop, not so great..
All that being said I use JBM everyday and it works perfectly 99% of the time
Jon Estey
Offline
New release is up complete with automatic modem detection complete with usb modeswitching and tty detection, Should work for MF626, 636, and 628 other modems won't be automatically detected but the feature can be turned off for manual configuration. I'm working on
getting a list of released ZTE modems so they should all work in the future
For telstra prepaid you should just have to install all the requirements and run the program and everything should be configured for you
Its not very KISS at the moment but I'm working on a separate backend so hopefully in the future those who want a fast slim version will have the option.
Grab the release here https://launchpad.net/jbm/trunk/30-jul-2009
Cheers,
Jon Estey
Offline
Alright guys another release is up
Changes....
3-Aug-09 to 15-Aug-09 -> JE:
- jbm_serial
- Mostly redone
- Less loops in main thread (easier to read/debug/work with)
- No sub class for thread
- Longer timeouts
- Thread sleeps for longer if there is no current command and
no data coming in
- jbm
- modem detection timer is started when serial is disconnected
should work well for plugging/unplugging modem and leaving
program running
2-Aug-09 -> JE:
- jbm & jbm_usage
- Removed "with" for backward compat.
Cheers, Jon Estey
Offline
Another new release is up!
21-Aug-09 -> JE:
- jbm
- Fixed error in new SMS, reply_number should be defaulted to ""
not None
- Adjusted when SMS list is updated when a new sms is recieved
- Added config setting for automatically opening SMS messages
- Added notification dialog and setting
- Commented out SC_MSG_SMS_LIST processing as it is no longer
required
- jbm_serial
- Fixed error in command processing
- All buffer data is now processed before a new command is sent
Cheers,
Jon Estey
Offline
Just uploaded another release!
Get it here: https://launchpad.net/jbm
Change Log:
13-Sep-09 to 24-Sep-09 -> JE:
- jbm
- Added operators panel
- Signal strength timer is not stopped when sent and restarted
when returned to stop command buildup when slow commands
are running
- Added column width updating to SMS, usage, and options panels
- SMS Panel
- Added error checking to sms panel
- Added modem_tty check to activate
- Added not ready message
- jbm_serial
- Added SC_Op_Select to provide operator selection
- Added SC_OpList to provide operator listing
- Added slots to SMS class
- Added Operator class
- Added SC_LONG return value for commands that take extra time
- Adjusted how timeouts work, now as long as the command is processing
values the timeout is extended
- SC_SMS_List
- Now sends errors back to the callback
- Split command timeout and command complete into seperate checks
- Command timeout now completes the queue task
- Command timeout now returns the name of the command that timed out
and its callback (if one exists)
- jbm_queue
- Added JBM_MSG_OPLIST
- Added __str__ to JBM_Message
- jbm_wvdial
- Added is_connected
Offline
i get the following argument
Traceback (most recent call last):
File "/home/jedipottsy/.jbm/JBM/jbm.py", line 36, in <module>
import wx
ImportError: No module named wx
I have wvdial pyserial and wxpython and wxgtk installed
i managed to fix the problem by re-installing wxpython, strange that it didnt work. But now when i start JBM i get this
Config: Loading -> /home/jedipottsy/.jbm/config
Config: Get -> usage.rollup days
Config: Get -> usage.short format
Config: Get -> usage.long format
Config: Get -> general.detect tty
Config: Get -> general.check modem
Config: Saving -> /home/jedipottsy/.jbm/config
and a message in JBM says this when i try to connect
No valid modem found. Please connect a valid modem and try again.
i have a T-mobile 120 stick which is known as MF626 and Knetwork manager can see this as a valid device /dev/ttyUSB2
lsusb shows
Bus 001 Device 011: ID 19d2:2000 ONDA Communication S.p.A. ZTE MF627/MF628/MF628+ HSDPA
using usb_modeswitch (so that KNetwork can see the device) it changes to
Bus 001 Device 010: ID 19d2:0031 ONDA Communication S.p.A. ZTE MF636
even without changing the device to 19d2:0031 i cannot get JBM to recognize the device i have wvdial.rc setup correctly in the ~/.jbm folder showing /dev/ttyUSB2
Last edited by Jedipottsy (2009-09-25 15:48:23)
Offline
How long are you letting it run for?
It doesn't look like it has even scanned for a modem yet, this should happen when it first loads and then every 5 seconds or so until it finds a modem.
For example the first few lines of output from my current session are:
Config: Loading -> /home/jestey/.jbm/config
Config: Get -> usage.rollup days
Config: Get -> usage.short format
Config: Get -> usage.long format
Config: Get -> general.detect tty
Config: Get -> general.check modem
Checking port /dev/ttyUSB0
No data returned!
Checking port /dev/ttyUSB1
Checking port /dev/ttyUSB2
No data returned!
Checking port /dev/ttyUSB3
Unexpected data returned!
Config: Get -> general.detect tty
Config: Get -> general.check modem
Checking port /dev/ttyUSB0
No data returned!
Checking port /dev/ttyUSB1
Checking port /dev/ttyUSB2
No data returned!
Checking port /dev/ttyUSB3
Config: Set -> serial.port = /dev/ttyUSB1
Config: Set -> dialer.port = /dev/ttyUSB3
Config: Get -> serial.baud
Config: Get -> serial.timeout
Config: Get -> serial.port
Config: Get -> dialer.wvdialrc
Config: Get -> dialer.auto update rc
Config: Get -> dialer.port
Config: Get -> dialer.apn
One thing that I just thought of, are you running it as root or with sudo?
This is a requirement unless you have played with your permissions.
Cheers,
Jon Estey
Offline
If i let it run for a while, this is what i get
Config: Loading -> /home/jedipottsy/.jbm/config
Config: Get -> usage.rollup days
Config: Get -> usage.short format
Config: Get -> usage.long format
Config: Get -> general.detect tty
Config: Get -> general.check modem
Config: Get -> general.detect tty
Config: Get -> general.check modem
Config: Get -> general.detect tty
Config: Get -> general.check modem
Config: Get -> general.detect tty
Config: Get -> general.check modem
Config: Get -> general.detect tty
Config: Get -> general.check modem
Config: Get -> general.detect tty
Config: Get -> general.check modem
Config: Get -> general.detect tty
Config: Get -> general.check modem
Config: Saving -> /home/jedipottsy/.jbm/config
it just keeps repeating those lines, doesnt even attempt to check /dev/ttyUSB1
i think i may have installed incorrectly, where do i get wvdialrc from? What does the file contents look like?
Offline
wvdialrc is automatically generated by JBM it should be located in ~/.jbm/, it will be generated the first time you connect (so it won't be there yet).
Eureka! I know what the problem is, its in the way lsusb is listing your devices (this is how the modem detection works)
As an interm solution you can just turn of the modem detection in the options and it should run.
I'm working on a fix right now and will post up a new release in the next couple of days.
Cheers,
Jon Estey
Offline
Hey, turning modem detection to false seems to work.
Config: Loading -> /home/jedipottsy/.jbm/config
Config: Get -> usage.rollup days
Config: Get -> usage.short format
Config: Get -> usage.long format
Config: Get -> general.detect tty
Config: Get -> general.check modem
Config: Get -> general.detect tty
Config: Get -> general.check modem
Checking port /dev/ttyUSB1
Checking port /dev/ttyUSB2
Config: Set -> serial.port = /dev/ttyUSB1
Config: Set -> dialer.port = /dev/ttyUSB2
Config: Get -> serial.baud
Config: Set -> serial.baud = 9600
Config: Get -> serial.timeout
Config: Set -> serial.timeout = 0.5
Config: Get -> serial.port
Sending: AT+CSQ
Config: Get -> general.sc number
Config: Set -> general.sc number = +61418706700
Sending: AT+CSCA="+61418706700"
Sending: AT+CMGF=1
Sending: AT+CPMS="ME","ME","ME"
Sending: AT+CSQ
Sending: AT+CSQ
Config: Get -> dialer.wvdialrc
Config: Set -> dialer.wvdialrc = /home/jedipottsy/.jbm/wvdialrc
Config: Get -> dialer.auto update rc
Config: Set -> dialer.auto update rc = True
Dialer: Starting using /home/jedipottsy/.jbm/wvdialrc
Dialer: '--> WvDial: Internet dialer version 1.60'
Dialer: '--> Warning: section [Dialer Defaults] does not exist in wvdial.conf.'
Dialer: '--> Cannot open /dev/modem: No such file or directory'
Dialer: '--> Cannot open /dev/modem: No such file or directory'
Dialer: '--> Cannot open /dev/modem: No such file or directory'
Config: Get -> general.set nameserver
Config: Set -> general.set nameserver = True
Sending: AT+CSQ
Sending: AT+CSQ
Sending: AT+CMGL="ALL"
Sending: AT+CSQ
Sending: AT+CIMI
Sending: AT+GMR
Sending: AT+GSN
Sending: AT+GMM
Sending: AT+GMI
Sending: AT+CSQ
Sending: AT+CSQ
Sending: AT+CSQ
Config: Get -> dialer.auto update rc
Dialer: Starting using /home/jedipottsy/.jbm/wvdialrc
Dialer: '--> WvDial: Internet dialer version 1.60'
Dialer: '--> Warning: section [Dialer Defaults] does not exist in wvdial.conf.'
Dialer: '--> Cannot open /dev/modem: No such file or directory'
Dialer: '--> Cannot open /dev/modem: No such file or directory'
Dialer: '--> Cannot open /dev/modem: No such file or directory'
Config: Get -> general.set nameserver
Sending: AT+CSQ
Sending: AT+CSQ
Sending: AT+CSQ
Config: Get -> dialer.auto update rc
Dialer: Starting using /home/jedipottsy/.jbm/wvdialrc
Dialer: '--> WvDial: Internet dialer version 1.60'
Dialer: '--> Warning: section [Dialer Defaults] does not exist in wvdial.conf.'
Dialer: '--> Cannot open /dev/modem: No such file or directory'
Dialer: '--> Cannot open /dev/modem: No such file or directory'
Dialer: '--> Cannot open /dev/modem: No such file or directory'
Config: Get -> general.set nameserver
Sending: AT+CSQ
Sending: AT+CSQ
Sending: AT+CSQ
Sending: AT+CSQ
Sending: AT+CUSD=1,"#100#",15
Serial: Unknown Response: +CME ERROR: retry operation
Serial: Command Timeout
Sending: AT+CSQ
Sending: AT+COPS=?
Serial: Command Timeout
Sending: AT+CSQ
Config: Saving -> /home/jedipottsy/.jbm/config
but i cant seem to connect or scan for operators
Edit: another try and i get this
Config: Loading -> /home/jedipottsy/.jbm/config
Config: Get -> usage.rollup days
Config: Get -> usage.short format
Config: Get -> usage.long format
Config: Get -> general.detect tty
Config: Get -> general.check modem
Config: Get -> general.detect tty
Config: Get -> general.check modem
Checking port /dev/ttyUSB1
Checking port /dev/ttyUSB2
Config: Set -> serial.port = /dev/ttyUSB1
Config: Set -> dialer.port = /dev/ttyUSB2
Config: Get -> serial.baud
Config: Get -> serial.timeout
Config: Get -> serial.port
Sending: AT+CSQ
Config: Get -> general.sc number
Sending: AT+CSCA="+61418706700"
Sending: AT+CMGF=1
Sending: AT+CPMS="ME","ME","ME"
Sending: AT+CSQ
Config: Get -> dialer.wvdialrc
Config: Get -> dialer.auto update rc
Config: Get -> dialer.port
Config: Get -> dialer.apn
Config: Set -> dialer.apn = Telstra.internet
Config: Get -> dialer.baud
Config: Set -> dialer.baud = 7200000
Config: Get -> dialer.phone number
Config: Set -> dialer.phone number = *99#
Dialer: Starting using /home/jedipottsy/.jbm/wvdialrc
Dialer: '--> WvDial: Internet dialer version 1.60'
Dialer: '--> Cannot get information for serial port.'
Dialer: '--> Initializing modem.'
Dialer: '--> Sending: ATZ'
Dialer: 'ATZ'
Dialer: 'OK'
Dialer: '--> Sending: AT+CGDCONT=1,"IP","Telstra.internet"'
Dialer: 'AT+CGDCONT=1,"IP","Telstra.internet"'
Dialer: 'OK'
Dialer: '--> Sending: ATS30=0'
Dialer: 'ATS30=0'
Dialer: 'OK'
Dialer: '--> Modem initialized.'
Dialer: '--> Sending: ATM1L3DT*99#'
Dialer: '--> Waiting for carrier.'
Dialer: 'ATM1L3DT*99#'
Dialer: 'CONNECT 3600000'
Dialer: '--> Carrier detected. Starting PPP immediately.'
Dialer: '--> Starting pppd at Sun Sep 27 12:08:22 2009'
Dialer: '--> Pid of pppd: 11173'
Dialer: '--> pppd: p'
Dialer: '--> xR[1e] @[1e] [01]'
Dialer: '--> Using interface ppp0'
Dialer: '--> pppd: p'
Dialer: '--> xR[1e] @[1e] [01]'
Dialer: '--> pppd: p'
Dialer: '--> xR[1e] @[1e] [01]'
Dialer: '--> pppd: p'
Dialer: '--> xR[1e] @[1e] [01]'
Dialer: '--> pppd: p'
Dialer: '--> xR[1e] @[1e] [01]'
Sending: AT+CSQ
Dialer: '--> pppd: p'
Dialer: '--> xR[1e] @[1e] [01]'
Dialer: '--> pppd: p'
Dialer: '--> xR[1e] @[1e] [01]'
Dialer: '--> Disconnecting at Sun Sep 27 12:08:24 2009'
Dialer: '--> The PPP daemon has died: A modem hung up the phone (exit code = 16)'
Dialer: '--> man pppd explains pppd error codes in more detail.'
Dialer: '--> Try again and look into /var/log/messages and the wvdial and pppd man pages for more information.'
Config: Get -> general.set nameserver
Sending: AT+CSQ
Serial: Unknown Response: NO CARRIER
Sending: AT+CSQ
Sending: AT+COPS=?
Serial: Command Timeout
Sending: AT+CSQ
Serial: Command Timeout
Config: Saving -> /home/jedipottsy/.jbm/config
NVM ignore that, changed the apn in the program instead of thw wvdialrc and it works perfectly! Thank you!
Last edited by Jedipottsy (2009-09-27 10:14:35)
Offline
New Release is up!
https://launchpad.net/jbm/trunk/28-sep-09
27-Sep-09 -> JE:
- jbm_detect
- Updated usb_detect to fix an error with lsusb output that
contains extra device information
25-Sep-09 -> JE:
- jbm
- SMS Panel
- Activate no longer shows error message if its not supposed to
- Added msg_list check to read and delete
- Added return to error handling in sms_list_callback
- If an error occurs with listing init is resent
- Added update button
Cheers,
Jon Estey
Offline
Anyone know of a method for creating debian/ubuntu binary installers from arch?
Cheers,
Jon Estey
Offline
Pages: 1