Open2300 - Axis 223 M
You are here: Foswiki>Open2300 Web>Axis223M (03 Nov 2007, IraklisMathiopoulos)Edit Attach
-- IraklisMathiopoulos - 30 Oct 2007

I've been trying for 5 days now to install open2300 on the Axis 223M Network Camera. Its not easy (at least for me). However, some progress has been made and this page will portray all the steps that i'm taking towards successfully installing open2300 on the AXIS Camera. Excuse my narrative style of writing.

Fundamentals:

The Axis 223M is a high quality network camera. It has 8 MB Flash, 64 MB RAM, and a 36 MB Alarm buffer. The free space on the Flash is about 1.5MB so there is enough space to add your own programs. It runs Linux 2.6 with uClibc on a ETRAX FS processor with a crisv32 architecture. Unfortunately you cant just compile stuff on the camera itself. There is no compiler. Neither can you use your standard gcc compiler on your home linux box and then just ftp the executable to the camera. Different processor architecture means different compiler. Fortunately there is the gcc-cris compiler which compiles c programs for the ETRAX FS architecture.

You can install the gcc-cris compiler to your linux box by following the instructions found here http://developer.axis.com/wiki/doku.php?id=axis:compiler_install.

After I installed the compiler i tried to compile fetch2300 for the crisv32 architecture. Some tweaking was required in the open2300 Makefile (more on that later). The compilation was successful!. Next step ftp fetch2300 to the camera and try to run it. Bummer. What was the problem? Well the problem is that the 223M Camera is not using libc, instead it using uClibc (a light version of libc aimed for embedded systems).

Now, in order to use the uClibc libraries you have to install the Axis SDK to your linux box. Thats not as easy as it sounds. I switched between 3 different linux distros (ubuntu fedora7 and backtrac2) and after 2 days i managed to get the Axis SDK properly installed on Ubunu v7.10. (TODO: add details on how i installed AXIS SDK). Now,surely, i was there. I compiled fetch2300 using the modified Makefile. I uploaded it to my camera, and i executed it. Did it execute? yes. did i get any output? no.

Ok i say, i forgot to upload the open2300.conf to /etc. Did that. Now i have to edit it and select the RS232 port that is on the back of my camera. I started by using /dev/ttyS0... didnt work. used /dev/ttyS1... fetch2300 could not open the port. Finally i established that /dev/ttyS2 is the RS232 port, corrected open2300.conf and run fetch2300. Still no output.

Now i have to investigate what is happening with my com port. Remember axis uses a stripped down embeded linux. That means no serlook, no statserial. basically you have stty, the "file" /proc/tty/driver/serial, and /etc/sysconfig/serial.conf. Before investigating any software isues i hooked up a win2k box via a null modem cable to the axis camera and i run fetch2300. Suprisingly i got something. 0x006 followed by a pause then 0x006 again... From what i understand that is how fetch2300 should work. the first thing it does is that it send a 0x006 and then waits for a response.

Ok. I have established that my axis camera Tx COM is working. I figured that something must be wrong with the response of the station. hooked it up again, but before running i typed "cat /proc/tty/driver/serial". 0rx 0tx packets. After running fetch2300 for a while i looked at /proc/tty/driver/serial again. 30tx 1rx. Ok, i'm sending, but i'm only getting 1 reply. Strangely each time i run fetch2300 i get 1 reply. It doenst matter how long i keep fetch2300 running. Only one reply for each execution.

here are the output of /proc/tty/driver/serial after a fresh boot without anything connected on the camera _
[root@axis-00408c82e20f /proc/tty/driver]698# cat serial
 serinfo:1.0 driver revision:
0: uart:CRISv32 port:B0026000 irq:68 tx:21 rx:0 RTS|CTS|DTR|DSR
 2: uart:CRISv32 port:B002A000 irq:70 tx:0 rx:0 CD|RI
 4: uart:CRISv32 port:00000001 irq:0 tx:0 rx:0 RTS|DTR
[root@axis-00408c82e20f /proc/tty/driver]698#

here are the output of /proc/tty/driver/serial while i am running fetch2300 with the WS connected _
[root@axis-00408c82e20f /proc/tty/driver]698# cat serial
 serinfo:1.0 driver revision:
0: uart:CRISv32 port:B0026000 irq:68 tx:21 rx:0 RTS|CTS|DTR|DSR
 2: uart:CRISv32 port:B002A000 irq:70 tx:15 rx:1 RTS|CD|RI
 4: uart:CRISv32 port:00000001 irq:0 tx:0 rx:0 RTS|DTR
[root@axis-00408c82e20f /proc/tty/driver]698#        

(WS is on port:B002A000) . That is the current situation. I will try to see what is happening volt-wise (with a multimeter) later today.

I'm not yet desperate for suggestions, but i will be soon :).


Update

I fiddled around with a multimeter yesterday. On my home linux box, while running fetch2300 this is what i got:
Pin 1 Nothing
 Pin 2 Nothing
 Pin 3 varying -6V
 Pin 4 Steady -6V
 Pin 5 Nothing
 Pin 6 Nothing
 Pin 7 Steady +6V
 Pin 8 Nothing
 Pin 9 Nothing.

Now on the axis camera:
Pin 1 Nothing
 Pin 2 Nothing
 Pin 3 varying -7V
 Pin 4 Steady  7V
 Pin 5 Nothing
 Pin 6 Nothing
 Pin 7 Steady +6V
 Pin 8 Nothing
 Pin 9 Nothing.
It seems that PIN 4, in the camera is + and not - as in my laptop. Maybe this is the cause of not getting and replies from the Weather Station.


Update After extensive testing if finally came to the conclusion that nothing can be done, at least software wise. It seems that the kernel that comes with AXIS223M firmware has been configured not to allow direct manipulation of the DTR pin (pin 4). You could build a new firmware with the AXIS SDK, unfortunatelly the SDK if focused towards Axis device boards, and not cameras. That means that home brew firmware build from the SDK would render the camera effectively to act as a device board (an 1500$ board that is ;).

I will explore a more hands on hardware approach this weekend. I will try to get the Tx pin which is -V and split it into two lines. The first line will act as it should (go to Rx of the weather station). The second, via some diodes, capacitors and other stuff, will act as a steady -V DTR line.. Maybe it'll work who knows. Update.

I got it working! more details later. here is a pic of the circuit i had to build: open2300_(Medium).JPG
Topic revision: r5 - 03 Nov 2007, IraklisMathiopoulos
Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
This website only use harmless session cookies. See Cookie Policy for details. By using this website you accept the use of these cookies.