ArduCAM / WIFI_Camera

ArduCAM WIFI Camera
15 stars 17 forks source link

ArduCam Board Problems #2

Open Pete46 opened 8 years ago

Pete46 commented 8 years ago

Hello, I have acquired ArduCam Wifi Camera recently as a testing board for my project purposes. Board with original software was working just fine, I could connect with in and capture camera view without any problems. I wanted to modify board software and I have met some difficulties. I downloaded software dedicated to this board form http://github.org/ArduCAM
and prepared CCS project according to instructions presented in PDF, using CCS 6.0.1.00040 as stated in PDF: http://www.arducam.com/downloads/wifi_camera/ArduCAM_WIFI_Camera_Shield_DS.pdf I didn’t make any changes to the project. I programmed device using Uni Flash 3.2.0.00123 mentioned in PDF. The result was not satisfying, I still could connect through WiFi with http://mysimplelink.net/camera_demo.html, but I couldn’t capture camera view. After clicking Connect button I kept getting error: websocket unexpected response code:200 I downloaded CC32000 SDK ServicePack, with no effect. After this I updated my programming tools to: CCS 6.1.2.00015 Uni Flash 3.4.0.00003 The result after programming is even worse, because now I can’t even detect WiFi created by ArduCam Wifi Camera board. Now when I program the board with previous tool (CCS 6.0.1.00040, Uni Flash 3.2.0.00123) I still can’t detect WiFi and I’m stuck. Any help would be much appreciated.

ArduCAM commented 8 years ago

Hi Pete46 It is know issue that there is a bug in the CC3200 SDK HttpCore.c file. The reason is because HttpCore.c in SDK encounters an "upgrade-insecure-requests: 1" header and being treated as a broken Websocket upgrade.

Solution: Add the following header in HttpHeaders.h:

Then insert the following code right before "if (HttpString_nextToken(WS_UPGRADE, sizeof(WS_UPGRADE)-1, line) == line.pData)" from the HttpCore.c: That's it, but remember to rebuild the webserver.a (C:\ti\CC3200SDK_1.1.0\cc3200-sdk\netapps\http\server project) otherwise your project will still be picking up the old lib. Also you can use the update project file from: www.arducam.com/downloads/wifi_camera/websock_camera-REVA_v2.rar

Any question else,please feel free to let us know. Best Regards, Lee

Pete46 commented 8 years ago

Hello Lee, Thank you for your answer. It is unclear to me what do you mean by adding following header in HttpHeaders.h and code in httpcore.c, it looks like there is some text missing. I also used update project you linked, but it didn’t help, I still can’t see any WiFi created by ArduCam. Is there any way to fix it or is there a way to revert my board to original state? Maybe I should use Uniflash format command?

Pete46 commented 8 years ago

Is there possibility that you provide me with correctly compiled websock_camera.BIN file, so I can restore my board to default, working state?

ArduCAM commented 8 years ago

There are bugs in the HttpHeaders.h and httpcore.c files. So please add the workaround as I suggested in my last message. You can find the pre-compiled binary file in the release folder from the following link: www.arducam.com/downloads/wifi_camera/websock_camera-REVA_v2.rar

Pete46 commented 8 years ago

Quote: “Solution: Add the following header in HttpHeaders.h: Then insert the following code right before "if (HttpString_nextToken(WS_UPGRADE, sizeof(WS_UPGRADE)-1, line) == line.pData)" from the HttpCore.c: That's it, but remember to rebuild the webserver.a (C:\ti\CC3200SDK_1.1.0\cc3200-sdk\netapps\http\server project) otherwise your project will still be picking up the old lib.”

In your quote, I don’t see any code I should add.

Pete46 commented 8 years ago

I have downloaded bin file on the board, but it didn't help. I still can't see any AP created by ArduCAM. Formating, re-downloading bin and downloading service pack give no effect. Is it possible that the board has been damaged by downloading an incorrect software?

ArduCAM commented 8 years ago

Hi Pete, you have to remove the SOP2 jumper to boot in normal mode. And only flash Bin file is not enough, there are other related files should be flashed into the SPI flash as well. You have to use the Uniflash configuration file websock_camera.ucf and change the file path. Let me know if you need more help.

Pete46 commented 8 years ago

Thanks for answer. I remove SOP2 jumper after download bin file, but it doesn't change anything. I use Uniflash configuration file websock_camera.ucf and change the file path. Also I create the same path as used in project D:\My Data\workspace_v6_1\websock_camera. I copy the project into this path and download using Uniflash. All of this doesn't change anything.

Pete46 commented 8 years ago

Hey Lee! I try to use JTAG connector to connect with ArduCAM. I used XDS100v2. In CCS I prepared Target Configuration and try to make Test Connection, which give me error result:

__-----[An error has occurred and this utility has aborted]--------------------

This error is generated by TI's USCIF driver or utilities.

The value is '-183' (0xffffff49). The title is 'SC_ERR_CTL_CBL_BREAK_FAR'.

