Contiki and CC2531 usb dongle - contiki

I am working on Contiki-2.7. I have the CC2530dk and want to program the cc2531 usb-dongle.
My question is how can I upload the hex file from contiki to the Flash programmer, to burn it into the cc2531 usb dongle
For example how to get the hello-world.hex file to upload it in the Flash programmer

here is a step by step procedure to do it on a USB Dongle
cd into the directory of CC2530 in examples
cd contiki-2.7/examples/cc2530dk
make if its the first time to create hex. The hex files here are generated for the CC2530EB
make
if you want it for the cc2531, go into the directory cc2530-usb-demo
cd contiki-2.7/examples/cc2530dk/cc2530-usb-demo
make to produce hex
use CC Debugger or the debug converter for the cc2530DK and SmartRF Flash Programmer from TI
browse the hex and erase and program

Related

security- Idevice ios ipsw

Okay I am working on modding ios firmware 9.3.5 with removed setup files. I was able to mod the files while maintaining all apple signitures and encryption. however somewhere in the files is a stock checksum value of what the file should be. I have narrowed it down to either the kernal cache or inside the firmware folder somewhere. I have tried using a hex editor to read the binary of the kernel cache however couldn't figure out if this checksum was writen here. Does anyone know where this checksum is stored so i can change the value and be able to push the modded firmware to the device? Any help would be very helpful. I know device doesn't obtain this information from the internet as i completely disconnected from the internet before attempting to push to the device.
the digest of the checksums is found inside the build Manifest. Ended up doing a mass search through C# program that opened all files and checked for the checksum value. Ended up being in the build Manifest

weird encoding in ios executable file of an app

