Using cc2530 radio with contiki - radio

I am trying to build a port for Contiki on my lpc1347 board. I have set up the mcu libraries and makefiles, all that is left is to add the radio support.
My goal is to use a cc2530 radio that I have, the problem is i do not know much about this. I see that that there is already a port for c2530, but i want to use cc2530 as a radio, so is it necessary to port Contiki in that too? How should i go about adding my lpc1347 board support for cc2530's contiki files?
Thank you.

The CC2530 is a SoC device with a 8051 MCU. You'll have to program this 8051 processor in order to use the radio. If Contiki is already running on your lpc1347 it is not necessary to port it on the cc2530 too, but you'll have to communicate with this latter in someway (uart, spi, ...) in order to send/receive radio packet and turn on/off the radio.
I suggest you to write a file i.e cpu/lpc1347/dev/cc2530-rf.c and implement a new radio driver using one of the communication interface. Implement each functions require by the structure struct radio_driver which is found in core/dev/radio.h and set the NETSTACK_CONF_RADIO variable to this new radio driver.

Related

Invalid input type tel

I am using an input type tel on a label control. It works fine on my local machine but when deployed on server it gives me error as below. Any pointers on what i am missing here.
Your server is using a different (older) version of ASP.NET/.NET Framework. You should either upgrade the runtime if possible or ask the host to do that for you.
Otherwise the only solution for you would be to use a regular input and then enforce the mask with JavaScript.

CSV file output to Virtual Serial (COM) port to control USB stepper motor

New to all this. Automation project: camera as input, motors as output. Using a windows PC is a requirement. I'm generating a CSV file from the camera (camera python api). Parsing the csv file, I'll move a motor until I reach a minimum value. So far so good.
I have a USB relay controller (http://www.canakit.com/Media/Manuals/UK1104.pdf) to which I want to output a signal from the PC based on the csv. Prefer to use java due to gui reqs. How do I get the csv file to output to a generated virtual serial com port over Java? The tutorial suggests using a terminal emulation program such as PuTTY, hyperterminal, realterm, absolute terminal, etc (all work for manual input), which i've never used (except putty for ssh). Do any of these have a java api? How would all this work? Should I use another language? I'd appreciate any feedback. Thanks.
Java has libraries that let you access serial ports on your computer. One such library is rxtx, and there are probably others. You can use such a library to open the serial port and then send or receive bytes from it.
Terminal programs are intended for interactive use by a human; they not generally meant to be used by another computer program.

From hyperterminal to OS

Is there any way to take data from hyperterminal (whatever it has recevied from COM port) and give it to OS (windows).
For example, I want to write data which is coming from COM port into Microsoft Word file.
In other words, I've my own keyboard with RS323 interface and I want whatever I type is written in Microsoft Word file.
Yes, in C# you can use the SerialPort class. Here's a tutorial that goes over this: http://code.msdn.microsoft.com/windowsdesktop/SerialPort-brief-Example-ac0d5004
You will not need Hyperterminal for this as your software would do the comms instead using SerialPort.
From there I would use a StreamWriter (or something similar) to export it to a text file. You can try exporting to word but it will probably frustrate you.
Be aware that you set the relevant flowcontrol and baud rate settings that your device will require, otherwise you will experience connection issues.

Suggestions for developing WebInterface (using Tomcat)?

I am working with TS-7500 (ARM 9) board running Debian Linux (Linux ts7500 2.6.24.4). It is connected to a couple of sensors and is running driver code to talk to these sensors.
Every time the C program starts, it reads a couple of config-parameters from a config-file and starts sensors with those values.
So the task at hand is : presenting a web interface to show/edit these config-parameters to user. The task of the web interface can be summarized in four steps :
Read config-parameters from the config-file and show the current configuration
Allow user to change the configuration
Capture and save the changes to same config-file
These config-parameters could be presented as drop-down menu items or radio-buttons. And I have a linux background script which restarts the C prg when config-file is modified.
I know TS-7500 runs Tomcat. Now please suggest a good way to handle this problem. I have heard about using Servlet and JSPs (am not very familiar with those actually). Which one of them is suitable to generate HTML pages dynamically ? (as I see everytime I need to generate a new HTML page by selecting the current configuration while displaying the page).
Sorry for being very elaborate !
EDIT : Beeps ! No reply ? Come on guyz, is the question not clear ? Or no one has ever faced a similar problem (design problem) ??
The solution would be to use a PHP in addition with Apache web server ! PHP script could be used to
Read the config file and capturing the parameters
Generate a HTML form (by pre-selecting the dropdown menus and radio buttons from the already read parameters)
And capturing the new edits and saving them to config file.
PHP script must be placed in /var/www/ directory of the embedded board. Then from any system, it could be accessed just by keying the IP address of the board and the script name using a simple web browser.

How to get all configuration settings from Azure Config file?

I need to get all configuration settings (current role or all roles not matter) from Azure cscfg file. I want to do this because i dont want to get all values one by one via RoleEnvironment.GetConfigurationSettingValue(key) method.
Is there any way to do this?
Regards
The short answer is 'no' the RoleEnvironment does not support getting all the configuration setting values.
A slightly longer answer is that getting configuration settings from the role environment in the current implementation is done through a call to native code. The separation of Windows Azure Application from Windows Azure Configuration and the ability to swap settings on a running application is at the root of this somehow. This is done inside of msshrtmi.dll (which should mean something like Microsoft Shared Runtime Managed Interop). This is the only reference Microsoft.WindowsAzure.ServiceRuntime.dll has apart from standard references to .NET.
Here is the method call to native code (I have not gone further than this):
[MethodImpl(MethodImplOptions.Unmanaged, MethodCodeType=MethodCodeType.Native), SuppressUnmanagedCodeSecurity, DllImport("", EntryPoint="", CallingConvention=CallingConvention.StdCall, SetLastError=true)]
internal static extern unsafe int modopt(IsLong) modopt(CallConvStdcall) RdGetApplicationConfigurationSetting(ushort modopt(IsConst), ushort*);
It might seem like a slightly round-about way of doing it, but if you want to get the configurations for all the roles in a deployment you can use the management api.
Kudu has an API for this.
You get to Kudu like via App Services > Advanced Details > Go
https://{app-service-name}.scm.azurewebsites.net/
or
https://{app-service-name}-{slot-name}.scm.azurewebsites.net/
The Url for the settings API is:
https://{app-service-name}.azurewebsites.net/api/settings or https://{app-service-name}-{slot-name}.scm.azurewebsites.net/