Problem
pi@raspberrypi:~ $ gammu getallsms Can not access SIM card.
I tried to get list of sms from my sim card that is inserted into my Huawai usb dongle
lsusb
pi@raspberrypi:~ $ lsusb Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 005: ID 12d1:1001 Huawei Technologies Co., Ltd. E161/E169/E620/E800 HSDPA Modem
This error happens when device cannot communicate with a SIM card.
Perform the following steps to resolve the issue:
For me the 3rd step worked. I removed the dongle and reconnected and it worked