I'm trying to see how does certain ios apps executable files look like, what i do is export the app files to my computer using iexplorer, i then took a look at the info.plist to see the executable files, after that i opened them with my notepad to use the UTF - 8 Encoding, but here how does things look like in both files-in the opening of both of the files i see english words that are expressing directories:
sample of file 1:
‹"Ò.(?!ÑNÓU£C°îXjøe”Ú5O•½°{^ÿÝŒEÌrôðæ$#[3,ÔÜ£æ»8I˜hGw!*aHÒQ•tœl²þ„™AÍçßÍ憴³)è:cÌ7H5æß-eFç¯î&Ø\n,$Ë$y»¥ÁB^6ÙP; i(q,AÅ
âðð·'©=Ÿa"v!PBÛÚ"¤¬‹Wj·;ËsÌŽÚâZüŠ–ÇüÉ;ÜA´sI«¸Üæ¿÷ ›‚‰.êøLž
sample of file 2:
ßꪧgö«húDªÝn¡±CÅÁ¹ â=؉ˆ4|®b¡ JeW-ɯðó¦xgýgeéÀXœH7ßJÉ" 3‡rÜ6ÒI_ ƒr cdÅá¸|íð¼l;Töl±”›MÛ˜±o/ôÇô#¬RS;Y¥!ÜzGò“vî©6ØR¡‚>Ì0m5
ŸzrPÐiDMÊ|Þ·9âëYß,p؃‹£x—.àN5îüÝrjœG]Æ·
ironically in the second file i can see a huge block of english words absolutely fine, but i dont get it why i don't see the whole file very good? i have also tried to open the files in an objective-c compiler after i have made them .m but that again was useless???
The executable files contain machine langage (binary) and cannot easily be read or understand by human. The word you still see in english are probably comments left by compiler that are not executed.
Trying to open those files in a compiler won't work because if the compiler role is to convert objective-c in machine langage, he's not able to convert the other way. For a same set of machine instructions, there are many ways to code it in objective-c.
The only way to get a source-code from a binary executable is to do some retro-engineering. It is done by converting the binary executable in assembly langage (it's a very low level langage but with understandable syntax) and then trying to reproduce the instructions with a higher-level langage such as objective-C.

BlackBerry Screen Shot Utility ... Torch 9850 ... a how to guide on creating your own capture script/tool

I am providing this for everyone to hopefully save you some brain damage in finding this yourself.
As I'm working on a BlackBerry project that will run on various devices I ran into an issue grabbing screenshots from the handset (including the Torch 9850 ... not quite as good as my iPhones or my Android EVO or Infuse, but much better than the Storm and finally starting to look like a real smartphone - great performance and battery life too).
Normally I'd use my trusty BBScreenShooter and everything would be fine, but it kept crashing when attempting to capture images on the 9850. I posted a couple of requests for help on this site, but nobody could tell me why my BBScreenShooter was crashing or why I'd get "Retrieving screen <active> data ... Error: buffer too small" when using RIM's JavaLoader utility directly.
For those who didn't know BBScreenShooter delegates the "heavy lifting" to JavaLoader to grab the images.
With the help of Mark Sohm (easily one of the most knowledgable BB guys I know walking the planet) he asked me to verify I was using JavaLoader that is included in the v7 SDK. Turns out I wasn't. Good catch Mark, and thanks!
From the looks of things it appears the earlier versions of the JavaLoader utility have byte[] buffers they use for image capture that are hardcoded ... and too small.
So, for all those who need to capture screen shots from RIM's new 480 x 800 based handsets I have included a quick "how to" guide to help you get productive ASAP.
Step 1 - Make sure you have the v7.0 SDK downloaded (doesn't have to be installed, though I cannot think of a good reason not to). For Eclipse users:
Step 1a) Go to the Help menu
Step 1b) Install New Software menu choice
Step 1c) Add the "BlackBerry - http://www.blackberry.com/go/eclipseUpdate/3.6/java" items in your "work with" field.
Step 1d) Under the "BlackBerry Java Plug-in Category", look for the "BlackBerry Java SDK v7.0.0.X" checkbox and click NEXT.
Step 1e) Accept the license agreements and continue the download and installation process.
Step 2 - Go to the installation directory for your newly added SDK. We're going to grab a copy of the path to the JavaLoader utility and use it within a BAT file that will automate the capture and naming of screen shots. This will be found at /plugins/net.rim.ejde.componentpack7.0.0_7.0.0.28/components/bin/JavaLoader.exe
Step 3 - Create a folder you'd like to use to save screen captures. This will also hold your BAT file as the BAT file is specific to this particular project.
Step 4 - Create the BAT file. In my example here I keep all my IDEs, SDK, ... effectively all development environments on a different hard drive than my OS. I keep these on drive D, but modify your BAT to reflect the location and needs of your configuration.
Step 4a) It's important to turn the echo off, otherwise you will probably be unable to use the icon on the desktop to launch this script/utility.
Step 4b) If your BAT file is running locally (same folder) as JavaLoader then this step will be unnecessary. On the other hand if your JavaLoader is on a different hard drive and tucked away deep in folders then you'll have to "change directory" to get to it. Notice the "/D" switch that is used with the "change directory - cd" command so that we can change drives and paths in the same step.
Step 4c) As I like to use timestamps for part of my file names ... set local variables to represent the current date and time.
step 4d) The following "for" statements parse out the current date and time from my Windows 7 computer into a format that I want to include as the file names for my screen captures ... file name == BlackBerry_<date image was taken>_<time image was taken>.bmp.
Step 4e) Copy the newly created device screen shot that JavaLoader captured to your target folder and use the file name we've just created.
Step 4f) Now that we've successfully got a copy of the screenshot saved in our desired target folder we can delete the temporary image that JavaLoader created.
Step 4g) I echo a little statement that lets me know it all worked.
Example BAT file:
#echo off
cd /D D:\Program Files (x86)\EclipseBlackBerry\plugins\net.rim.ejde.componentpack7.0.0_7.0.0.28\components\bin
JavaLoader screenshot tempImage.bmp
set timestampdate=%date%
set timestamptime=%time%
For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set timestampdate=%%c-%%a-%%b)
For /f "tokens=1-2 delims=/:" %%a in ('time /t') do (set timestamptime=%%a%%b)
copy tempImage.bmp "C:\Users\CirrusFlyer\Desktop\<project name>\Testing\Screenshots\BlackBerry_%timestampdate%_%timestamptime%.bmp"
DEL tempImage.bmp
echo Completed "...\<project name>\Testing\Screenshots\BlackBerry_%timestampdate%_%timestamptime%.bmp"
Step 5 - Close and save your BAT file. I kept the BAT in my actual project folder, then created a shortcut and placed it on my desktop. This way I can have my Eclipse up and running and be debugging the application on my handset, and when I want to grab a screen shot simply double-click the shortcut to execute the capture.
This will create screen shots and place them in the target directory: BlackBerry_2011-10-07_1015 PM.bmp, for example.
Step 6 - Your done. Happy coding. Hope this helps.
My next project: extending Eclipse so that I can do screen captures directly from within the IDE the same way I can when doing Android based programming.

