At first, when no username and password are required by APN, you need to set something anyway. If your operator indeed does not need it, it will work. Try these for example: APN_USER="foo" APN_PASS="bar" and it will work.
Since it seems not that easy to work around this problem, we should establish a plan. Possible causes:
- Wrong modem initialization:
- You can try connecting with Sakis3G and check whether initialization done by Sakis3G prevents this behavior.
- In case your Windows driver contains an *.inf file containing AT commands, you may have a look there for locating an AT command which looks interesting.
- Buggy modem firmware (which by the way, I sense is the reason):
- Check with another modem model whether this behavior persists. If no other modem is available, you may get your hands on a 3G cellular phone. Almost all 3G capable phones (with a USB port), expose their modem as a USB interface.
- Something wrong with pppd/setup (I doubt about it. Problem looks like being beyond USB port):
- Maybe try with another distribution.
- If possible, try with one operating system for which drivers are embedded on device.
- Something wrong with operator:
- Try inserting a SIM card from another operator on modem and check if behavior persists. If modem is locked-to-network, try inserting modem's SIM card on an another modem/phone and check if problem persists.
- If it is indeed operator derived, since replugging modem works, you could try those AT commands below. These instruct modem to re-register on network (I doubt it will work, since CFUN commands also result into same thing, but you should try it as well).
Command is AT+COPS (abbreviation for "operator selection").
1. Checks whether command is supported. Any modern modem should be OK with this one and return available networks (scans for network). When using it with chat-program you need to provide argument -t (timeout) to a large value, as it may take long for modem to respond. Example: chat -e -t 120 "" AT OK 'AT+COPS=?' OK AT OK
2. Returns current settings:
Response is of the following format: <mode>,[<format>,<operator>]
Mode denotes network search mode and can be:
0 = Automatic network registration. Whichever network allows access and has better signal is automatically selected.
1 = Manual network selection. This means that <format> and <operator> fields will be present, denoting currently "manual" settings, even if modem is currently unable to reach assigned network.
2 = Instructed to not register any network.
4 = Manual network selection (same as 1), but, in the absence of appointed network, it will automatically switch to Automatic mode (same as 0). This one is more like a "preference mode".
Format denotes format in which <operator> field is presented and can be:
0 = Long string representation of network name (which might be different from operator name, in case operator is a VNVO or MVNO, I don't remember exactly. Anyway, if operator is a virtual operator using another operator's network).
1 = Short string representation of network name (suitable for being displayed by cellular phones).
2 = Numeric ID of network. 5 or 6 digits. First three denote country code, the rest uniquely identify network within country.
[b]Operator[b] field provides selected network detail specified by <format> field. This field is not present when modem is not registered to any operator, with the exception of modes 1 and 4.
3. Set command. Sets preferences of network search mode and preferred network. Additional mode "3" is supported, for setting preferred format without changing value.
Code:
Sets numeric presentation for further queries:
AT+COPS=3,2
Code:
Manually selects network 20205:
AT+COPS=1,2,"20205"
Idea behind these all, is to force modem to attempt and log another one network (so that it disconnects from present one) and then instruct it to re-register correct one (in case this fixes NO CARRIER issue). Also, I would suggest to use a terminal emulation software than mess with chat from command line, as it might take long (gtkterm is a good one). Scenario is like this (example lists numeric IDs of Greek networks, you adapt accordingly):
Code:
# Request that all information is printed with numeric IDs. Trust me, is better like this:
You type: AT+COPS=3,2
Modem replies: OK
# Read currently registered network
You type: AT+COPS?
Modem replies: AT+COPS=0,2,"20205"
Modem replies: OK
# Scan for available networks (it will take a while):
You type: AT+COPS=?
# I don't remember exact format, but should look like:
Modem replies: AT+COPS=(..."20201"...), (..."20205"...), (..."20210"...)
Modem replies: OK
# You then instruct it to register a random other one:
You type: AT+COPS=1,2,"20201"
Modem replies: OK
# And then force it to re-register home network:
You type: AT+COPS=1,2,"20205"
Modem replies: OK
Have terminal software closed (for the ttyUSB port to get released) and try connecting again.
Sakis
Bookmarks