Doorgaan naar hoofdcontent

GPS trackers + SMS + USB GSM Modem + Java + JavaScript + Google Maps

Ok,

What have I been up to (technically speaking) ?

Mostly, two things: The STM32F4-Discovery board which is a cheap and awesome developmentboard by STMicroelectronics boasting an ARM Cortex-M4 and an on-board JTAG-dongle so to speak: That opens a lot of interresting perspectives. But I'll talk about that in a next blogpost.

The second thing is a combinations of the following technologies: GPS trackers + SMS + USB GSM Modem + Java + JavaScript + Google Maps.
The idea is to have live tracking of about 20 GPS-trackers on a Google Map. This would serve as central intelligence center in a big real-life "hunting" game we're preparing at the moment to play with about 100 youngsters in the city of Tongeren. It will be called "Nacht van de Jacht", for those interrested :).
The set-up I thought of was the following: We bought about 20 Chinese GPS trackers that are sending their position in an SMS to a central phone number every 3 minutes or so. These SMSes are received by an USB Modem I had lying around (Vodaphone 3g modem when I was in Australia, actually it's a Huawei E169). A Java program should then fetch the messages from the modem, and push then to a MySQL database.
This modem has 3 virtual COM ports which allow access to the modem through AT-commands. (Great resource: http://www.developershome.com/sms/atCommandsIntro.asp). This allows fetching incoming messages through this interface. I was not going to write the whole stack, and I heard of the SMSLib project before. (http://smslib.org/) I downloaded this, together with the RXTX library allowing COM-port access from Java from Linux, OSX, Windows, BSD, ... (http://rxtx.qbang.org/wiki/index.php/Main_Page) and wrote a first try-out project in NetBeans (http://netbeans.org/).
It's been a while since i've used Java, or the Netbeans IDE, but I must say, I got quick results. After some debugging, adding polling to the RXTX <-> SMSlib interface because of the Virtual COM port, I could read SMS messages from my USB GSM Modem.
The second part is a webpage, that will query this MySQL database through PHP, formatting this into a JSON string being passed to some JavaScript running in the client's browser. This JavaScript (Mainly jQuery (http://jquery.com/)) will then parse the JSON, and display the data on a Google Map, using the Google Maps JavaScript API (https://developers.google.com/maps/documentation/javascript/reference).

Right now I have written a Java app that fetches incoming SMS messages from the USB GSM Modem, and can talk to the MySQL server. I also have a webpage that parses a (fixed for now) JSON-string's data and plots these on a Google Maps.
Next up:
1. Pushing the incoming messages to MySQL.
2. Querying MySQL from PHP and passing this data in a JSON string to the JavaScript part.

Not that far away any more...

Reacties

  1. Very good post with useful information. I really appreciate the fact that you approach these topics from a stand point of knowledge and information. Please keep on posting.

    GPS Tracker

    BeantwoordenVerwijderen

  2. Thanks for sharing
    Msgclub have two types of sms api Java; XML and JSON for sending SMS in bulk to your prospects from our gateway.

    BeantwoordenVerwijderen

Een reactie posten

Populaire posts van deze blog

The excellent JTAGenum for Arduino

As I said before, I've been fiddling with finding the JTAG port on a Verbatim PowerBay NAS. I did not succeed (yet), but have had the chance to try out JTAGenum for Arduino. It is an excellent JTAG pin finder (and other things too). Check it out here: http://deadhacker.com/2010/02/03/jtag-enumeration/ The guy's description of the tool is: 1. Given a large set of pins on a device determine which are JTAG lines 2. Enumerate the Instruction Register to find undocumented functionality 3. be easy to build and apply It's really easy to use, but it did not manage to find the JTAG pins on my device. There might be another problem, such as: - JTAG is disabled once the device is powered up - The pins I'm fiddling with are not JTAG pins - I ruined the circuitry already - I'm just not trying hard enough Back to JTAGenum: Since Arduino IDE 1.0.1 , some things have changed and so the GIT version of JTAGenum would not compile as-is. Therefor the JTAGenum sketch had ...

[RPi4][ Using the PiMoroni Fan Shim on LibreElec including the LEDs!

I recently bought a brand new Raspberry Pi 4, and wanted to try Kodi on it. There is only one Kodi-distribution which has more or less decent support for RPi 4 at the moment, and that's LibreElec (although still Alpha). Since the RPi 4 is famously overheating and throttling without a fan or at least a heatsink, I got a PiMoroni Fan Shim. Nice piece of hardware, but their library cannot run on LibreElec, because they do not support installing python libraries through pip etc... On LibreElec, the whole rootfs is a read-only squashfs image. So there's no way you can install the Pimoroni python library on LibreElec, but I found an alternative: I found Phil Randal's blog at  http://www.philrandal.co.uk/blog/archives/2019/07/entry_214.html , where he described how to get at least the Fan portion of the Fan Shim working on LibreElec. I decided to build on that, and port the LED functionality to LibreElec as well, without the need for "pip install" or a...

Arch Linux: Fixing empty/blank windows for graphical applications that require root

When running applications such as "unetbootin" or "tuxboot", you might get a blank window, instead of the actual application. Even when running it through "gksudo", or having a decent polkit running (e.g. inside Gnome). E.g.: This is because these application use MIT_SHM (Shared memory), which for some reason does not work when running graphical applications as root, while being logged in as a regular user in X. The solution is to disable MIT_SHM. E.g.: $ sudo QT_X11_NO_MITSHM=1 tuxboot