SIM5320E m2m sim card - iot

I have developed a board that uses SIM5320E GSM module. I am calling an API from the module using normal data SIM and it is working fine. How ever when I used m2m sim card I am not able to call API.
I have configured the correct APN for the SIM using the following commands
AT+CGDCONT= 1,"IP","m2m","0.0.0.0",0,0
and
AT+CGSOCKCONT= 1,"IP","m2m","0.0.0.0",0,0
When I need to start the http request I send the following command
AT+CHTTPSSTART
response is OK. However when I use m2m sim card it is giving me error.

Related

Unable to specify Device Profile using MQTT Gateway API

We have started using ThingsBoard PE for our POC product to test if it will suit our needs.
We have an existing system which would act as a gateway between various types of IoT devices and ThingsBoard.
It seems that the communication could be implemented using MQTT Gateway API and I have successfuly used it to send connect/disconnect messages as well as telemetry upload. As stated in the gateway documentation, a new device is created if it does not yet exist in ThingsBoard. However, I am not sure how to specify device profile for each device based on device type. It seems that automatically created devices always have profile named "default" even if I have made a new profile and set it as default.
Is there any way to specify device profile in MQTT Gateway API?
Add a key "type" in your connect message.
Topic: v1/gateway/connect
Message: {"device":"Device A", "type":"Type A"}

How to send direct command from Google Home to custom smart device without app name?

I try to build my custom IoT device that will be controlled via Google Home device, and serve people with disabilities.
The device itself is Tiva C Launchpad, that I program from scratch, meaning I will have a full control on it.
In my vision, the user wil say something like: "Ok Google, press play button", and as a result, the Google Home device will send a direct command of press_play_button to the IoT device, preferably via the local network.
I found the Google Action SDK, alongside with the Local SDK extention, but if I understood correctly, I have to be in the app mode first ("OK Google, play {app_name}") before pronouncing the action I want, which is inconvenient.
Is there any way to achieve my requirement?
If not, I may give up on the local network control, and use sort of a webhook to send HTTP request to my smart device, and in that case I wonder if MQTT will be more suitable.
Thanks.
The Local SDK is an extension to the Smart Home API. If your device matches up with the device types and traits that the Smart Home API supports then you can use that to control your device.
It has support for media players so things like play/stop should be possible.
I have build generic Smart Home control using MQTT to reach the device, but you have to provide a HTTP endpoint for the Google System to interface with. This take a little thought as you have to map MQTT asynchronous approach to HTTP's synchronous nature.

MQTT Communication Design between Multiple IoT Devices

I have this current setup:
Android app(ON/OFF button) <--> MQTT broker(mosquito) <--> NodMCU
MQTT TOPICS:
cmd/light/power - where my nodMCU receives ON/OFF command.
status/light/power - where my nodMCU returns the status of the load. This is where also the button status of the app is dependent.
The above setup works just fine and every time I add another IoT device I needed to change the mqtt topics inside the firmware before flashing to every iot device so i can control them individually and there where the problem comes in..
Maybe someone can guide me how to re-design my system that I can easily add new device to my android app and control them individually without changing the firmware of each IoT device? I'm trying to replicate the app eWeLink where it can easily add sonoff devices easily..
EDIT:
My thoughts:
design the device firmware to generate unique ID for each iot device then the id should be included in the MQTT topic. then add the device to Android app using it's ID..
topic should look like this cmd/<unique device id>/power & status/<unique device id>/power
Design the device firmware to generate unique ID for each iot device then the id should be included in the MQTT topic. then add the device to Android app using it's ID..
topic should look like this cmd/<unique device id>/power & status/<unique device id>/power

Ruby on Rails How to Integrate GPS Tracking System

I am using following versions
ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-linux],
Rails 4.2.4
I have GPS Tracking Devices which works with SMS Commands.when we send sms they reply location,etc. The problem i'm sending SMS through SMS API. now, how can i can get reply and to which server (my server or server of SMS API providing company) and how to handle it.
They have given some documentation regarding protocol (works with ASCII codes) that totally i could not understand.
I am using Benway Technologies GPS Tracking Devices.
Kindly, help me.
Thanks in advance.
Reading a bit this https://benway.en.ec21.com/GPS_Tracker--9810443.html
"...Real-time reporting car status Mainboard support Voice monitor function Check location information via SMS and GPRS(TCP)..."
and this
"...GPS-blue, Power-red Data Transmit TCP..."
Your devices are using GPRS protocol, wich means that they have some IP address. With this functionality, the GPS devices work like a little server, so IT IS POSSIBLE to do what you are looking for: request GPS data to the devices and handle it in your own server.
To achieve this:
1) You need to configure the GPS devices by reprogramming them (via SMS or SERIAL) to allow incoming requests from your server. Also you need to configure your devices to send data to your server.
Just tell to your GPS devices that myownserver.tt or 276.333.456.23(your server public ip) will be the domain / ip to send and receive data via GPRS with TCP protocol.
I have some experience using ENFORA and RUPTELA trackers, there is a a lot of info about them, now, in your case, you must read all the info about your GPS devices, if there is none, just use another brand.
2) You need a proper server to handle incoming TCP data (the GPS devices data). Lets say some Debian based server. To handle the data, you need some script (PHP, Ruby, Java, your choice) in the server to decode this data (NMEA in most cases, you can read more here http: //aprs.gids.nl/nmea/) and then a front end if you wanna see this data (You already have RoR).
3) Rails is a web framework with all the Ruby magic ready for us. You need to do the step 1 and 2 first to integrate a GPS tracking system.
Hope it helps!

How to get USSD code response in my ios app

I want to develop an iOS application to get the response to a USSD code whenever the user dials it. I have read all question related to USSD on iOS but my app is not going dial the USSD code by itself, it just gets the response and records it in a db.
If there any article or tutorial to get started?
Can I even do this on iOS operating system?
Note: I have developed the android version of this app.
You can't do this on iOS. Apps are sandboxed and do not generally have access to data from other applications (there are specific methods that allows apps to share data, such as the pasteboard), so your app cannot access data from the phone app.
You can call *#06# programmatically. Don`t forget to replace * to %2a and # to %23. ENJOY

Resources