{"id":17168733,"url":"https://github.com/sanix-darker/kraken","last_synced_at":"2025-04-13T15:42:30.566Z","repository":{"id":109579825,"uuid":"228025998","full_name":"Sanix-Darker/kraken","owner":"Sanix-Darker","description":"USSD-SMS-Internet Bridge","archived":false,"fork":false,"pushed_at":"2024-04-22T22:37:44.000Z","size":101,"stargazers_count":25,"open_issues_count":3,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-27T06:44:48.132Z","etag":null,"topics":["3g-modem","gammu","raspberry-pi","sms","sms-messages"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Sanix-Darker.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2019-12-14T13:17:43.000Z","updated_at":"2025-02-14T11:47:45.000Z","dependencies_parsed_at":"2023-07-28T20:16:17.154Z","dependency_job_id":null,"html_url":"https://github.com/Sanix-Darker/kraken","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sanix-Darker%2Fkraken","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sanix-Darker%2Fkraken/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sanix-Darker%2Fkraken/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sanix-Darker%2Fkraken/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Sanix-Darker","download_url":"https://codeload.github.com/Sanix-Darker/kraken/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248740129,"owners_count":21154248,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["3g-modem","gammu","raspberry-pi","sms","sms-messages"],"created_at":"2024-10-14T23:12:42.860Z","updated_at":"2025-04-13T15:42:30.535Z","avatar_url":"https://github.com/Sanix-Darker.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"./images/logo.png\" width=\"150\"/\u003e\n\n# KRAKEN\n\nThe SMS-INTERNET Bridge using RaspberryPi (Still working on it)\n\n## IMPORTANT NOTE\n\n***A Nice documentation will be provide as soon as possible !!***\n\n# Requirements\n\n- Python (3.x is recommended)\n- Gammu (A shell script will be provide to make things more easy, but the process has been described down there).\n- MongoDb\n\n## How to install\n\n```shell script\ncd path/project\nvirtualenv -p python3 kraken\nsource kraken/bin/activate\npip install -r dev_requirements.txt\n```\n\n## How to install Gammu\n\n### Checking 3G Modem\nTo find the modem we need to list all of the USB devices connected to our Raspberry Pi. Do this with the lsusb command. Run the following command:\n```shell script\nlsusb\n```\nAnd you will almost certainly see your new 3G dongle in the list as something like:\n```\nBus 001 Device 006: ID 12d1:1001 Huawei Technologies Co., Ltd.\n```\nTHIS IS WRONG AND BAD AND ONLY HERE TO PUT THOSE IN A BAD MOOD, BUT WE SHALL PREVAIL.\n\n### Converting the (3G) Masses\nSo you discovered that your new 3G dongle thinks it is a normal USB drive and not a 3G modem, we just need to install a few packages and are just a couple of files and we will be all set.\n\n### Installing Packages\nYou will need the following packages, to install them use the following command:\n```shell script\nsudo apt install ppp usb-modeswitch usb-modeswitch-data\n```\nAfter they are installed, reboot your Raspberry Pi with:\n```shell script\nsudo reboot\n```\nWhen your Raspberry Pi has finished rebooting, run the lsusb command again and if you look something like this you are golden:\n```\nBus 001 Device 006: ID 12d1:1001 Huawei Technologies Co., Ltd. E169/E620/E800 HSDPA Modem\n```\n### Understanding Dawns\nAfter you run the `lsusb` command and discover that your dongle now understands it’s a modem, you need to make a note of the ID number of your device. It will almost certainly be different from the one you see above but will take the same form, the ID number of the device above the one you will need to remember is: 12d1:1001\n\n### Where’s our Dongle Mounted\nNow we need to know where on your Raspberry Pi the USB modem is mounted in the Raspberry Pi’s file system with:\n```shell script\ndmesg | grep ttyUSB\n```\nIf you’re successful you will see this in your Terminal:\n```shell script\n[3.235831] usb 1-1.3.3: GSM modem (1-port) converter now attached to ttyUSB0\n[3.236856] usb 1-1.3.3: GSM modem (1-port) converter now attached to ttyUSB1\n[3.237626] usb 1-1.3.3: GSM modem (1-port) converter now attached to ttyUSB2\n```\nYou will almost certainly be using the name ttyUSB0 in the upcoming commands.\n\n### If You Don’t See ttyUSB(something)\nIf you don‘t see any GSM Modems mounted somewhere like the above example we are going to need to create a config file so that your Raspberry Pi knows what to do with the dongle.\n\n### Making our own usb_modeswitch Configuration File\nRemember before when I said you need to keep track of those eight numbers, well this is where you will need them. You need to create a new config file with the following command (note the file name is the same 8 digits):\n```shell script\nsudo nano /etc/usb_modeswitch.d/12d1:1001\n```\n\nThe file should have the following contents, obviously adjusted to use your devices ID numbers. That should be the only thing you would need to change.\n```shell script\n# Huawei E353 (3.se)\n\nTargetVendor=  0x12d1\nTargetProduct= 0x1001\n\nMessageContent=\"55534243123456780000000000000011062000000100000000000000000000\"\nNoDriverLoading=1\n```\nRun the following command again:\n```shell script\ndmesg | grep ttyUSB\n```\n\n### We Have Some Success!\nIf everything went well, you should see the following in your terminal:\n```\n[3.235831] usb 1-1.3.3: GSM modem (1-port) converter now attached to ttyUSB0\n[3.236856] usb 1-1.3.3: GSM modem (1-port) converter now attached to ttyUSB1\n[3.237626] usb 1-1.3.3: GSM modem (1-port) converter now attached to ttyUSB2\n```\n### Installing the SMS Software\nNext we need to install the software that’s actually going to do the sending and receiving of the SMS messages. This software is called Gammu and we install it like this:\n\n#### Installing Gammu\n```\nsudo apt install gammu\n```\nNow we need to configure Gammu so that the Raspberry Pi knows where to look for our dongle:\n\n#### Configuration of Gammu\n```shell script\nsudo gammu-config\n```\n\nA menu will appear. Use the arrow keys and the return key to navigate. When you’ve finished, your settings should look something like this. Note the /dev/ttyUSB0 from earlier:\n\n#### Recommended Gammu Settings\n```shell script\nPort: /dev/ttyUSB0\nConnection: at19200\nModel: empty\nSynchronize time: yes\nLog file: leave empty\nLog format: nothing\nUse locking: leave empty\nGammu localisation: leave empty\n```\n\nNow use the arrow keys to navigate down to Make Sure You Save by using the arrow keys to highlight the save option and then pressing the tab key and selecting the ok option. We check everything is groovy with the following command:\n\n#### Identifying our Dongle\n```shell script\nsudo gammu --identify\n```\nThe response you get back in your Terminal will look something like this (obviously I’ve redacted some personal information, but yours will be fairly similar):\n\n#### Gammu Identify Results\n```shell script\nDevice               : /dev/ttyUSB0\nManufacturer         : Huawei\nModel                : E173 (E173)\nFirmware             : **.***.**.**.**\nIMEI                 : ***************\nSIM IMSI             : ***************\n```\n\n## How to use Kraken\n\n### To start the Bulk SMS Server\n```shell script\npython run.py\n```\n\n### To send a direct SMS message\n```shell script\ncd app/util/krk\npython send.py -p 6******* -m \"This is a test message, for fun\"\n```\n\n### To hit an USSD code\n```shell script\ncd app/util/krk\npython ussd.py -c #123#\n```\n\n### To start SMS-BOT\n\n```shell script\n# In your first terminal, you need to start the Consummer\ncd app/util/krk\npython receive.py\n\n# In your second terminal, you need to start teh bot itself\ncd app/util/krk\npython sms_bot.py\n```\n\n### Others\n\n- To refresh the connection with the Huawei module\n```shell script\ncd app/util/krk\npython refresh_connection.py\n```\n\n- To list sms received and saved in mongo\n```shell script\ncd app/util/krk\npython list_sms_bot.py\n```\n\n- To clean sms received (in the SIM card and mongo)\n```shell script\ncd app/util/krk\npython empty.py\n```\n\n- To run the tests:\n\n```shell script\npytest tests\n```\n\n## Author\n\n- Sanix-darker\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsanix-darker%2Fkraken","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsanix-darker%2Fkraken","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsanix-darker%2Fkraken/lists"}