Feb
23
Neo 1973 as an SMS gateway
16 years ago, at the end of February | Leave a Comment
Builds have been broken again recently, for about 5 days or so due to this,
../../libkoto/libkoto.a(koto-task-view.o): In function `on_note_activated’:
/builder/newBuild/build/tmp/work/armv4t-angstrom-linux-gnueabi/
openmoko-tasks2-0.1.0+svnr379-r1/trunk/libkoto/koto-task-view.c:261:
undefined reference to `koto_platform_edit_task’
(just in case someone feels the need to fix it – hint hint )
but that has given me a chance to start poking about with other things. One of those things happened to be smstools3. SMS Server Tools 3 (smstools3) can take an ordinary phone or gsm modem and turn it into an SMS gateway that can send and receive SMS messages. Now, I don’t have a gsm modem but I do have a Neo 1973. Within 5 minutes I had SMS Tools compiled using the Openmoko toolchain. I’ve taken to using the toolchain quite a bit for testing before I create the .bb files so I can do proper building. Once I’d got a compiled smsd, I put together a simple /etc/smsd.conf file for the Neo (listed below).
devices = NEO logfile = /var/log/smsd.log loglevel = 6 outgoing = /var/spool/sms/outgoing checked = /var/spool/sms/checked failed = /var/spool/sms/failed incoming = /var/spool/sms/incoming [NEO] device = /dev/ttySAC0 baudrate=115200 incoming = yes regular_run_interval=3600 regular_run_cmd=AT+CFUN=1 regular_run_cmd=AT+COPS pin = 1234
Obviously the /var/spool/sms directories needed to be created too. Before you start up smsd though you need to kill off gsmd by simply issuing the command
/etc/init.d/gsmd stop
gsmd will then stop and, from what I gather, power off the gsm chip. This bit is fairly important to know, since you actually need the chip to be powered up. We can do this simply by using the command
echo 1 > /sys/devices/platform/neo1973-pm-gsm.0/power_on
smsd can then be started, if you want to stop it forking use the -t switch on the command line. Incidentally, if you want to use the regular_run_xxx commands in your configuration you need to use the latest beta of smstools3. I needed to use them to get the Neo to register with the network, particularly as I’m actually roaming while doing this. To send an sms you simply copy a text file into the /var/spool/sms/outgoing directory – The format of the file in its simplest form is
To: destination-number message-text
That’s its most basic form, you can get much more complex. There are some very nice features in smstools particularly that you can trigger actions on the receipt of SMS messages.
Tagged with: linux • neo 1973 • openmoko
February 23, 2008 22:56
Feb
18
USB Controlled RGB Blob
16 years ago, mid-February | 6 Comments
I recently came across a little project which would turn on an LED box when there was mail your gmail account. I thought it was quite interesting and, since I’d had an Arduino Diecimila in my laptop bag for about 6 months and not touched it, I decided to replicate it. The idea was simply to get used to how the Arduino board worked, the project in itself isn’t exactly going to push anyone to their limit. I was right, the code was basically in the examples there was nothing to do. Since we’re selling our house lots of my electronics development stuff has ended up in the loft. I went for a rummage and found some little RGB light globes that a local garden centre had been trying to sell off cheaply at a couple of Euros each. Undoing the screws on the base of the globe revealed a very simple
design, I’d just need to tap into the LEDs and disconnect the chip they used. Before any of this was going to happen I needed to build some sort of prototype to at least be sure that the concept was going to work. Since I didn’t have any RGB LEDs or even one of each red, green and blue I had to settle for a small LED board that had come from an old piece of equipment that I’d bought, literally, just for the parts. There was a slight problem. The led board was red, green and errm… orange. It didn’t really matter at this stage, I was only proving the code and making sure that I could get the whole idea to work before destroying the perfectly useless light globes.
The software side was also fairly straight forward too. In the end I used the SimpleMessageSystem library to handle the serial data since I kept running into issues with the standard serial I/O routines. The SimpleMessageSystem routines basically use white space as variable separators and a <CR> to signify the end of input.
Each of the colour channels can have a value between 0 (zero) and 255 which gives a lot of variation. There’s also the option to pulse the mixed colours.
Initially I was just going to have the 3 LEDs change to their relative brightness but then I hit on the idea of having them fade up and down to the correct value. I have to say it looks much better with the gradual change, although I might just add the option of selecting either gradual or instant to the parameter list.
Now, with a simple command, I can set the RGB value of my light globe.
./rgb-globe -l -b 9600 -p/dev/ttyUSB0 -s “1 255 50 0”
The original code for the command line application came from Tod Kurt and was written to be able to send serial data to the Arduino. I did make some modifications, including a couple of virtual slappings of Tod for using strcpy – I still don’t understand why people don’t pretend that function just does not exist.
I’m considering writing a small GTK application that just has a colour picker to select colours, but that would be in addition to the command line application since this is designed to be used from things like scripts or mail and IM notifications or, as I suspect mine will, build status information for my Openmoko buildhost. The only real issue at the moment is that it’s really not bright enough, I think I need to rethink the orb – maybe it’ll be better at night…
Tagged with: arduino • hardware • linux • software
February 18, 2008 16:46
Feb
13
No gpsd dependency in ScaredyCat images
16 years ago, mid-February | 2 Comments
I’d noticed that one of the developers had added a dependency on gpsd to the image build. Unfortunately gpsd depends on python-ncurses when you use –python in the build. While I’m sure they tested first, there is no .bb for python-ncurses in oe dev. Since this is preventing me building I am removing the dependency on gpsd from my builds. This allows me to build as normal. It is also preventing the build of gpsd but older versions should still work.
This should only affect people who build from oe dev and not the om version and should be fixed at some point. Although I am unsure as to why Openmoko is depending on gpsd anyway, at least at this stage.
Update: This should now be fixed. I’ll be rebuilding today’s build and making them available soon (busybox currently broken). Thanks go to
Tagged with: image builds • openmoko • opensource • software
February 13, 2008 14:23
Feb
11
New SDK for Qtopia and Neo 1973
16 years ago, mid-February | 3 Comments
Today Trolltech have released a new Qtopia SDK for the Neo 1973. The download is and ISO which apparently contains a VMWare virtual machine so everything you need to compile and generate your own flash images is included. You’ll also need to get a copy of the Qtopia source of course, but you can get it here so that’s not a problem.
Tagged with: neo 1973 • opensource • qtopia • Trolltech
February 11, 2008 9:58
Current Electricity Use (15min)
iPhone/Webkit RSS Reader
Links
- automated home
- Automated It Technology News
- awooga!!!
- LinITX
- My Acer page
- My Asterisk pages
- My Work in progress (old)
- Noble Race Car
- openmoko / neo 1973 wiki
- planet openmoko
- Spadgecock Cumpants