2011-01-17 04:13:22 fbcon timeout with BF548 LCD.
Prasanth Rajagopal (INDIA)
Message: 97494
In my BF548 0.2 EZ-KIT setup, I enabled only to display in the LCD console. Once Kernel boots, I would run a USB device reader application foreever (through the script). There is no other input device connected. Everything runs smoothly, but if I just leave the board untouched (no activity with the USB or application) the lcd screen wipes out as Black, as if a timeout had happened. I am using 20091.1 of the disti.
I could not recover from this state at all.
Any hints?
QuoteReplyEditDelete
2011-01-17 04:29:27 Re: fbcon timeout with BF548 LCD.
Mike Frysinger (UNITED STATES)
Message: 97495
this is normal behavior. if you dont want console blanking, then disable it.
QuoteReplyEditDelete
2011-01-17 05:20:51 Re: fbcon timeout with BF548 LCD.
Prasanth Rajagopal (INDIA)
Message: 97496
How exactly do I do that? Could not find an option in menuconfig - maybe I missed it?
Thanks.
QuoteReplyEditDelete
2011-01-17 05:27:12 Re: fbcon timeout with BF548 LCD.
Mike Frysinger (UNITED STATES)
Message: 97497
googling for "fbcon disable console blanking" looks like it returns relevant results
QuoteReplyEditDelete
2011-01-20 12:14:23 Re: fbcon timeout with BF548 LCD.
Prasanth Rajagopal (INDIA)
Message: 97570
Most of patches I got where using setterm (e.g.: setterm -blank 0 -powerdown 0 -powersave off), which it says as not found in Blackfin/uCLinux. Then after some more searches I ended up in a thread here, where a fix was given to return fbcon blank function as zero.
blackfin.uclinux.org/gf/project/uclinux-dist/forum/?_forum_action=ForumMessageBrowse&thread_id=27184&action=ForumBrowse
The blanking is gone, but I have another issue.
I have only one application, which is basically a driver for USB fingerprint reader. After Kernel Image is booted, I have only this application running in user space. I added the following to default rc file:
/////////////////////////////////////
ifconfig eth0 10.121.10.250
insmod root/sport_driver.ko
mknod /dev/sport_driver c 220 0
sleep 5
/root/fprint_reduced
////////////////////////////////////
In the LCD screen, I would print a message like "scan now" and I would swipe the card and the image gets stored as pgm in uCLinux file system. This happens in a while(1) loop.
Now, everything works, but if I leave it untouched for a while - no further print to LCD happens, though 1.the scanning works, and 2. the Pengiun logo is always seen on top left of LCD screen.
Relevant display part of the code would look like below :
////////////////////////////////////////////
while(1)
{
textcolor(BRIGHT, GREEN, BLACK);
printf("It's now time to scan your finger...................\n");
r = fp_dev_img_capture(dev, 0, &img);
if (r) {
fprintf(stderr, "image capture failed, code %d\n", r);
goto out_close;
}
textcolor(BRIGHT, RED, BLACK); ;
printf("fingerprint scanned.\n");
r = fp_img_save_to_file(img, "finger.pgm");
if (r) {
fprintf(stderr, "img save failed, code %d\n", r);
goto out_close;
}
textcolor(BRIGHT, GREEN, WHITE);
printf("fingerprint image stored. \n");
fp_img_standardize(img);
sprintf(img_name, "finger_std%d.pgm", img_idx++);
r = fp_img_save_to_file(img, img_name);
if (r) {
fprintf(stderr, "standardized img save failed, code %d\n", r);
goto out_close;
}
printf("fingerprint standardized image stored.\n");
/////////////////////////////////////////////////////////////
int test_fd,ret = 0;
char test_drv[20];
strcpy(test_drv, SPORT_DEV);
test_fd = open(test_drv, O_RDWR);
if (test_fd < 0) errp("unable to open test_drv '%s'", test_drv);
// printf("\n Driver has been opened \n\n");
ret = write(test_fd,img->data,N);
if (ret < 0) errp("error writing to driver test_drv '%s'", test_drv);
printf("We have written fingerprint data to driver\n\n");
close(test_fd);
// printf("\n Driver has been closed\n\n");
/////////////////////////////////////////////////////////////
fp_img_free(img);
}
/////////////////////////////////////////////////
void textcolor(int attr, int fg, int bg)
{ char command[13];
/* Command is the control command to the terminal */
sprintf(command, "%c[%d;%dm", 0x1B, attr, fg + 30);
printf("%s", command);
}
Any thoughts?
QuoteReplyEditDelete
2011-01-20 12:27:03 Re: fbcon timeout with BF548 LCD.
Prasanth Rajagopal (INDIA)
Message: 97572
To clarify:
When I say nothing more prints to the LCD screen, I meant - the space below the Pengiun logo is blanked out permanently...
QuoteReplyEditDelete
2011-01-20 13:51:59 Re: fbcon timeout with BF548 LCD.
Mike Frysinger (UNITED STATES)
Message: 97573
another issue -> new thread