back to lab

Modem SIM - Mobile Broadband Module - HP ProBook 645 - Linux

Modem SIM - Mobile Broadband Module - HP ProBook 645 - Linux

HP hs3110 HSPA+ Mobile Broadband Module - Probook G645 - Linux

hp probook 645 — how to make the hs3110 hspa+ sim modem work on linux

this is not really a diary, but more of a small guide i decided to write mainly for myself — and hopefully for anyone else facing the same problem.

the goal is simple: getting the integrated sim modem found in some hp probook laptops to work properly on linux.

linux has grown a lot over the last few years, and it is now a very solid operating system for everyday use. however, there are still some devices that may not work perfectly out of the box and sometimes require a bit of manual configuration.

in my case, the problematic device was the integrated mobile broadband module.

the story

a few months ago, while randomly browsing ebay, i found a refurbished hp probook 645 for less than €200.

the laptop had:

  • 8 gb of ram
  • a 256 gb ssd
  • an integrated sim / mobile broadband modem
  • a smart card reader
  • everything working

honestly, it looked like a pretty good deal, so i bought it immediately.

of course, the first thing i did was remove windows and install linux.

choosing the linux distribution

i tested several distributions on this laptop, including fedora, ubuntu, centos and others.

after a few attempts, i noticed that debian-based distributions generally worked better out of the box on this machine.

almost everything worked correctly.

almost.

the only thing that did not work for me was the integrated sim modem, which was a big problem, since it was one of the main reasons why i bought the laptop in the first place.

so the search for a solution began.

identifying the modem

the first step was to identify the exact sim modem installed in the laptop.

in my case, the model was written in the documents provided with the computer. however, if you do not have this information, it may be useful to check the device details from windows before formatting the system.

alternatively, you can use linux terminal commands such as:

lshw
lspci
lsusb

depending on how the device is detected by the system.

in my case, the device was:

hp hs3110 hspa+ mobile broadband module

fortunately, i was not the only one having trouble with this modem. after searching through several linux communities, i found different suggestions and managed to put together a solution that worked for me.

the procedure below was tested on several debian-based distributions.

procedure

1. get root permissions

open a terminal and switch to root:

sudo su

2. create a systemd service

create the following file:

nano /etc/systemd/system/huawei.service

inside the file, paste this content:

[Unit]
Description=Load driver for Huawei HS3110
Before=network.target

[Service]
Type=oneshot
ExecStart=/usr/bin/huawei
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target

save and exit.

3. create the bash script

now create the script that will load and initialize the modem:

nano /usr/bin/huawei

paste the following content inside the file:

#!/bin/bash

modprobe option
sleep 3

echo "03f0 521d" > /sys/bus/usb-serial/drivers/option1/new_id
sleep 3

usb_modeswitch -H -v 03f0 -p 521d -s 10

save and exit again.

important note about vendor id and product id

in the usb_modeswitch command, the values after -v and -p identify the usb device.

in this example:

usb_modeswitch -H -v 03f0 -p 521d -s 10

the values are:

  • -v 03f0
  • -p 521d

these values may change depending on your laptop or modem model, so you should always verify them before continuing.

usb devices are usually identified by a pair of hexadecimal values, for example:

03f0:521d

where:

  • 03f0 = vendor id
  • 521d = product id

in this specific case:

  • 03f0 = hp
  • 521d = hs3110 / hs3114 hspa+ mobile broadband modules

to check your own values, run:

lsusb

example output:

Bus 005 Device 001: ID 0000:0000
Bus 004 Device 006: ID 03f0:521d HP, Inc.
Bus 004 Device 001: ID 0000:0000

if your device shows the same id, you can continue with the guide.

if the values are different, replace them inside the script accordingly.

4. make the script executable and enable the service

run the following commands:

chmod o+rx /usr/bin/huawei
systemctl daemon-reload
systemctl enable huawei.service
systemctl start huawei.service

then reboot the laptop:

reboot

after rebooting, the modem should be loaded automatically.

final step: configure your mobile connection

once the modem is detected correctly, the last step is to configure your network manager using the apn settings provided by your mobile operator.

after that, the integrated sim modem should be ready to use on linux.

conclusion

this solution worked for me on an hp probook 645 with the hp hs3110 hspa+ mobile broadband module, mainly using debian-based linux distributions.

it may also work on similar hp probook models using the same or similar huawei-based mobile broadband modules.

as always with linux hardware fixes, your exact device id may vary, so check everything carefully before applying the commands.