This is a very quick and rough guide on how to get a Huawei E3531 running on a Raspberry Pi - my specific device is on the EE network which is what caused me some trouble so hopefully this will be useful for someone!

Created as I was having various issues when trying to get this running, I'd continuously see:

Jan  3 19:56:47 raspberrypi pppd[876]: PAP authentication succeeded
Jan  3 19:56:48 raspberrypi pppd[876]: LCP terminated by peer
Jan  3 19:56:48 raspberrypi pppd[876]: Hangup (SIGHUP)
Jan  3 19:56:48 raspberrypi pppd[876]: Modem hangup
Jan  3 19:56:48 raspberrypi pppd[876]: Connection terminated.

The initial setup was fine, but the connection would be terminated almost immediately afterwards.

Setting things up

For this setup I followed this guide - without it I'd have had no idea where to start. However, after verifying that the modem was connected is where I had to make changes, so once you reach:

[21.093026] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB0
[21.109416] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB1
[21.137701] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB2

I've included all the steps I took from here as a mini-guide.

You'll now need to create a new file in the network interfaces folder:

sudo nano /etc/network/interfaces.d/gprs

Add the below to the file:

auto gprs
iface gprs inet ppp
provider gprs

This configures the network interface you'll be using for the modem.

Now to create the config peer file for the connection.
NOTE: Some of this section is specific to EE, for other providers you may need to make changes.

Create the /etc/ppp/peers/gprs file.

sudo nano /etc/ppp/peers/gprs

Add this content:

connect "/usr/sbin/chat -v -f /etc/chatscripts/gprs -T everywhere"
/dev/ttyUSB0
noipdefault
defaultroute
replacedefaultroute
hide-password
noauth
persist
usepeerdns

Note the connect line and the solution to all the issues I'd been having:

connect "/usr/sbin/chat -v -f /etc/chatscripts/gprs -T everywhere"

The -T command states the APN name, you will absolutely need to make sure this is set to the APN of your provider. In my case this is "everywhere", other networks will usually list the APN settings on their website in some way.
If your network requires a username, add the below to the top of the file:

user "username"
password "password"

After this you can proceed to run sudo ifup gprs to enable the connection.

To view the log, you'll want to use

tail /var/log/syslog | grep pppd

What you want to see is something along these lines:

Jan  3 20:11:53 raspberrypi pppd[1697]: Serial connection established.
Jan  3 20:11:53 raspberrypi pppd[1697]: Using interface ppp0
Jan  3 20:11:54 raspberrypi pppd[1697]: Connect: ppp0 <--> /dev/ttyUSB0
Jan  3 20:11:54 raspberrypi pppd[1697]: Remote message: Greetings!!
Jan  3 20:11:54 raspberrypi pppd[1697]: PAP authentication succeeded
Jan  3 20:11:56 raspberrypi pppd[1697]: Could not determine remote IP address: defaulting to 10.64.64.64
Jan  3 20:11:56 raspberrypi pppd[1697]: replacing old default route to wlan0 [192.168.1.1]
Jan  3 20:11:56 raspberrypi dhcpcd[481]: wlan0: deleted default route via 192.168.1.1
Jan  3 20:11:56 raspberrypi pppd[1697]: local  IP address 31.80.***.***
Jan  3 20:11:56 raspberrypi pppd[1697]: remote IP address 10.64.64.64
Jan  3 20:11:56 raspberrypi pppd[1697]: primary   DNS address 109.249.185.228
Jan  3 20:11:56 raspberrypi pppd[1697]: secondary DNS address 109.249.185.229

You're now connected via modem!