Search
Search titles only
By:
Search titles only
By:
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Forums
New posts
All threads
Latest threads
New posts
Trending threads
Trending
Search forums
What's new
New posts
New ads
New profile posts
Latest activity
Free Ads
Latest reviews
Search ads
Members
Current visitors
New profile posts
Search profile posts
Contact us
Latest ads
Colombo
Red Hat Certified System Administrator (RHCSA) - RHEL 10
Sanjeewani95
Updated:
Friday at 7:43 PM
NURSING , CAREGIVER , HOTEL & BEAUTY COURSES
IVA Para Medical Campus
Updated:
Thursday at 9:24 AM
Handmade Character Soft Toys Peppa Pig Family
anil1961
Updated:
Wednesday at 9:58 PM
Ad icon
Video Content Creator
pramukag
Updated:
Jun 28, 2026
Ad icon
QA Engineer Intern
pramukag
Updated:
Jun 28, 2026
Electronics
Vehicles
Property
Search
Reply to thread
Forums
General
ElaKiri PRO!
How to unlock 3G USB Dongles in Linux
Get the App
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
<blockquote data-quote="kosandpol" data-source="post: 7980705" data-attributes="member: 105851"><p>While there are loads of software to pass the unlock code in to 3G dongles in Windows, there's no such software for linux. This doesnt mean it cant be done. Infact, there's no need for any special software for this even on windows.</p><p>There is a very easy way to do this on linux. I unlocked a Huawei E160G Dongle that was sim locked to the 3 network using the method given below.</p><p></p><p>first order of business, getting the unlock code for the 3G dongle.</p><p>For Huawei dongles, this is very easily obtained using this site : <a href="http://bb5.at" target="_blank">http://bb5.at</a></p><p></p><p>To do this, first get the IMEI code for your dongle and in a new browser window, enter the url as below :</p><p>[code]</p><p>http://bb5.at/huawei.php?imei=xxxxxxxxxxxxxxxxx</p><p>[/code]</p><p><span style="color: red">replace xxxxxxxxxxxxxxxxx with your actual 15 digit IMEI code.</span></p><p>this will show a page giving the unlock code like the one below :</p><p><img src="http://img230.imageshack.us/img230/9919/shell10.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /></p><p>The unlock code is the 8 digit number in the line that says :</p><p>[code]</p><p>Entsperren / Unlock: 65031494</p><p>[/code]</p><p></p><p>Tools you need :</p><p><strong>minicom </strong> - a terminal software that can communicate with the serial ports. On windows, there is Hyper terminal. This is the Linux counterpart for that.</p><p></p><p>minicom is available in just about every linux distro there is.</p><p>On Debian based systems (ubuntu,mint,mepis,etc.) this can be installed with :</p><p>[code]</p><p>sudo apt-get install minicom</p><p>[/code]</p><p></p><p>On Redhat based systems (CentOS, Fedora ):</p><p>[code]</p><p>sudo yum install minicom</p><p>[/code]</p><p></p><p>On Suse :</p><p>[code]</p><p>sudo zypper install minicom</p><p>[/code]</p><p></p><p>now, we need to know on what port the dongle is connected on. to do this, open up a command terminal and login as root</p><p></p><p>[code]</p><p>sudo su</p><p>[/code]</p><p></p><p>and run for Debian based systems :</p><p>[code]</p><p>tail -f /var/log/syslog</p><p>[/code]</p><p></p><p>For Redhat/Suse based systems :</p><p>[code]</p><p>tail -f /var/log/messages</p><p>[/code]</p><p></p><p>keep that terminal open and plugin the 3G dongle with the SIM removed from it.</p><p>THere'll me a lot of lines as the kernel detects the attached device. Among them will be lines similar to these :</p><p>[code]</p><p>kernel: [122067.688806] usb 1-4: Product: HUAWEI Mobile</p><p>kernel: [122067.688821] usb 1-4: Manufacturer: HUAWEI Technology</p><p>kernel: [122067.689178] usb 1-4: configuration #1 chosen from 1 choice</p><p>kernel: [122067.708406] option 1-4:1.0: GSM modem (1-port) converter detected</p><p>kernel: [122067.708774] usb 1-4: [B]GSM modem (1-port) converter now attached to ttyUSB0[/B]</p><p>kernel: [122067.709341] option 1-4:1.1: GSM modem (1-port) converter detected</p><p>kernel: [122067.709721] usb 1-4: GSM modem [B](1-port) converter now attached to ttyUSB1[/B]</p><p>[/code]</p><p>It identified the device as a modem and attached it to the ports <strong>ttyUSB0</strong> and <strong>ttyUSB1</strong> </p><p>The full paths are :</p><p><strong>/dev/ttyUSB0</strong> and <strong>/dev/ttyUSB1</strong></p><p></p><p>These are the details we need.</p><p></p><p>we can get back to the interactive command line by pressing <strong>CTRL + C </strong></p><p>now, we need to configure minicom so that it'll talk to the 3G dongle. in 99% of the cases, /dev/ttyUSB0 is the port we need to unlock the dongle.</p><p></p><p>So as root, run :</p><p>[code]</p><p>minicom -s</p><p>[/code]</p><p></p><p>This opens up minicom in the configuration mode.</p><p><img src="http://a.imageshack.us/img96/5/shell01.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /></p><p>First thing to do is to set the Serial Port so select <strong>Serial Port Config</strong> from the list of options and press Enter.</p><p><img src="http://img44.imageshack.us/img44/2386/shell02.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /></p><p></p><p>First thing is to change the port to /dev/ttyUSB0. So press <strong>A</strong> and change the /dev/tty0 to /dev/ttyUSB0</p><p><img src="http://img716.imageshack.us/img716/5571/shell03.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /></p><p>And press Enter.</p><p></p><p>Next, we need to change the Baud Rate, paritiy and bits to 9600,N,8 (respectively). To do this, press <strong>E</strong>.</p><p><img src="http://img203.imageshack.us/img203/3210/shell04.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /></p><p>From the list of options C has 9600, so press <strong>C</strong></p><p>Press Enter to confirm.</p><p></p><p>now it should look like this :</p><p><img src="http://img833.imageshack.us/img833/8206/shell05.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /></p><p><strong>A - Serial Device : /dev/ttyUSB0</strong></p><p><strong>E - Bps/Par/Bits : 9600 8N1</strong></p><p></p><p>Press Enter to complete the Serial port Setup.</p><p>Now select <strong>Exit</strong> to exit the configuration menu.</p><p><img src="http://img834.imageshack.us/img834/5745/shell06.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /></p><p>Note, this is <strong>Exit</strong> and <span style="color: Red"><strong>NOT</strong></span> <strong>Exit from minicom</strong> option.</p><p></p><p>Now it'll initialize the modem:</p><p><img src="http://img834.imageshack.us/img834/1056/shell07.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /></p><p></p><p>And open up the terminal :</p><p><img src="http://img834.imageshack.us/img834/3976/shell08.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /></p><p></p><p>Now comes the actual command to unlock the dongle. The terminal you're in now is not a interactive shell like the usual command prompt. You cannot make any mistakes in typing commands here.</p><p>the AT command to unlock the dongle has to be entered in capital letters so its a good idea to press capslock.</p><p></p><p>the unlock command is :</p><p>[code]</p><p>AT^CARDLOCK="xxxxxxx"</p><p>[/code]</p><p><strong><span style="color: red">replace xxxxxxx with the unlock code for your dongle</span></strong> <u><strong>the "" are compulsory!</strong></u></p><p></p><p><img src="http://img44.imageshack.us/img44/4316/shell09.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /></p><p>and press enter.</p><p></p><p>Now, depending on the dongle model, you might get a reply like this :</p><p>[code]</p><p>^CARDLOCK 2,10,0</p><p>[/code]</p><p>or simply (this is what I got for the E160G) :</p><p>[code]</p><p>OK</p><p>[/code] </p><p></p><p>now just close the command line interface and pull out the dongle.</p><p>Put your own sim in and plug it in. It'll now work with your sim.</p><p></p><p>Big thanks goes to Sandeepa for his <a href="http://sadeepasepala.blogspot.com/2010/03/huawei-hsdpa-usb-unlock.html" target="_blank">blog post</a> for providing the AT command to unlock, the Baud rates, and an easy way to get the unlock codes. His blog post shows how to unlock 3G dongles in windows without using any 3rd part software. </p><p></p><p>Also credit is due to this <a href="http://linuxwave.blogspot.com/2009/06/hyper-terminal-for-linux.html" target="_blank">blog post</a> from linuxwave for giving a heads up on minicom.</p></blockquote><p></p>
[QUOTE="kosandpol, post: 7980705, member: 105851"] While there are loads of software to pass the unlock code in to 3G dongles in Windows, there's no such software for linux. This doesnt mean it cant be done. Infact, there's no need for any special software for this even on windows. There is a very easy way to do this on linux. I unlocked a Huawei E160G Dongle that was sim locked to the 3 network using the method given below. first order of business, getting the unlock code for the 3G dongle. For Huawei dongles, this is very easily obtained using this site : [url]http://bb5.at[/url] To do this, first get the IMEI code for your dongle and in a new browser window, enter the url as below : [code] http://bb5.at/huawei.php?imei=xxxxxxxxxxxxxxxxx [/code] [COLOR="red"]replace xxxxxxxxxxxxxxxxx with your actual 15 digit IMEI code.[/COLOR] this will show a page giving the unlock code like the one below : [IMG]http://img230.imageshack.us/img230/9919/shell10.png[/IMG] The unlock code is the 8 digit number in the line that says : [code] Entsperren / Unlock: 65031494 [/code] Tools you need : [B]minicom [/B] - a terminal software that can communicate with the serial ports. On windows, there is Hyper terminal. This is the Linux counterpart for that. minicom is available in just about every linux distro there is. On Debian based systems (ubuntu,mint,mepis,etc.) this can be installed with : [code] sudo apt-get install minicom [/code] On Redhat based systems (CentOS, Fedora ): [code] sudo yum install minicom [/code] On Suse : [code] sudo zypper install minicom [/code] now, we need to know on what port the dongle is connected on. to do this, open up a command terminal and login as root [code] sudo su [/code] and run for Debian based systems : [code] tail -f /var/log/syslog [/code] For Redhat/Suse based systems : [code] tail -f /var/log/messages [/code] keep that terminal open and plugin the 3G dongle with the SIM removed from it. THere'll me a lot of lines as the kernel detects the attached device. Among them will be lines similar to these : [code] kernel: [122067.688806] usb 1-4: Product: HUAWEI Mobile kernel: [122067.688821] usb 1-4: Manufacturer: HUAWEI Technology kernel: [122067.689178] usb 1-4: configuration #1 chosen from 1 choice kernel: [122067.708406] option 1-4:1.0: GSM modem (1-port) converter detected kernel: [122067.708774] usb 1-4: [B]GSM modem (1-port) converter now attached to ttyUSB0[/B] kernel: [122067.709341] option 1-4:1.1: GSM modem (1-port) converter detected kernel: [122067.709721] usb 1-4: GSM modem [B](1-port) converter now attached to ttyUSB1[/B] [/code] It identified the device as a modem and attached it to the ports [B]ttyUSB0[/B] and [B]ttyUSB1[/B] The full paths are : [b]/dev/ttyUSB0[/b] and [b]/dev/ttyUSB1[/b] These are the details we need. we can get back to the interactive command line by pressing [b]CTRL + C [/b] now, we need to configure minicom so that it'll talk to the 3G dongle. in 99% of the cases, /dev/ttyUSB0 is the port we need to unlock the dongle. So as root, run : [code] minicom -s [/code] This opens up minicom in the configuration mode. [IMG]http://a.imageshack.us/img96/5/shell01.png[/IMG] First thing to do is to set the Serial Port so select [B]Serial Port Config[/B] from the list of options and press Enter. [IMG]http://img44.imageshack.us/img44/2386/shell02.png[/IMG] First thing is to change the port to /dev/ttyUSB0. So press [B]A[/B] and change the /dev/tty0 to /dev/ttyUSB0 [IMG]http://img716.imageshack.us/img716/5571/shell03.png[/IMG] And press Enter. Next, we need to change the Baud Rate, paritiy and bits to 9600,N,8 (respectively). To do this, press [B]E[/B]. [IMG]http://img203.imageshack.us/img203/3210/shell04.png[/IMG] From the list of options C has 9600, so press [B]C[/B] Press Enter to confirm. now it should look like this : [IMG]http://img833.imageshack.us/img833/8206/shell05.png[/IMG] [B]A - Serial Device : /dev/ttyUSB0 E - Bps/Par/Bits : 9600 8N1[/B] Press Enter to complete the Serial port Setup. Now select [b]Exit[/b] to exit the configuration menu. [IMG]http://img834.imageshack.us/img834/5745/shell06.png[/IMG] Note, this is [B]Exit[/B] and [COLOR="Red"][B]NOT[/B][/COLOR] [B]Exit from minicom[/B] option. Now it'll initialize the modem: [IMG]http://img834.imageshack.us/img834/1056/shell07.png[/IMG] And open up the terminal : [IMG]http://img834.imageshack.us/img834/3976/shell08.png[/IMG] Now comes the actual command to unlock the dongle. The terminal you're in now is not a interactive shell like the usual command prompt. You cannot make any mistakes in typing commands here. the AT command to unlock the dongle has to be entered in capital letters so its a good idea to press capslock. the unlock command is : [code] AT^CARDLOCK="xxxxxxx" [/code] [B][COLOR="red"]replace xxxxxxx with the unlock code for your dongle[/COLOR][/B] [U][B]the "" are compulsory![/B][/U] [IMG]http://img44.imageshack.us/img44/4316/shell09.png[/IMG] and press enter. Now, depending on the dongle model, you might get a reply like this : [code] ^CARDLOCK 2,10,0 [/code] or simply (this is what I got for the E160G) : [code] OK [/code] now just close the command line interface and pull out the dongle. Put your own sim in and plug it in. It'll now work with your sim. Big thanks goes to Sandeepa for his [URL="http://sadeepasepala.blogspot.com/2010/03/huawei-hsdpa-usb-unlock.html"]blog post[/URL] for providing the AT command to unlock, the Baud rates, and an easy way to get the unlock codes. His blog post shows how to unlock 3G dongles in windows without using any 3rd part software. Also credit is due to this [URL="http://linuxwave.blogspot.com/2009/06/hyper-terminal-for-linux.html"]blog post[/URL] from linuxwave for giving a heads up on minicom. [/QUOTE]
Insert quotes…
Verification
Hathara warak wissa keeyada? (Hathara wadi karanna 20)
Post reply
Top
Bottom