Analog Devices Ez-Board: How do I program the flash memory?

At my job, I was tasked with making a prototype of a new audio device. The heart of the prototype will be an Analog Devices, Inc. Ez-Board with a SHARC 21469 chip.
Using VisualDSP++ 5.0, I wrote the necessary software in C, and it runs perfectly now. But I only know how to download the program into RAM using VisualDSP++ and the JTAG emulator.
I have been trying to figure out how to program the flash memory on the Ez-Board so that any time the board powers up, it will run my C program. How does that work?
I figured this out.
First, in VisualDSP++, under the "Tools" menu, there is a nice GUI for programming flash memory. However, different hardware platforms need different code to do the flash programming, so the GUI is designed to take a "plugin" program that will do the actual flash programming. The Analog Devices Inc. term for this plugin is a "driver". So, before you do anything else, you need to set the correct plugin for flash programming; you do this on the first "tab" of the flash programmer tabbed dialog (the "Driver" tab). Choose the correct driver .dxe file and click on the "Load" button.
Since I am using the 21469 Ez-Board, the "plugin" is available from the sample code for that board. Here is the full pathname of the driver file:
c:\Program Files\Analog Devices\VisualDSP 5.0\214xx\Examples\ADSP-21469 EZ-Board\Flash Programmer\Parallel\21469EzFlashDriver_Parallel.dxe
With that done, you can now build a "loader" file instead of the usual executable. Open your code project in VisualDSP++, and go to the Project Options dialog (Alt+F7). From the "Project" page, change "Type:" from "Executable file" to "Loader file". An "executable file" has the extension ".dxe" while a "loader file" has the extension ".ldr". There are some options that control how the .ldr file is built, but the defaults work fine (at least they did for me with an Ez-Board).
Now build your project as usual. Instead of building a .dxe file, it will build a .ldr file.
Finally, choose "Tools/Flash Programmer..." to bring up the flash programming GUI, and click on the second tab in the tabbed dialog, "Programming". For some reason the loader file is called the "data" file on this page of the dialog. Choose your .ldr file for programming, and hit the "program" button.

Blackberry older simulator

my client wants me to make an application which works on pre4.0 os... i understand that if i make 1 like that then it wont work on the latest os...
But my actual problem is that though i did the coding correctly coz the application was just a simple WebIcon... i cant load it onto the 7290 simulator...
i tried javaloader -u load MyApp.jad and javaloader -u load MyApp.cod... but i get the following error
Error: unable to open port...
earlier it couldnt find javac... so i placed javac in the System32 folder... now the below shown error is displayed and further the simulator doesnt connect with even the 4.0 IDE....
even tried compiling in the 4.0 IDE itself... but i get the following error...
Error!: Error: java compiler failed: javac -source 1.3 -target 1.1 -g -O -d MyDir
Don know wat to do... plz help...
screenshot of the simulator...
alt text http://www.freeimagehosting.net/uploads/d9e1840ce0.jpg
Well friends at last i tried uploading the applications .cod and .jad along with the optional .jar onto my company's server... and guess wat... it did download using the jar file but after trying all the techniques mentioned here... i guessed this was it...
But the application though gets listed in the applications but doesnt show up on the menu... and neither does it run in anyway...
Hence im closing with the research here... thanx a lot guys...
I load my programs doing the following:
(Note: This is on an Curve 8310--which has a memory card slot--not sure if you can plug in the phone and use it in HardDisk mode)
Plug the phone into the computer to enable HD mode
Copy the .jad, .jar and .cod to the memory card (or device memory in your case if HD mode works for this) of the phone
Click the Media Icon
Open the menu within media and hit explore (Here I have an option for memory card OR device memory) -- Select the device memory
Finally, find and select the .jad file -- the phone will ask if you want to download--just hit yes, and this will prompt for the install
Again, I realize this is a different (older) phone which you are using, so this method may not work.
Hope it helps!
Greg

Resources