How to get 3G working on the Raspberry Pi
by subacati
So, you've received you Raspberry Pi, unboxed it and connected everything up. Now you want to update it, but you don't have wired Internet. :awww:
Well, there is a solution… …
For this method, you will need an Internet connected computer with wget installed. This should work with Windows, but you may have to make some changes. (for example, you may have to use a .bat extension instead of .sh)
The best option, however, is to use a Linux box.
Step one
Boot up your Raspberry Pi and log in as normal. Don't startx yet.
Type the following instead;
sudo -i
By doing this, you have become root for the time being.
Step two
Change directory to a convenient location, or you can use the root home directory as well, it's your choice.
Type the following command;
apt-get -qq --print-uris install network-manager-gnome > uris
This creates a file with the filename 'uris'
Step three
Now we need to create a script to fetch the packages by typing this;
awk '{print "wget -O " $2 " " $1}' < uris > wget-script.sh
once that has finished, we can shut off the Raspberry Pi and transfer the sd card to your regular, Internet connected computer. :up:
Step four
Now, with your sd card mounted in you regular computer, navigate to the directory where the file wget-script.sh is.
Right click on that, and select 'Properties' from the context menu. Then select 'Permissions'
At the bottom you will see a small check-box with the text, "Allow this file to run as a program"
Select that and close the dialog.
Step five
Open a command line shell in that directory. (or open a command line shell and cd to that directory)
Then type;
sh -x ./wget-script.sh
This will fetch the needed packages to that directory.
Step six
Delete the files "uris" and "wget-script.sh". You don't need them anymore.
Put the sd card back into your Raspberry Pi and bootup.
type;
sudo -i
Then cd to the directory where the packages are. ( :sst: If you used the root home directory, you will already be there )
Noe type;
dpkg -i *
This will unpack and install all the .deb packages in that directory. Remember that I said to delete the files "uris" and "wget-script.sh"? If you didn't, you will see that dpkg will complain about being unable to process these two files.
The End
You can now type;
exit startx
And you will bring up the desktop. In the systray, there will be a network icon that wasn't there before. If you right click on that, you can select "edit conections" Then choose "mobile Broadband">"add"
This will start a connection wizard to help you choose the right configuration.
Most modern 3G modems will be auto-detected and usb-modeswitch will automatically change the mode accordingly.
If you are familiar with using your modem in other Linux distros, the process will be the same with Raspbian, now that you have a decent network management system installed.
Final note: You may have to run the following from the command line before updating and upgrading;
sudo apt-get -f install
This is because some packages were missing but are dependencies of other packages that were retrieved. The missing dependencies are part of the bluetooth packages and don't interfere with the network manager.
omg you have a raspberry pi! this is all I can think about , did not know it was out yet , guess I should have been keeping track :whistle: How is it in general?
Originally posted by spiritcrow:
Yes it is now available. They initially limited people one per customer. But you can now order as many as you want. :up:Originally posted by spiritcrow:
It's a little sluggish and rather quirky. I battled to get a keyboard to work with it because it's usb ports don't provide enough current.I also find it weird that they decided on a micro usb connector to provide power, but it's not connected as a usb. (it's only for power in)I think there are better boards out there. They hyped the RPi way too much for what it is. The only really interesting bits are;a) It has a GPIO header for use with your own circuitsb) It's probably the only 32bit computer with a composite video output! :hat:Having a composite video output means that it can use any cheap video monitor. :up::sst: I don't have a tv and the only monitor I have, other than the laptop, is a 7 inch portable dvd monitor! :p
cool, it works with the 7 inch portable dvd monitor?All aside, probably won't get around to getting to it, can't think of much use for it although it's cool gadgetry π
Originally posted by spiritcrow:
Unless you intend to make use of the GPIO part, there isn't much use for it. π :sst: It's way too slow for normal computer use. :awww:Originally posted by spiritcrow:
To a degree. Unfortunately, the monitor is at a lower resolution than the composite output, so text is blurry. I'll figure out a way to change that eventually, but for now I just have to live with it. :up:Originally posted by spiritcrow:
It's not as cool as the hype made it sound though. They put so much hype into it that they made it sound better than it could ever manage to be. :rolleyes:Still good for the price though, just not quite as good as I was expecting. :up:
3G :p And I followed the link that promised 5G π
Originally posted by serola:
Sorry about that! π To be fair, I rectified that typo immediately, but My Opera notifications always keep the first draft! π
I seriously thought there's already 5G coming π
well, I suppose it has a 'cute' name but yeah..it's still a good sign of the future of tiny computers. Keeping folks interested in further research and development is a good thing (future nerds and all that) π
Interesting reading; was confused by the 5G typo in the title url; Thailand barely has 3G (politics issues) and England is opening up to 4G. It did peak my curiosity. :DQuick question – does the linux box have to be debian (for it all to work well with raspbian?)?And no, I don't have the RPi (yet).
For Windows you would make the script a batch file ( .bat extention) but you would need to install wget on your windows box. :up:Just about any Linux distro that has wget installed will work with this method. (most Linux distros have wget installed by default.)Yeah, 5G is probably a long way off still. π
I've been looking into this for a while now as part of a plan to build a decent media centre. One of these running say XMBC with a few hard drives of movies and the like should be perfect. The only problem is getting it to work for streaming media from the web. Looks like I'd have to connect via ethernet cable which would stretch across my living room.I contacted the team and they're working on wi-fi for the next iteration as well as a box to house the board nicely. By then OS that work should be more stable too so I'll probably wait for that. Then I should be able to add most of the UK catch up services, Revision 3 and several Youtube channels (using their new architecture) as plugins.
Originally posted by serola:
There is, but it'll be a marketing term for a feature set rather than a new technology. Fourth generation is where we'll be for at least a decade, possibly two.Fourth generation networks are extensible and will continue to be built upon for years to come. They work via additional modules that can be easily swapped out for new models with added power. Hence the term Long Term Evolution.
Originally posted by Furie:
My opinion is that, while it is possible to implement a media centre on the RPi, it's a little under powered for the job. :left:And it is definitely not a "plug 'n play" device. You have to spend a fair amount of time getting things right with it. Even with my experience with Linux, I ran into a few issues. They cut a few corners to squeeze as much as possible into the cheapest setup they could achieve. This means that some hardware (aka; keyboards) just won't work with a Raspberry Pi. :rolleyes::sst: That's what took me the most time after receiving the board, finding a usb keyboard that worked! :p
Actually the processor is powerful enough to stream HD video with no problems, if the connection can handle it of course. My main.ises would be SD video streaming and HD video playing so no problems there. Apparently XMBC has a stable build already on the device so that's not a problem, although a PC is needed to get the files on an SD card as well as the plugins on a USB memory stick.Any generic USB keyboard should work so long as it has no proprietary drivers. Of course, it's next to impossible to know for sure without buying and trying which seems like an oversight in the market to me. Or a great piece of marketing…
Yes, the Raspberry Pi did receive a lot of hype. I was tempted to get one for my niece but I doubt that she'd persevere with it enough to make it worthwhile.
Originally posted by Furie:
The problem doesn't seem to be with drivers as much as with the limited power output of the RPi usb ports. I have a cheap, generic usb keyboard that works fine in Linux, but won't work on the RPi. (in fact, if I plug it in before power on, it causes a kernel panic π )Having said that, one of the planned modifications of future board revisions is to remove the poly-fuses that limit current to the usb ports. :up:Originally posted by harrytheman:
Get one for yourself instead. It's actually a lot of fun for a Linux geek to play with despite (or maybe because of) it being a headache to get working right! :p
Originally posted by qlue:
wget wasn't the one I was worried about; it was this:
apt-get would be yum – but would the rest still work?
Well, the 'apt-get' part is on the Raspberry Pi. The recommended distro, 'Raspbian', is Debian. So for that, it doesn't matter what's on your other computer. :up: .There is no proper Fedora distro for the Raspberry Pi as there is no suitable ARM kernel available. (Fedora needs the latest kernel to be official.)Of course, with Fedora it is quite easy to use .rpm packages and there are often less dependency problems than with Debian. :sherlock:
Originally posted by qlue:
I have no experience with Debian… This is nice to hear. :DThanks.
Do you not have ones there that take batteries to power them but link via USB?
Originally posted by Furie:
After scrolling up, I gather you are referring to keyboards. :left:The Raspberry Pi hardware is simply very picky about what it will or won't work with. And many keyboards just don't follow the usb specs all that strictly. The specs require that any device must first connect at a nominal power and then negotiate it's power requirements with the host device. Very few devices actually do this in practice though as most host devices are very forgiving in this respect. The Raspberry Pi handles usb power controll by using ptc thermistor polyfuses(R) rather than using an intelligent power controller. However, these ptc devices are not going to be used in the revision 1.1 boards and 0Ξ© links will be used instead, so this will eliminate some of the usb issues.The keyboard that won't work causes a kernel panic if it's plugged in before booting and just won't work if plugged in after booting. I'm only guessing that it's a power issue, but it is a known isue and many generic keyboards have been reported to exhibit this behaviour. Strangely, it only seems to be keyboards that trigger the kernel panic and using a powered hub apparently does not resolve the issue in all cases. (but it does in some cases)While there is a list of devices known to work, some devices on that list have also found their way onto the non-working device list. No one seems to know for certain what the actual cause of the problem is.On a related issue, it has been discovered that the Raspberry Pi's hdmi port does not fully comply with the hdmi specification. If it is used with a tv that also does not fully comply, you could damage either the tv, the RPi or both! :insane:Hopefully they find a way to resolve that in future revisions! :up:
Bah! PCs ain't worth the time when you have a pretty phone to love and hold and stroke and… Is it warm in here?
π Well the Raspberry Pi isn't really a PC anyway! It's closer in design to the innards of an older cellphone than a PC! :up:
Hello Adel, My name is moustafa, i'm from EgyptI'm using the Raspberry Pi for my Graduation Project here and am in need of dire assistance :(I need to install a Huawei 1550 3G Modem, i know the steps but the first one requires installing usb_modeswitch , which is not located in the "wheezy" repository, i added debian repositories to the "apt" source list with no luck, i also downloaded the official .deb package of usb_modeswitch from debian site but failed to install due to errors in processing.Any help would be really really appreciated π¦
Originally posted by mmowaffak:
Ok, If you are using Raspbian, then installing network-manager-gnome will include usb_modeswitch and that is included in the Raspbian repository when last I checked.Originally posted by mmowaffak:
Make sure you are adding the correct repositories for the ARM processor. In fact, try not to mix repositories at all as that will always lead to strange problems and weird dependency issues. :left:Raspbian uses hardware floating point while the Debian Arm distro uses software floating point. Generally, you can't mix those two repositories without picking up problems. So, choose one or the other. :up: Originally posted by mmowaffak:
The ARM Debian version is an unofficial port of Debian and is not supported by the Debian site. Nothing on the Debian site will run as is on the Raspberry Pi. (It may be possible to compile from source files in some cases though)My best suggestion is to start again using a fresh install of the Raspbian image, which you can get by following instructions on the Raspbian Downloads page.Then follow the tutorial on this page as presented. ( note: I have also posted this tutorial on the Designspark website. That version may be a little easier to follow. :up: )
Thanks Alot Adel, you're a life saver! will try to start fresh and let you know!
Hey, I found a tutorial explaining how to use 3G with the Raspi: http://www.cooking-hacks.com/index.php/documentation/tutorials/raspberry-pi-3g-gprs-gsm-gps
That's an advertorial for an overpriced piece of custom hardware. :left:Any standard 3G adaptor can be used instead for 10% of the price. And most 3G ISPs will give you the adaptor free if you sign up for a contract with them. (you'll need the contract to use the 3G on that overpriced piece of hardware you linked to anyway)