The explanation is: The controller has detected a cable break far-from itself. The user must connect the cable/pod to the target.

[End: Texas Instruments XDS100v2 USB Emulator0] _ Is there any tricks to used jtag connector? I mean switches, etc.?

ArduCAM commented 8 years ago

@Pete64, we didn't use XDS100 before. If you want to use JTAG you have to remove the all the jumpers on SOP pins. Please also note that the JTAG and I2C interface share some of the pins, if you need to debug the camera application you have to use SWD debugger mode instead of the JTAG. And you should short SOP0 when using SWD mode.

Pete46 commented 8 years ago

I haven't got SWD debugger. I buy XDS100 and now I have to use it. Could You send to me schematics? I would like to disconnect I2C pins which are shared with JTAG. Then maybe JTAG XDS100 will be work fine.

Pete46 commented 8 years ago

Hi Lee! On board ArduCam are instaled 3 connectors. I would like to use "IO13" to connect LED. I can't find in the project which pin from microprocessor is connected to IO13. Could you send me a pins map (which microprocessor pins is connected to connector/header pins)?

ArduCAM commented 8 years ago

@Pete46, please check the schematic and user guide from the following link: http://www.arducam.com/downloads/wifi_camera/ArduCAM_WIFI_Camera_SCH.pdf http://www.arducam.com/downloads/wifi_camera/ArduCAM_WIFI_Camera_Shield_DS.pdf

admin@arducam.com

From: Pete46 Date: 2016-03-17 16:41 To: ArduCAM/WIFI_Camera CC: Lee Subject: Re: [WIFI_Camera] ArduCam Board Problems (#2) Hi Lee! On board ArduCam are instaled 3 connectors. I would like to use "IO13" to connect LED. I can't find in the project which pin from microprocessor is connected to IO13. Could you send me a pins map (which microprocessor pins is connected to connector/header pins)? — You are receiving this because you commented. Reply to this email directly or view it on GitHub

Pete46 commented 8 years ago

Hello,

We are still working with Arducam, modifying software for our needs. My question is, if you have any expirience with using auto-focus option in MT9D111? Any kind of example software would be very appreciated.

ArduCAM commented 8 years ago

@Pete46, Sorry for my late reply, please contact us (admin at arducam dot com) for the AF support for MT9D111.

roger-zacharczyk commented 7 years ago

@Pete46 how did your solve the problem with the wifi connection? It seems the problem was still there on 11 Feb. But on 26 Feb it seemed like you had solved it. @ArduCAM The link you posted (http://www.arducam.com/downloads/wifi_camera/ArduCAM_WIFI_Camera_SCH.pdf) does not work.

ArduCAM commented 7 years ago

@Byte, Please try this link: http://www.arducam.com/downloads/wifi_camera/ArduCAM_WIFI_Camera_SCH_RevA.pdf
http://www.arducam.com/downloads/wifi_camera/ArduCAM_WIFI_Camera_SCH_RevB.pdf

roger-zacharczyk commented 7 years ago

@ArduCAM On 5 Feb you posted a message suggesting adding some new code in order to fix a bug but you did not paste the code then. Can you please provide me with this code?

ArduCAM commented 7 years ago

@Byte, the latest code can be found from: www.arducam.com/downloads/wifi_camera/websock_camera_V4.rar

Pete46 commented 7 years ago

@roger-zacharczyk download new SDK version from TI. In new SDK TI fix this bug.

roger-zacharczyk commented 7 years ago

@ArduCAM Thanks, that helped. I'm surprised, though, that this is not available on GitHub in this repository. Anyway, one more question: why this module does not put anything to a console via UART? It seems everything is configured properly. The NOTERM is not defined. My USB-UART converter is connected as for programming the module.

roger-zacharczyk commented 7 years ago

@ArduCAM There is also another problem: the HTML page gets loaded and a WS gets established but when I send the "capture" message nothing happens.

roger-zacharczyk commented 7 years ago

@ArduCAM I found out that the code is set for REV A. I changed it to REV B in board.h. The problem with UART still remains, though. The NOTERM is not defined. Pins are connected as for programming the module. Putty is set for 115200 speed, 8 bits of data, no parity, no flow control.

roger-zacharczyk commented 7 years ago

@ArduCAM You really need to work on the docs. ;)

roger-zacharczyk commented 7 years ago

@ArduCAM The doc says that one should update the common.h file in order to make CC3200 to connect to existing Wi-Fi network. But the SSID_NAME is not used in the code. I tried to update SSID_NAME, SECURITY_TYPE, SECURITY_KEY and it always ends up CC3200 creating it's own Wi-Fi network in AP mode.

ArduCAM commented 7 years ago

@Byte, you might need to modify the example to support STATION mode to connect to an exsiting network yourself.

roger-zacharczyk commented 7 years ago

@ArduCAM Yeah, that's what I'm trying to do now. However, I stumbled upon another problem. ;) When I switch to the station mode, the websocket stops working. ;)